summaryrefslogtreecommitdiff
path: root/ironic/db/api.py
diff options
context:
space:
mode:
authorDevananda van der Veen <devananda.vdv@gmail.com>2015-01-23 11:34:47 -0800
committerDevananda van der Veen <devananda.vdv@gmail.com>2015-01-30 05:10:09 -0800
commite7958dee652ecd961a90eafd2c0411bc464b0adb (patch)
tree7b944cd0321c70b0e2c8d6b7c2146506e827f829 /ironic/db/api.py
parent41595327cf1851d45590d55348fa3f615e55279f (diff)
downloadironic-e7958dee652ecd961a90eafd2c0411bc464b0adb.tar.gz
Rename NOSTATE to AVAILABLE
This patch adds the new provisioning state AVAILABLE, and bumps the API microversion to 1.1. This version exposes the renaming of the previous provision_state="None" to provision_state="available" for nodes which are available for use. A database migration is added which updates all DB records' provision_state from NOSTATE to AVAILABLE. Since database migrations and code changes may be rolled out at different times, the conductor can deploy to a node in either NOSTATE or AVAILABLE states. OperatorImpact: This change should be rolled out to production services, and the conductor service should be restarted, *before* the database migration is applied. Ironic will then begin "translating" existing node states to the new AVAILABLE state automatically when it touches them. If the DB migration is run much later, it may not actually update any records (and that is OK). DocImpact: This change updates the Node provision_state value which represents a node that is available for provisioning. It is changed from "None" to "available", but this change is only realized when the X-OpenStack-Ironic-API-Version header is >= 1.1 *** NOTE *** Nova interprets the provision_state of Nodes to determine which should be exposed to the scheduler and counted as available resources. Up to the Juno release, Nova looked for the "NOSTATE" state to indicate this, represented as provision_state=None. After commit Idbd36b230cf997bed7a86c3f56cf9c70995028b2 landed in Nova, both the old "None" and new "available" states are interpreted in this way. As such, Nova may continue to use Juno Ironic, which did not support microversions, or may begin using the 1.1 version. Implements: blueprint new-ironic-state-machine Change-Id: I5e6f6ee5877d475136ce2ebad4a9333b424dc96b
Diffstat (limited to 'ironic/db/api.py')
-rw-r--r--ironic/db/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic/db/api.py b/ironic/db/api.py
index 6bdcd89e4..e535b262f 100644
--- a/ironic/db/api.py
+++ b/ironic/db/api.py
@@ -135,8 +135,8 @@ class Connection(object):
{
'uuid': utils.generate_uuid(),
'instance_uuid': None,
- 'power_state': states.NOSTATE,
- 'provision_state': states.NOSTATE,
+ 'power_state': states.POWER_OFF,
+ 'provision_state': states.AVAILABLE,
'driver': 'pxe_ipmitool',
'driver_info': { ... },
'properties': { ... },