ironic.common.states module

Mapping of bare metal node states.

Setting the node power_state is handled by the conductor’s power synchronization thread. Based on the power state retrieved from the driver for the node, the state is set to POWER_ON or POWER_OFF, accordingly. Should this fail, the power_state value is left unchanged, and the node is placed into maintenance mode.

The power_state can also be set manually via the API. A failure to change the state leaves the current state unchanged. The node is NOT placed into maintenance mode in this case.

ironic.common.states.ACTIVE = 'active'

Node is successfully deployed and associated with an instance.

ironic.common.states.ADOPTFAIL = 'adopt failed'

Node failed to complete the adoption process.

This state is the resulting state of a node that failed to complete adoption, potentially due to invalid or incompatible information being defined for the node.

ironic.common.states.ADOPTING = 'adopting'

Node is being adopted.

This provision state is intended for use to move a node from MANAGEABLE to ACTIVE state to permit designation of nodes as being “managed” by Ironic, however “deployed” previously by external means.

ironic.common.states.AVAILABLE = 'available'

Node is available for use and scheduling.

This state is replacing the NOSTATE state used prior to Kilo.

ironic.common.states.CLEANFAIL = 'clean failed'

Node failed cleaning. This requires operator intervention to resolve.

ironic.common.states.CLEANING = 'cleaning'

Node is being automatically cleaned to prepare it for provisioning.

ironic.common.states.CLEANWAIT = 'clean wait'

Node is waiting for a clean step to be finished.

This will be the node’s provision_state while the node is waiting for the driver to finish a cleaning step.

ironic.common.states.DELETED = 'deleted'

Node tear down was successful.

In Juno, target_provision_state was set to this value during node tear down.

In Kilo, this will be a transitory value of provision_state, and never represented in target_provision_state.

ironic.common.states.DELETE_ALLOWED_STATES = ('manageable', 'enroll', 'adopt failed')

States in which node deletion is allowed.

ironic.common.states.DELETING = 'deleting'

Node is actively being torn down.

ironic.common.states.DEPLOY = 'deploy'

Node is successfully deployed and associated with an instance. This is an alias for ACTIVE.

ironic.common.states.DEPLOYDONE = 'deploy complete'

Node was successfully deployed.

This is mainly a target provision state used during deployment. A successfully deployed node should go to ACTIVE status.

ironic.common.states.DEPLOYFAIL = 'deploy failed'

Node deployment failed.

ironic.common.states.DEPLOYING = 'deploying'

Node is ready to receive a deploy request, or is currently being deployed.

A node will have its provision_state set to DEPLOYING briefly before it receives its initial deploy request. It will also move to this state from DEPLOYWAIT after the callback is triggered and deployment is continued (disk partitioning and image copying).

ironic.common.states.DEPLOYWAIT = 'wait call-back'

Node is waiting to be deployed.

This will be the node provision_state while the node is waiting for the driver to finish deployment.

ironic.common.states.ENROLL = 'enroll'

Node is enrolled.

This state indicates that Ironic is aware of a node, but is not managing it.

ironic.common.states.ERROR = 'error'

An error occurred during node processing.

The last_error attribute of the node details should contain an error message.

ironic.common.states.FASTTRACK_LOOKUP_ALLOWED_STATES = frozenset({'available', 'clean wait', 'cleaning', 'deploying', 'enroll', 'inspect wait', 'inspecting', 'manageable', 'rescue wait', 'rescuing', 'wait call-back'})

States where API lookups are permitted with fast track enabled.

ironic.common.states.INSPECTFAIL = 'inspect failed'

Node inspection failed.

ironic.common.states.INSPECTING = 'inspecting'

Node is under inspection.

This is the provision state used when inspection is started. A successfully inspected node shall transition to MANAGEABLE state. For asynchronous inspection, node shall transition to INSPECTWAIT state.

ironic.common.states.INSPECTWAIT = 'inspect wait'

Node is under inspection.

This is the provision state used when an asynchronous inspection is in progress. A successfully inspected node shall transition to MANAGEABLE state.

