rhel-osp-director: 8.0 - first attempt to run "heat stack-delete <name>" shows in the status column the last available status. Environment: openstack-heat-api-cloudwatch-5.0.0-1.el7ost.noarch openstack-heat-templates-0-0.1.20151019.el7ost.noarch openstack-heat-engine-5.0.0-1.el7ost.noarch python-heatclient-0.8.0-1.el7ost.noarch openstack-heat-api-5.0.0-1.el7ost.noarch openstack-tripleo-heat-templates-0.8.7-1.el7ost.noarch openstack-heat-api-cfn-5.0.0-1.el7ost.noarch heat-cfntools-1.2.8-2.el7.noarch openstack-heat-common-5.0.0-1.el7ost.noarch Steps to reproduce: Attempt to deploy an overcloud. Attempt to delete the deployed overcloud with heat stack-delete overcloud Result: heat stack-delete overcloud +--------------------------------------+------------+---------------+---------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+---------------+---------------------+--------------+ | e4cc93d1-fa55-461d-818a-e53dc728edd8 | overcloud | CREATE_FAILED | 2015-11-12T17:34:42 | None | +--------------------------------------+------------+---------------+---------------------+--------------+ CREATE_FAILED was the status from the previous deployment. Running the deletion command again: [stack@instack ~]$ heat stack-delete overcloud +--------------------------------------+------------+--------------------+---------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+---------------------+--------------+ | e4cc93d1-fa55-461d-818a-e53dc728edd8 | overcloud | DELETE_IN_PROGRESS | 2015-11-12T17:34:42 | None | +--------------------------------------+------------+--------------------+---------------------+--------------+ Looks OK. Expected result: The DELETE_IN_PROGRESS should appear on first attempt to delete the overcloud.
Because Heat starts stack operations in a separate thread, it can return a result to the client before the stack moves to the IN_PROGRESS state. When the client immediately queries the stack status it may see either the previous or the new status. It would be nice if this couldn't happen, but it is very difficult to fix cleanly and there are no plans to do so at the moment.
I think the current behaviour is changed upstream not to do a stack-list with stack-delete. upstream bug: https://bugs.launchpad.net/python-heatclient/+bug/1556407 gerrit review: https://review.openstack.org/#/c/292697/
This will be fixed in rhos-9.0 but please note that rhos-8.0 has a new "openstack stack delete" command which doesn't have this issue.
This has been fixed in upstream python-heatclient-1.2.0, which is not yet in RHOS-9. I suggest we rebase RHOS-9 to use python-heatclient-1.2.0
Verified: Environment: python-heatclient-1.2.0-1.el7ost.noarch Tried with both: heat stack-delete and openstack stack delete Both worked as expected. [stack@instack ~]$ heat stack-delete overcloud --yes WARNING (shell) "heat stack-delete" is deprecated, please use "openstack stack delete" instead Request to delete stack overcloud has been accepted. [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 | +--------------------------------------+------------+--------------------+---------------------+---------------------+ | 828e7f53-40db-4803-a3e2-9af7936d1e11 | overcloud | DELETE_IN_PROGRESS | 2016-06-28T16:30:27 | 2016-06-28T17:33:09 | +--------------------------------------+------------+--------------------+---------------------+---------------------+ [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 | +--------------------------------------+------------+---------------+---------------------+---------------------+ | 1ca43517-f827-4509-be1f-ce5c412f276a | overcloud | UPDATE_FAILED | 2016-06-27T15:40:57 | 2016-06-28T15:53:48 | +--------------------------------------+------------+---------------+---------------------+---------------------+ [stack@instack ~]$ [stack@instack ~]$ openstack stack delete overcloud --yes [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 | +--------------------------------------+------------+--------------------+---------------------+---------------------+ | 1ca43517-f827-4509-be1f-ce5c412f276a | overcloud | DELETE_IN_PROGRESS | 2016-06-27T15:40:57 | 2016-06-28T15:53:48 | +--------------------------------------+------------+--------------------+---------------------+---------------------+
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-1597.html