baremetal import --initial-state enroll does not work

Bug #1637474 reported by Julie Pichon on 2016-10-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Dougal Matthews

Bug Description

In two places in the documentation, we explain that it is possible to import nodes and have them provisioned in enroll state by using the '--initial-state enroll' flag:

http://tripleo.org/basic_deployment/basic_deployment_cli.html#register-nodes
http://tripleo.org/advanced_deployment/node_states.html

However this is not the case. Nodes will be set to 'manageable' when using the 'enroll' option.

[stack@instack ~]$ ironic node-list
^[[A+------+------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+------+------+---------------+-------------+--------------------+-------------+
+------+------+---------------+-------------+--------------------+-------------+
[stack@instack ~]$ openstack baremetal import --initial-state enroll ~/instackenv.json
Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: ad827d3c-55e2-4619-b9dc-7dcdec6c5300
Successfully registered node UUID c2281d5a-f985-47f3-9af2-e99f674e30e3
Successfully registered node UUID 213d80dd-040e-4ace-8cf7-e3b699530b7d
Successfully registered node UUID 79802130-8d41-488f-b3dc-e3d8bb89fcf9
[stack@instack ~]$ ironic node-list
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| c2281d5a-f985-47f3-9af2-e99f674e30e3 | None | None | power off | manageable | False |
| 213d80dd-040e-4ace-8cf7-e3b699530b7d | None | None | power off | manageable | False |
| 79802130-8d41-488f-b3dc-e3d8bb89fcf9 | None | None | power off | manageable | False |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+

I believe setting 'enroll' state was possible before the move to Mistral, and then lost. Reading about the 'enroll' state I'm not sure why it is a desirable pre-deployment state for the TripleO use cases, 'manageable' seems more useful as introspection etc can be run while still keeping the node out of the 'available for deployment' pool?

The commit that added the flag is https://github.com/openstack/python-tripleoclient/commit/20fa1b and doesn't contain much more background information on why it was added/needed. Because of this, I'm not assigning an importance to the bug, and can't really tell either if the right approach to fixing it is by updating the documentation/command switch or by updating the workflows.

Dougal Matthews (d0ugal) on 2016-11-08
Changed in tripleo:
importance: Undecided → Medium
assignee: nobody → Dougal Matthews (d0ugal)
Dougal Matthews (d0ugal) on 2016-11-14
Changed in tripleo:
assignee: Dougal Matthews (d0ugal) → nobody
Brad P. Crochet (brad-9) on 2016-11-14
Changed in tripleo:
assignee: nobody → Brad P. Crochet (brad-9)

Fix proposed to branch: master
Review: https://review.openstack.org/398422

Changed in tripleo:
status: Triaged → In Progress
Brad P. Crochet (brad-9) on 2016-11-16
Changed in tripleo:
milestone: none → ocata-2
Changed in tripleo:
milestone: ocata-2 → ocata-3
Changed in tripleo:
assignee: Brad P. Crochet (brad-9) → Dougal Matthews (d0ugal)

Reviewed: https://review.openstack.org/398422
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=06197370db4c8882eaedce5e17150d473b629eab
Submitter: Jenkins
Branch: master

commit 06197370db4c8882eaedce5e17150d473b629eab
Author: Brad P. Crochet <email address hidden>
Date: Wed Nov 16 10:37:18 2016 -0500

    Add support for initial state to the register_or_update workflow

    Currently, it is not possible to set nodes to an 'enroll' state. It's
    either 'manageable' or 'available'. This adds support for the
    initial_state to be set to something other than just available.

    Change-Id: I40f0b27a0f38447372181f9fae6a31e57dbd79e4
    Partial-Bug: #1637474

Reviewed: https://review.openstack.org/398423
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=4b775db3d43d6fb68d122fe8cd2c00ebb469093b
Submitter: Jenkins
Branch: master

commit 4b775db3d43d6fb68d122fe8cd2c00ebb469093b
Author: Brad P. Crochet <email address hidden>
Date: Wed Nov 16 10:41:53 2016 -0500

    Remove separate call to provide workflow

    The provide workflow is now called directly from the register_or_update
    workflow. It should no longer be called from the client.

    Change-Id: I127061eff8763c159f380dd47d3a06813184faba
    Depends-On: I40f0b27a0f38447372181f9fae6a31e57dbd79e4
    Closes-Bug: #1637474

Changed in tripleo:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-tripleoclient 6.0.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers