heat_integrationtests.functional.test_purge.PurgeTest.test_purge failure

Bug #1537627 reported by Rabi Mishra on 2016-01-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Thomas Herve

Bug Description

I noticed the following error with the recently added function test.

http://logs.openstack.org/28/256328/7/gate/gate-heat-dsvm-functional-orig-mysql/0f2e009/console.html#_2016-01-25_05_11_16_328

2016-01-25 05:11:16.284 | 2016-01-25 05:11:16.243 | heat_integrationtests.functional.test_purge.PurgeTest.test_purge
2016-01-25 05:11:16.285 | 2016-01-25 05:11:16.244 | ----------------------------------------------------------------
2016-01-25 05:11:16.285 | 2016-01-25 05:11:16.245 |
2016-01-25 05:11:16.285 | 2016-01-25 05:11:16.251 | Captured traceback:
2016-01-25 05:11:16.285 | 2016-01-25 05:11:16.252 | ~~~~~~~~~~~~~~~~~~~
2016-01-25 05:11:16.285 | 2016-01-25 05:11:16.255 | Traceback (most recent call last):
2016-01-25 05:11:16.286 | 2016-01-25 05:11:16.256 | File "/opt/stack/new/heat/heat_integrationtests/functional/test_purge.py", line 31, in test_purge
2016-01-25 05:11:16.286 | 2016-01-25 05:11:16.259 | self.client.stacks.list(show_deleted=True))
2016-01-25 05:11:16.286 | 2016-01-25 05:11:16.261 | File "/opt/stack/new/heat/heat_integrationtests/functional/test_purge.py", line 30, in <genexpr>
2016-01-25 05:11:16.287 | 2016-01-25 05:11:16.262 | stacks = dict((stack.id, stack) for stack in
2016-01-25 05:11:16.288 | 2016-01-25 05:11:16.264 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 101, in paginate
2016-01-25 05:11:16.291 | 2016-01-25 05:11:16.266 | stacks = self._list(url, 'stacks')
2016-01-25 05:11:16.292 | 2016-01-25 05:11:16.268 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/openstack/common/apiclient/base.py", line 134, in _list
2016-01-25 05:11:16.296 | 2016-01-25 05:11:16.270 | body = self.client.get(url).json()
2016-01-25 05:11:16.298 | 2016-01-25 05:11:16.272 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/common/http.py", line 278, in get
2016-01-25 05:11:16.299 | 2016-01-25 05:11:16.275 | return self.client_request("GET", url, **kwargs)
2016-01-25 05:11:16.302 | 2016-01-25 05:11:16.276 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/common/http.py", line 271, in client_request
2016-01-25 05:11:16.303 | 2016-01-25 05:11:16.279 | resp, body = self.json_request(method, url, **kwargs)
2016-01-25 05:11:16.327 | 2016-01-25 05:11:16.280 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/common/http.py", line 260, in json_request
2016-01-25 05:11:16.328 | 2016-01-25 05:11:16.282 | resp = self._http_request(url, method, **kwargs)
2016-01-25 05:11:16.328 | 2016-01-25 05:11:16.283 | File "/opt/stack/new/heat/.tox/integration/local/lib/python2.7/site-packages/heatclient/common/http.py", line 215, in _http_request
2016-01-25 05:11:16.328 | 2016-01-25 05:11:16.284 | raise exc.from_response(resp)
2016-01-25 05:11:16.328 | 2016-01-25 05:11:16.286 | heatclient.exc.HTTPNotFound: ERROR: Not found
2016-01-25 05:11:16.328 | 2016-01-25 05:11:16.288 |

Thomas Herve (therve) wrote :

Looks very similar to bug #1508390.

From the logs:

JSON response : {"explanation": "The resource could not be found.", "code": 404, "error": {"message": "Not found", "traceback": "Traceback (most recent call last):\n\n File \"/opt/stack/new/heat/heat/common/context.py\", line 329, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File \"/opt/stack/new/heat/heat/engine/service.py\", line 536, in list_stacks\n return [api.format_stack(stack) for stack in stacks]\n\n File \"/opt/stack/new/heat/heat/engine/stack.py\", line 438, in load_all\n not_tags_any) or []\n\n File \"/opt/stack/new/heat/heat/objects/stack.py\", line 120, in get_all\n for db_stack in db_stacks]\n\n File \"/opt/stack/new/heat/heat/objects/stack.py\", line 71, in _from_db_object\n context, db_stack['raw_template_id']))\n\n File \"/opt/stack/new/heat/heat/objects/raw_template.py\", line 67, in get_by_id\n raw_template_db = db_api.raw_template_get(context, template_id)\n\n File \"/opt/stack/new/heat/heat/db/api.py\", line 46, in raw_template_get\n return IMPL.raw_template_get(context, template_id)\n\n File \"/opt/stack/new/heat/heat/db/sqlalchemy/api.py\", line 102, in raw_template_get\n template_id)\n\nNotFound: raw template with id 1906 not found\n", "type": "NotFound"}, "title": "Not Found"} to_json /opt/stack/new/heat/heat/common/serializers.py:40

Changed in heat:
milestone: none → mitaka-3
importance: Undecided → Medium
assignee: nobody → Thomas Herve (therve)

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

Changed in heat:
status: New → In Progress

Reviewed: https://review.openstack.org/271924
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3f519dfe0fdb545a77af0008c7068c3ae855d195
Submitter: Jenkins
Branch: master

commit 3f519dfe0fdb545a77af0008c7068c3ae855d195
Author: Thomas Herve <email address hidden>
Date: Mon Jan 25 08:53:37 2016 +0100

    Handle NotFound in Stack get_all

    As we don't have transactions and we're loading the templates
    seperately, they can be gone by the time we load the stack. Let's ignore
    NotFound errors in that case.

    Change-Id: I048b4fb50512478a514f245b618784f1d7eb0c1d
    Closes-Bug: #1537627

Changed in heat:
status: In Progress → Fix Released

This issue was fixed in the openstack/heat 6.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers