Duplicated cleanup in image

Bug #1674238 reported by hai shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
hai shi

Bug Description

When I ran this task:
{%- set cirros_image_url = "/home/shihai/Downloads/cirros-0.3.4-x86_64-disk.img" %}
---
  GlanceImages.list_images:
    -
      runner:
        type: "constant"
        times: 1
        concurrency: 1
      context:
        users:
          tenants: 2
          users_per_tenant: 2
        images:
          image_url: "{{ cirros_image_url }}"
          image_type: "qcow2"
          image_container: "bare"
          images_per_tenant: 4
      sla:
        failure_rate:
          max: 0

rally would show me a error:
=============================================================================================
2017-03-20 15:06:04.332 27825 INFO rally.plugins.openstack.context.keystone.users [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Starting: Enter context: `users`
2017-03-20 15:06:21.932 27825 INFO rally.plugins.openstack.context.keystone.users [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Completed: Enter context: `users`
2017-03-20 15:06:21.933 27825 INFO rally.plugins.openstack.context.glance.images [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Starting: Enter context: `Images`
2017-03-20 15:06:53.387 27825 INFO rally.plugins.openstack.context.glance.images [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Completed: Enter context: `Images`
2017-03-20 15:06:53.436 28112 INFO rally.task.runner [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | ITER: 1 START
2017-03-20 15:06:56.234 28112 INFO rally.task.runner [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | ITER: 1 END: OK
2017-03-20 15:06:56.291 27825 INFO rally.plugins.openstack.context.cleanup.user [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Starting: user resources cleanup
2017-03-20 15:07:06.157 27825 INFO rally.plugins.openstack.context.cleanup.user [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Completed: user resources cleanup
2017-03-20 15:07:06.158 27825 INFO rally.plugins.openstack.context.glance.images [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Starting: Exit context: `Images`
2017-03-20 15:07:08.765 27825 ERROR rally.task.context [-] Context images failed during cleanup.
2017-03-20 15:07:08.766 27825 ERROR rally.task.context [-] 404 Not Found: Failed to find image 3d085c73-49b3-4bb6-afc3-7ad1fa30bf0a to delete (HTTP 404)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context Traceback (most recent call last):
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/home/shihai/rally/rally/task/context.py", line 183, in cleanup
2017-03-20 15:07:08.766 27825 ERROR rally.task.context ctx.cleanup()
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/home/shihai/rally/rally/common/logging.py", line 197, in wrapper
2017-03-20 15:07:08.766 27825 ERROR rally.task.context result = f(self, *args, **kwargs)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/home/shihai/rally/rally/plugins/openstack/context/glance/images.py", line 134, in cleanup
2017-03-20 15:07:08.766 27825 ERROR rally.task.context clients.glance().images.delete(image)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/utils.py", line 535, in inner
2017-03-20 15:07:08.766 27825 ERROR rally.task.context return RequestIdProxy(wrapped(*args, **kwargs))
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/usr/local/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 238, in delete
2017-03-20 15:07:08.766 27825 ERROR rally.task.context resp, body = self.http_client.delete(url)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 232, in delete
2017-03-20 15:07:08.766 27825 ERROR rally.task.context return self.request(url, 'DELETE', **kwargs)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 342, in request
2017-03-20 15:07:08.766 27825 ERROR rally.task.context return self._handle_response(resp)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 107, in _handle_response
2017-03-20 15:07:08.766 27825 ERROR rally.task.context raise exc.from_response(resp, resp.content)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context HTTPNotFound: 404 Not Found: Failed to find image 3d085c73-49b3-4bb6-afc3-7ad1fa30bf0a to delete (HTTP 404)
2017-03-20 15:07:08.766 27825 ERROR rally.task.context
2017-03-20 15:07:08.770 27825 INFO rally.plugins.openstack.context.keystone.users [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Starting: Exit context: `users`
2017-03-20 15:07:42.493 27825 INFO rally.plugins.openstack.context.keystone.users [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Completed: Exit context: `users`
2017-03-20 15:07:44.368 27825 INFO rally.task.engine [-] Load duration is: 2.794896
2017-03-20 15:07:44.369 27825 INFO rally.task.engine [-] Full runner duration is: 2.889437
2017-03-20 15:07:44.370 27825 INFO rally.task.engine [-] Full duration is: 98.167871
2017-03-20 15:07:44.643 27825 INFO rally.task.engine [-] Task 834cd504-94e1-4a87-9b51-166cb1c1ca5e | Completed: Benchmarking.
=============================================================================================
Because the context and manager have the cleanup operation. We need to check the resource's status in context.
And https://bugs.launchpad.net/rally/+bug/1570920 looks like belonging this problem too.

Tags: cleanup
hai shi (haishi)
Changed in rally:
assignee: nobody → hai shi (haishi)
hai shi (haishi)
Changed in rally:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on rally (master)

Change abandoned by Hai Shi (<email address hidden>) on branch: master
Review: https://review.openstack.org/447408

Revision history for this message
hai shi (haishi) wrote :

After glance-service refactor, it is fine.

Changed in rally:
status: In Progress → Fix Committed
Revision history for this message
zhangzhihui (zhangzhang) wrote :

this bug still exists.

Revision history for this message
hai shi (haishi) wrote :

pls paste your log. Looks we need recheck this probleam.

Changed in rally:
status: Fix Committed → Fix Released
milestone: none → 0.10.0
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.