Created attachment 1240937 [details]
Description of problem:
Currently we support node set to available only if the node is in manageable state, however in case the node is in enroll (if we register node from a file)
The set node to manageable is impossible only if manually setting the newly registered node to manageable
$ ironic node-list
| 3f7c1253-5cab-4ca3-91de-b694d00aa95e | my_node | None | None | enroll | False |
Then select the node and select 'Set node as managable' fails
ironic node-set-provision-state 3f7c1253-5cab-4ca3-91de-b694d00aa95e manage
Then able to set the node as available
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. register new node in node management
2. select the new node 'Set Nodes to Manageable'
"Manageable": not available for cdf0e401-1436-4dcb-ba5c-3515cb409751. cdf0e401-1436-4dcb-ba5c-3515cb409751's provision state must be in "available", "adoptfail", "cleanfail", or "inspectfail"
Richard, is this expected behavior, or are there new state changes to consider?
Ronnie, when I registered nodes using a file, they automatically go to manageable state. Can you give more details as to how you got nodes to the enroll state?
Fix posted for review
verified on 220.127.116.11, nodes turn to manageable after import, register nodes