[openstack-dev] [Ironic] ENROLL node state is introduced - next steps [ACTION RECOMMENDED]

Dmitry Tantsur dtantsur at redhat.com
Thu Jul 16 11:30:06 UTC 2015


Hi all!

Today we landed a patch [1] that switches (starting with API version 
1.11) node creation API to default to ENROLL node state instead of 
AVAILABLE. Nothing to worry about right now: we don't default to this 
API version (yet?) in our clients. But read on to figure out how not to 
get broken in the future.

Nodes in ENROLL state a basically just records in the database. They are 
not used for scheduling, the only way to make them enter the play is via 
"manage" provision actions. This means, when you switch to API 1.11 for 
node creation, your tooling will probably get broken. There are 2 steps 
to get your tooling prepared for it:

1. Switch to new version right now with fixing whatever breaks.
If you're targetting liberty I recommend you start explicitly using 1.11 
API, e.g. for CLI:

  $ ironic --ironic-api-version 1.11 node-create ....

2. Even if you're not doing step 1, you can make your code compatible 
with both pre-1.11 and 1.11 API. Just insert 2 more transitions after 
creating a node - "manage" and "provide". E.g. for CLI:

  $ ironic node-set-provision-state UUID manage
  # wait
  $ ironic node-set-provision-state UUID provide
  # wait

For Kilo it would simply move node to MANAGEABLE and back to AVAILABLE.

Important side note: some people don't realize that ALL provision state 
transitions are asynchronous. And all of them can fail! Even if "manage" 
action was seemingly instant and synchronous before 1.11, it was not. 
Now with 1.11 API in place "manage" action may take substantial time and 
may fail. Make sure your tooling account for it.

Now it's up to the ironic team to decide [2] whether and when we're 
bumping ironicclient default API version to something above 1.11. Opinions?

[1] https://review.openstack.org/#/c/194722/
[2] https://review.openstack.org/#/c/196320/



More information about the OpenStack-dev mailing list