[openstack-dev] [Ironic] ENROLL node state is introduced - next steps [ACTION RECOMMENDED]
dtantsur at redhat.com
Thu Jul 16 11:30:06 UTC 2015
Today we landed a patch  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
$ ironic node-set-provision-state UUID provide
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  whether and when we're
bumping ironicclient default API version to something above 1.11. Opinions?
More information about the OpenStack-dev