ironic.common.states.LOOKUP_ALLOWED_STATES = frozenset({'clean wait', 'cleaning', 'deploying', 'inspect wait', 'inspecting', 'rescue wait', 'rescuing', 'wait call-back'})

States when API lookups are normally allowed for nodes.

ironic.common.states.MANAGEABLE = 'manageable'

Node is in a manageable state.

This state indicates that Ironic has verified, at least once, that it had sufficient information to manage the hardware. While in this state, the node is not available for provisioning (it must be in the AVAILABLE state for that).

ironic.common.states.NOSTATE = None

No state information.

This state is used with power_state to represent a lack of knowledge of power state, and in target_*_state fields when there is no target.

ironic.common.states.POWER_OFF = 'power off'

Node is powered off.

ironic.common.states.POWER_ON = 'power on'

Node is powered on.

ironic.common.states.REBOOT = 'rebooting'

Node is rebooting.

ironic.common.states.REBUILD = 'rebuild'

Node is to be rebuilt.

This is not used as a state, but rather as a “verb” when changing the node’s provision_state via the REST API.

ironic.common.states.RESCUE = 'rescue'

Node is in rescue mode.

ironic.common.states.RESCUEFAIL = 'rescue failed'

Node rescue failed.

ironic.common.states.RESCUEWAIT = 'rescue wait'

Node is waiting on an external callback.

This will be the node provision_state while the node is waiting for the driver to finish rescuing the node.

ironic.common.states.RESCUING = 'rescuing'

Node is in process of being rescued.

ironic.common.states.SOFT_POWER_OFF = 'soft power off'

Node is in the process of soft power off.

ironic.common.states.SOFT_REBOOT = 'soft rebooting'

Node is rebooting gracefully.

ironic.common.states.STABLE_STATES = ('enroll', 'manageable', 'available', 'active', 'error', 'rescue')

States that will not transition unless receiving a request.

ironic.common.states.STUCK_STATES_TREATED_AS_FAIL = ('deploying', 'cleaning', 'verifying', 'inspecting', 'adopting', 'rescuing', 'unrescuing', 'deleting')

States that cannot be resumed once a conductor dies.

If a node gets stuck with one of these states for some reason (eg. conductor goes down when executing task), node will be moved to fail state.

ironic.common.states.UNDEPLOY = 'undeploy'

Node tear down process has started. This is an alias for DELETED.

ironic.common.states.UNRESCUEFAIL = 'unrescue failed'

Node unrescue failed.

ironic.common.states.UNRESCUING = 'unrescuing'

Node is being restored from rescue mode (to active state).

ironic.common.states.UNSTABLE_STATES = ('deploying', 'wait call-back', 'cleaning', 'clean wait', 'verifying', 'deleting', 'inspecting', 'inspect wait', 'adopting', 'rescuing', 'rescue wait', 'unrescuing')

States that can be changed without external request.

ironic.common.states.UPDATE_ALLOWED_STATES = ('deploy failed', 'inspecting', 'inspect failed', 'inspect wait', 'clean failed', 'error', 'verifying', 'adopt failed', 'rescue failed', 'unrescue failed')

Transitional states in which we allow updating a node.

ironic.common.states.VERBS = {'abort': 'abort', 'active': 'deploy', 'adopt': 'adopt', 'clean': 'clean', 'deleted': 'delete', 'deploy': 'deploy', 'inspect': 'inspect', 'manage': 'manage', 'provide': 'provide', 'rescue': 'rescue', 'undeploy': 'delete', 'unrescue': 'unrescue'}

Mapping of state-changing events that are PUT to the REST API

This is a mapping of target states which are PUT to the API, eg,

PUT /v1/node/states/provision {‘target’: ‘active’}

The dict format is:

{target string used by the API: internal verb}

This provides a reference set of supported actions, and in the future may be used to support renaming these actions.

ironic.common.states.VERIFYING = 'verifying'

Node power management credentials are being verified.

ironic.common.states.on_enter(new_state, event)[source]

Used to log when entering a state.

ironic.common.states.on_exit(old_state, event)[source]

Used to log when a state is exited.