diff --git a/mogan/baremetal/ironic/driver.py b/mogan/baremetal/ironic/driver.py index 32e8591e..a55b4d65 100644 --- a/mogan/baremetal/ironic/driver.py +++ b/mogan/baremetal/ironic/driver.py @@ -566,12 +566,14 @@ class IronicDriver(base_driver.BaseEngineDriver): return [] bad_power_states = [ironic_states.ERROR, ironic_states.NOSTATE] + bad_provision_states = [ironic_states.ENROLL] # keep NOSTATE around for compatibility good_provision_states = [ ironic_states.AVAILABLE, ironic_states.NOSTATE] for node_obj in node_list: if ((node_obj.resource_class is None) or node_obj.power_state in bad_power_states or + node_obj.provision_state in bad_provision_states or (node_obj.provision_state in good_provision_states and node_obj.instance_uuid is not None)): continue diff --git a/mogan/baremetal/ironic/ironic_states.py b/mogan/baremetal/ironic/ironic_states.py index 84730df6..ec9365b5 100644 --- a/mogan/baremetal/ironic/ironic_states.py +++ b/mogan/baremetal/ironic/ironic_states.py @@ -44,6 +44,12 @@ when the node was available for provisioning. During Kilo cycle, this was changed to the AVAILABLE state. """ +ENROLL = 'enroll' +""" Node is enrolled. + +This state indicates that Ironic is aware of a node, but is not managing it. +""" + MANAGEABLE = 'manageable' """ Node is in a manageable state. This state indicates that Ironic has verified, at least once, that it had