500 when requesting list of deployments of a deleting env

Bug #1481840 reported by Kirill Zaitsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Kirill Zaitsev

Bug Description

To reproduce: start deleting an environment, navigate to environment datails page.

observed result: error message

expected result: details page

logs contain

Recoverable error: {"title": "Internal Server Error", "error": {"type": "AttributeError", "message": "'NoneType' object has no attribute 'pop'", "traceback": "Traceback (most recent call last):\n File \"/Users/teferi/murano/murano/murano/api/middleware/fault.py\", line 127, in process_request\n return req.get_response(self.application)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1317, in send\n application, catch_exc_info=False)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application\n app_iter = application(self.environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py\", line 434, in __call__\n response = req.get_response(self._app)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1317, in send\n application, catch_exc_info=False)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application\n app_iter = application(self.environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 197, in __call__\n response = req.get_response(self.application)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1317, in send\n application, catch_exc_info=False)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application\n app_iter = application(self.environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/paste/urlmap.py\", line 216, in __call__\n return app(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/routes/middleware.py\", line 136, in __call__\n response = self.app(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/Users/teferi/murano/murano/.tox/venv/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 377, in __call__\n action_result = self.execute_action(action, request, **action_args)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 391, in execute_action\n return self.dispatch(self.controller, action, request, **action_args)\n File \"/Users/teferi/murano/murano/murano/common/wsgi.py\", line 400, in dispatch\n return method(*args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/api/v1/request_statistics.py\", line 57, in wrap\n result = func(*args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/utils.py\", line 51, in __inner\n return func(self, request, environment_id, *args, **kwargs)\n File \"/Users/teferi/murano/murano/murano/api/v1/deployments.py\", line 47, in index\n in result]\n File \"/Users/teferi/murano/murano/murano/api/v1/deployments.py\", line 128, in set_dep_state\n deployment.description = _patch_description(deployment.description)\n File \"/Users/teferi/murano/murano/murano/api/v1/deployments.py\", line 81, in _patch_description\n description['services'] = description.pop('applications', [])\nAttributeError: 'NoneType' object has no attribute 'pop'\n"}, "explanation": "The server has either erred or is incapable of performing the requested operation.", "code": 500} (HTTP 500)

Tags: api
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/209593

Changed in murano:
assignee: nobody → Kirill Zaitsev (kzaitsev)
status: New → In Progress
summary: - Unable to enter deleting environment details in dashboard
+ 500 when requesting list of deployments of a deleting env
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/209593
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=390b2fb6f35a7e6363616654b5288eff7a5f81f1
Submitter: Jenkins
Branch: master

commit 390b2fb6f35a7e6363616654b5288eff7a5f81f1
Author: Kirill Zaitsev <email address hidden>
Date: Wed Aug 5 19:21:47 2015 +0300

    Prevent 500 when requesting deployments of a deleting env

    Currently a 500 error would be raised if we request list of deployments
    of an env, that is being deleted. This due to the helper function, that
    expects description of an environment to be a dict.
    This patch makes the helper function aware, that description can be
    None, therefore preventing the 500 error.

    Change-Id: I9ee05dcb583fdca59813b23d948ec4baa20b713b
    Closes-Bug: #1481840

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
importance: Undecided → Medium
milestone: none → liberty-3
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: liberty-3 → 1.0.0
Changed in murano:
milestone: 1.0.0 → 1.0.1
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.