Ask Your Question

heat "stack check"

asked 2018-04-20 09:24:45 -0500 gravatar image

Hi colleagues,

two questions:

  1. what "stack check" command supposed to do?
  2. check of suspended stack leads to unrecoverable error with stack - is it ok?
# openstack stack list
... | vt         | CREATE_COMPLETE |
# openstack stack check vt
... | vt         | CREATE_COMPLETE |
# openstack stack list
... | vt         | CHECK_COMPLETE  |
# openstack stack suspend vt
# openstack stack list
... | vt         | SUSPEND_COMPLETE |
# openstack stack check vt
# openstack stack list
... | vt         | CHECK_FAILED    |
# openstack stack resume vt
# openstack stack list
... | vt         | RESUME_FAILED   |

while heat-engine.log says the following:

INFO heat.engine.resource [ ... ] CHECK: Server "n1" [fb12928c-fa46-4575-8aa3-9cc9dd16f57f] Stack "vt" [7519dba6-85e4-4320-8f41-1c1a6a762dde]
ERROR heat.engine.resource Traceback (most recent call last):
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/", line 831, in _action_recorder
ERROR heat.engine.resource     yield
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/", line 939, in _do_action
ERROR heat.engine.resource     yield self.action_handler_task(action, args=handler_args)
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/", line 334, in wrapper
ERROR heat.engine.resource     step = next(subtask)
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/", line 884, in action_handler_task
ERROR heat.engine.resource     handler_data = handler(*args)
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resources/openstack/nova/", line 885, in handle_check
ERROR heat.engine.resource     self._verify_check_conditions(checks)
ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/", line 1643, in _verify_check_conditions
ERROR heat.engine.resource     raise exception.Error('; '.join(invalid_checks))
ERROR heat.engine.resource Error: 'status': expected 'ACTIVE', got 'SUSPENDED'
ERROR heat.engine.resource
WARNING heat.engine.resource [ ... ] no calling_engine_id in store {'status': 'FAILED', 'updated_at': None, 'needed_by': [], 'properties_data': None, 'replaced_by': None, 'status_reason': u"Error: resources.n1: 'status': expected 'ACTIVE', got 'SUSPENDED'", 'replaces': None, 'current_template_id': 1510, 'name': u'n1', 'stack_id': u'7519dba6-85e4-4320-8f41-1c1a6a762dde', 'requires': [6940, 6934], 'root_stack_id': u'7519dba6-85e4-4320-8f41-1c1a6a762dde', 'physical_resource_id': u'fb12928c-fa46-4575-8aa3-9cc9dd16f57f', 'action': 'CHECK', 'rsrc_prop_data_id': 7657}: Error: 'status': expected 'ACTIVE', got 'SUSPENDED'
INFO heat.engine.stack [ ... ] Stack CHECK FAILED (vt): Resource CHECK failed: ["Error: resources.n1: 'status': expected 'ACTIVE', got 'SUSPENDED'"]
INFO heat.engine.stack [ ... ] Stack CHECK FAILED (vt): Resource CHECK failed: ["Error: resources.n1: 'status': expected 'ACTIVE', got 'SUSPENDED'"]. 'CHECK' not fully supported (see resources)
INFO heat.engine.stack [ ... ] Stack RESUME IN_PROGRESS (vt): Stack RESUME started
INFO heat.engine.stack [ ... ] Stack RESUME FAILED (vt): Resource RESUME failed: Error: resources.e-secgroup: State (u'CHECK', u'COMPLETE') invalid for resume

Is Q2 is a case for raising bug or this is documented behaviour?

Thank you!

edit retag flag offensive close merge delete



Q1: It updates the stack so that it reflects the actual state of resources. E.g., without stack check, a stack doesn't automatically know that an instance has crashed,

Q2: There seems to be agreement it's a bug:

Not sure if my answer is 100% correct.

Bernd Bausch gravatar imageBernd Bausch ( 2018-04-20 23:55:50 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-04-24 15:54:10 -0500

zaneb gravatar image

stack-check checks each of the resources to make sure they're still valid (in practice this means they haven't been deleted, and aren't in an error state). If any resources fail this check they'll be put into a CHECK_FAILED state, and like any other resources in a FAILED state they'll get replaced on the next stack update.

Evidently this command shouldn't be used while a stack is suspended - both because some suspended resources will fail the check, and because the resume code expects resources to be in a SUSPEND_COMPLETE state. That Heat allows it and it fails is definitely a bug.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-04-20 09:24:45 -0500

Seen: 2,183 times

Last updated: Apr 24 '18