Merge "Do not try to "provide" updated nodes not in "manageable" state"
This commit is contained in:
commit
b188c70e63
@ -338,9 +338,10 @@ pxe_ssh,192.168.122.2,stack,"KEY2",00:0b:d0:69:7e:58""")
|
||||
)
|
||||
self.mock_websocket_success = [{
|
||||
"status": "SUCCESS",
|
||||
"registered_nodes": [{
|
||||
"uuid": "MOCK_NODE_UUID"
|
||||
}],
|
||||
"registered_nodes": [
|
||||
{"uuid": "MOCK_NODE_UUID", "provision_state": "manageable"},
|
||||
{"uuid": "MOCK_NODE_UUID2", "provision_state": "available"},
|
||||
],
|
||||
}, {
|
||||
"status": "SUCCESS"
|
||||
}]
|
||||
|
@ -190,9 +190,13 @@ class ImportBaremetal(command.Command):
|
||||
instance_boot_option=parsed_args.instance_boot_option
|
||||
)
|
||||
|
||||
node_uuids = [node['uuid'] for node in nodes]
|
||||
|
||||
if parsed_args.initial_state == "available":
|
||||
# NOTE(dtantsur): newly enrolled nodes state is reported as
|
||||
# "enroll" from the workflow even though it's actually "manageable"
|
||||
# because the node list is built before "manage" action is run.
|
||||
node_uuids = [node['uuid'] for node in nodes
|
||||
if node['provision_state'] in {'manageable',
|
||||
'enroll'}]
|
||||
baremetal.provide(self.app.client_manager, node_uuids=node_uuids,
|
||||
queue_name=queue_name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user