openstack node delete usability issues

Bug #1640770 reported by Steven Hardy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Brad P. Crochet

Bug Description

I've been trying to use openstack overcloud node delete and I noticed some issues we probably want to address:

1. --stack option is mandatory. We should default this to "overcloud" the same as the deploy command? If you don't pass --stack, the command fails obscurely:

 u'message': u"Failed to run action [action_ex_id=55d1ba25-c280-4e2b-9343-d6e1b7897db1, action_cls='<class 'mistral.actions.action_factory.ScaleDownAction'>', attributes='{}', params='{u'nodes': [u'bc04d434-7a4f-46d7-a4d5-f1189ce722f2'], u'container': u'', u'timeout': 240}']\n ERROR: 404 Not Found\n\nThe resource could not be found.\n\n ",
 u'status': u'FAILED'}

So we probably also need to output a more meaningful error in the case where the --stack option is wrong (references a non-existent stack)

2. The command exits before the scale-down is completed. It sits for a while, then exits, but the scaledown is still running:

[stack@instack ~]$ openstack overcloud node delete --stack overcloud bc04d434-7a4f-46d7-a4d5-f1189ce722f2
deleting nodes [u'bc04d434-7a4f-46d7-a4d5-f1189ce722f2'] from stack overcloud
Started Mistral Workflow tripleo.scale.v1.delete_node. Execution ID: f46a2ed5-cc8d-419c-8201-e6be8585ed2f
[stack@instack ~]$ nova list
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
| 8e00f89c-4490-4bbf-a7a3-0392a03d5d59 | overcloud-controller-0 | ACTIVE | - | Running | ctlplane=192.0.2.7 |
| bc04d434-7a4f-46d7-a4d5-f1189ce722f2 | overcloud-novacompute-0 | ACTIVE | - | Running | ctlplane=192.0.2.16 |
| 0950c9ff-2c44-40f2-89fe-17e4775ab379 | overcloud-novacompute-1 | ACTIVE | - | Running | ctlplane=192.0.2.15 |
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
[stack@instack ~]$ heat stack-list
WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead
+--------------------------------------+------------+--------------------+----------------------+----------------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+--------------------+----------------------+----------------------+
| a7516e44-3e9f-4223-9c7a-f7efb9f6b4b2 | overcloud | UPDATE_IN_PROGRESS | 2016-11-09T11:04:07Z | 2016-11-10T11:35:07Z |

3. Related to the above, there's no indication of status. We should probably poll for events and display them exactly like the deploy command does?

Revision history for this message
Steven Hardy (shardy) wrote :

Also the docs http://docs.openstack.org/developer/tripleo-docs/post_deployment/delete_nodes.html say you have to pass --templates and -e options - I think this is now optional, but if not then it should be as we can do a patch update to heat which just uses the existing environment/template etc.

Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → ocata-2
Brad P. Crochet (brad-9)
Changed in tripleo:
assignee: nobody → Brad P. Crochet (brad-9)
Steven Hardy (shardy)
tags: added: tripleoclient
Changed in tripleo:
assignee: Brad P. Crochet (brad-9) → Dougal Matthews (d0ugal)
status: Triaged → In Progress
Dougal Matthews (d0ugal)
Changed in tripleo:
assignee: Dougal Matthews (d0ugal) → Brad P. Crochet (brad-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/395522
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=0af664656d82ab5d658228cd078691f9abc3e789
Submitter: Jenkins
Branch: master

commit 0af664656d82ab5d658228cd078691f9abc3e789
Author: Dougal Matthews <email address hidden>
Date: Wed Nov 9 10:49:47 2016 +0000

    Default the stack name to 'overcloud' in overcloud node delete

    The stack needs to be passed as either a CLI arg with --stack or via the
    environment variable OVERCLOUD_STACK_NAME. At the moment if it isn't
    provided either way the workflow is called with an empty string for the
    stack name. This will then fail.

    This change defaults the stack name to 'overcloud' which matches the
    deploy command. One of the unit tests was updated so that it didn't pass
    the default value to ensure that it can still be overwritten.

    Change-Id: Ie44d5cba90e81ae1a35a4cabc6e20a202bfddef0
    Closes-Bug: #1640244
    Partial-Bug: #1640770

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/404324

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/newton)

Reviewed: https://review.openstack.org/404324
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=2ed71e8e857bd69100d12c9ac67dd034b6c3d3f1
Submitter: Jenkins
Branch: stable/newton

commit 2ed71e8e857bd69100d12c9ac67dd034b6c3d3f1
Author: Dougal Matthews <email address hidden>
Date: Wed Nov 9 10:49:47 2016 +0000

    Default the stack name to 'overcloud' in overcloud node delete

    The stack needs to be passed as either a CLI arg with --stack or via the
    environment variable OVERCLOUD_STACK_NAME. At the moment if it isn't
    provided either way the workflow is called with an empty string for the
    stack name. This will then fail.

    This change defaults the stack name to 'overcloud' which matches the
    deploy command. One of the unit tests was updated so that it didn't pass
    the default value to ensure that it can still be overwritten.

    Change-Id: Ie44d5cba90e81ae1a35a4cabc6e20a202bfddef0
    Closes-Bug: #1640244
    Partial-Bug: #1640770
    (cherry picked from commit 0af664656d82ab5d658228cd078691f9abc3e789)

tags: added: in-stable-newton
Changed in tripleo:
milestone: ocata-2 → ocata-3
Revision history for this message
Brad P. Crochet (brad-9) wrote :

https://review.openstack.org/#/c/407741/ is a fix for item 2 in the initial report.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/407741
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=1c7a60f5a894109fe2f942c418251e64626ebe93
Submitter: Jenkins
Branch: master

commit 1c7a60f5a894109fe2f942c418251e64626ebe93
Author: Brad P. Crochet <email address hidden>
Date: Tue Dec 6 13:48:31 2016 -0500

    Block the scale down workflow until the stack is COMPLETE or FAILED

    Use the new workflow that loops until stack goes to IN_PROGRESS, then
    loop until stack is COMPLETE or FAILED so a client doesn't need to
    continually check.

    Change-Id: I0a507bc2f20faf1ba1d76bc5f694548db3449b75
    Closes-Bug: #1640770

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 5.8.0

This issue was fixed in the openstack/tripleo-common 5.8.0 release.

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

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.