Environment deletion does not delete stack

Bug #1321487 reported by Steve McLellan
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Serg Melikyan

Bug Description

I'm still having trouble deleting stacks (murano-api and engine master). The API reports success immediately, but I get an engine error

2014-05-20 17:39:14.179 15918 ERROR muranoapi.common.engine [-] Error during task execution for tenant 5c427006e28c4345b2e184c6dce76ab4
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine Traceback (most recent call last):
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine File "/home/sjm/git/murano-api/muranoapi/common/engine.py", line 59, in handle_task
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine obj = exc.load(task['model'])
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine File "/home/sjm/git/murano-api/muranoapi/dsl/executor.py", line 237, in load
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine None, self._root_context)
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine File "/home/sjm/git/murano-api/muranoapi/dsl/object_store.py", line 55, in load
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine raise ValueError()
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine ValueError
2014-05-20 17:39:14.179 15918 TRACE muranoapi.common.engine
2014-05-20 17:39:14.184 15918 ERROR oslo.messaging.rpc.dispatcher [-] Exception during message handling: 'NoneType' object has no attribute '__getitem__'

and then a second stacktrace processing the error
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher File "/home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher File "/home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher File "/home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher File "/home/sjm/git/murano-api/muranoapi/common/engine.py", line 76, in handle_task
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher msg_env = Environment(task['model']['Objects']['?']['id'])
2014-05-20 17:39:14.184 15918 TRACE oslo.messaging.rpc.dispatcher TypeError: 'NoneType' object has no attribute '__getitem__'

There were some patches in flight to fix this but i think they've all been merged.

Changed in murano:
importance: Undecided → High
status: New → Confirmed
Steve McLellan (sjmc7)
Changed in murano:
assignee: nobody → Steve McLellan (sjmc7)
Revision history for this message
Stan Lagun (slagun) wrote :

This need to be revalidated. This may be fixed already or at least fail for another reason with another call stack. In this cast it may be another bug

Changed in murano:
status: Confirmed → Incomplete
Revision history for this message
Steve McLellan (sjmc7) wrote :
Download full text (8.2 KiB)

The bug has changed but remains - I now get (stack trace from the engine):

2014-06-11 12:01:01.725 9893 DEBUG murano.dsl.executor [-] bea9b69e1d254edaa66b54f185ee64da: Begin execution: io.murano.system.HeatStack.current (-3975281727681952903) _invoke_method_implementation /home/sjm/git/murano-api/murano/dsl/executor.py:132
2014-06-11 12:01:01.726 9893 DEBUG heatclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: <SNIP>' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' http://15.126.207.137:8004/v1/15a41777be7244daacd242a02b862814/stacks/e2 log_curl_request /home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/heatclient/common/http.py:109
2014-06-11 12:01:01.904 9893 DEBUG heatclient.common.http [-] curl -i -X GET -H 'User-Agent: python-heatclient' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Auth-Token: <SNIP>' http://15.126.207.137:8004/v1/15a41777be7244daacd242a02b862814/stacks/e2/8b8ce945-0922-40a6-b5ce-fa47c7414a6a log_curl_request /home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/heatclient/common/http.py:109
{"stack": {"disable_rollback": false, "description": "No description", "parameters": {"OS::stack_name": "e2", "OS::stack_id": "8b8ce945-0922-40a6-b5ce-fa47c7414a6a"}, "stack_status_reason": "Stack CREATE completed successfully", "stack_name": "e2", "outputs": [], "creation_time": "2014-06-11T16:58:21Z", "links": [{"href": "http://15.126.207.137:8004/v1/15a41777be7244daacd242a02b862814/stacks/e2/8b8ce945-0922-40a6-b5ce-fa47c7414a6a", "rel": "self"}], "capabilities": [], "notification_topics": [], "timeout_mins": null, "stack_status": "CREATE_COMPLETE", "updated_time": null, "id": "8b8ce945-0922-40a6-b5ce-fa47c7414a6a", "template_description": "No description"}}
2014-06-11 12:01:02.029 9893 DEBUG heatclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: <SNIP>' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' http://15.126.207.137:8004/v1/15a41777be7244daacd242a02b862814/stacks/e2/8b8ce945-0922-40a6-b5ce-fa47c7414a6a/template log_curl_request /home/sjm/git/murano-api/.venv/local/lib/python2.7/site-packages/heatclient/common/http.py:109
{"heat_template_version": "2013-05-23", "resources": {"e2-network-subnet-1f83bd93d6844dbaa37a32fc530fa412": {"type": "OS::Neutron::Subnet", "properties": {"network_id": {"get_resource": "e2-network-net-1f83bd93d6844dbaa37a32fc530fa412"}, "ip_version": 4, "cidr": "10.0.20.0/24", "dns_nameservers": ["8.8.8.8"]}}, "e2-network-net-1f83bd93d6844dbaa37a32fc530fa412": {"type": "OS::Neutron::Net", "properties": {"name": "e2-network"}}, "e2-network-ri-1f83bd93d6844dbaa37a32fc530fa412": {"type": "OS::Neutron::RouterInterface", "properties": {"router_id": "4b9354be-161f-44b3-a5f8-300188c362e2", "subnet_id": {"get_resource": "e2-network-subnet-1f83bd93d6844dbaa37a32fc530fa412"}}}}}
2014-06-11 12:01:02.141 9893 DEBUG murano.dsl.executor [-] bea9b69e1d254edaa66b54f185ee64da: End execution: io.murano.system.HeatStack.current (-3975281727681952903) _invoke_method_implementation /home/sjm/git/murano-api/murano/dsl/executor.py:139
Traceback (most recent call ...

Read more...

Changed in murano:
milestone: none → juno-2
status: Incomplete → Confirmed
Revision history for this message
Steve McLellan (sjmc7) wrote :

Currently there are no errors raised, but the stack isn't deleted; the RPC 'action' is set to None so Environment.deploy() (which would delete the stack in the absence of any applications) is not called. The 'data' variable in db/services/environments.py does not contain an action.

Changed in murano:
assignee: Steve McLellan (sjmc7) → Serg Melikyan (smelikyan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/102810
Committed: https://git.openstack.org/cgit/stackforge/murano/commit/?id=9cb1b2e2038d024ad5567ed75fdd5869d6392a22
Submitter: Jenkins
Branch: master

commit 9cb1b2e2038d024ad5567ed75fdd5869d6392a22
Author: Serg Melikyan <email address hidden>
Date: Wed Jul 9 13:58:56 2014 +0400

    Delete Heat stack when environment is deleted

    Added new action 'destroy' to io.murano.Environment that handles
    deletion of Heat stack when environment is deleted.

    Note: changeset include changes in io.murano package, during update
    this package should be re-uploaded to application catalog

    Closes-Bug: #1321487
    Change-Id: I92268b90cb762d58669208aef3f5fce85e06d355

Changed in murano:
status: In Progress → Fix Committed
Changed in fuel:
assignee: nobody → Serg Melikyan (smelikyan)
assignee: Serg Melikyan (smelikyan) → nobody
no longer affects: fuel
Changed in mos:
assignee: nobody → MOS Murano (mos-murano)
milestone: none → 5.1
importance: Undecided → High
status: New → Confirmed
Changed in mos:
status: Confirmed → New
no longer affects: mos
ruhe (ruhe)
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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