stack action-check should be check-complete when stack has been suspended

Bug #1569218 reported by Di XiaoLi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Undecided
Unassigned

Bug Description

My steps:
step1: create stack which contains a server resource
step2: execute action-suspend , then the stack and server resource 's status changed to "SUSPEND_COMPLETE"
step3: execute action-check failed, due to

2016-04-12 13:54:39.896 INFO heat.engine.resource [-] CHECK: Server "vm" [bc9c693c-a48a-422d-8af1-c13ab4ef30e9] Stack "test-cloud-config" [af51daa7-b4d4-4519-ae75-437028711094]
2016-04-12 13:54:39.896 TRACE heat.engine.resource Traceback (most recent call last):
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 704, in _action_recorder
2016-04-12 13:54:39.896 TRACE heat.engine.resource yield
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 776, in _do_action
2016-04-12 13:54:39.896 TRACE heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 297, in wrapper
2016-04-12 13:54:39.896 TRACE heat.engine.resource step = next(subtask)
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 747, in action_handler_task
2016-04-12 13:54:39.896 TRACE heat.engine.resource handler_data = handler(*args)
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/nova/server.py", line 924, in handle_check
2016-04-12 13:54:39.896 TRACE heat.engine.resource self._verify_check_conditions(checks)
2016-04-12 13:54:39.896 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 1234, in _verify_check_conditions
2016-04-12 13:54:39.896 TRACE heat.engine.resource raise exception.Error('; '.join(invalid_checks))
2016-04-12 13:54:39.896 TRACE heat.engine.resource Error: 'status': expected 'ACTIVE', got 'SUSPENDED'
2016-04-12 13:54:39.896 TRACE heat.engine.resource

2016-04-12 13:54:40.017 INFO heat.engine.stack [-] Stack CHECK FAILED (test-cloud-config): Resource CHECK failed: ["Error: resources.vm: 'status': expected 'ACTIVE', got 'SUSPENDED'"]. 'CHECK' not fully su
pported (see resources)

Issue:
# heat help action-check
usage: heat action-check <NAME or ID>

Check that stack resources are in expected states.

So, For the stack which contains a server, we can execute the action-suspend on stack. So, For Heat, the expected states of a server should be "SUSPENDED" or "ACTIVE".

Another reason for this, if the expected status of server is just "ACTIVE", In this situation(stack has a server resource):
Stack Create--> Stack Suspend--> Stack Check-->Stack Suspend/Stack Resume
and it will fail due to check failed, then the server stuck into "suspended" status.

Di XiaoLi (dixiaoli)
summary: - stack action-check should be check-complete when server has been
+ stack action-check should be check-complete when stack has been
suspended
Changed in heat:
assignee: nobody → Di XiaoLi (dixiaobj)
Di XiaoLi (dixiaoli)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Di XiaoLi (dixiaoli)
description: updated
Di XiaoLi (dixiaoli)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Di XiaoLi (<email address hidden>) on branch: master
Review: https://review.openstack.org/304552
Reason: Since can not make the server status be consistent with the resource status in db, I think it is better to abandon this patch. The action_check for nova server means to check if the server is "ACTIVE"...

Di XiaoLi (dixiaoli)
Changed in heat:
assignee: Di XiaoLi (dixiaobj) → nobody
Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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