← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1648574] Re: ImageNotFound should not trace exception in delete_image_on_error decorator

 

Reviewed:  https://review.openstack.org/408771
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2bb70e7b15e6cfef4652e2e49c4e02d151d2dbdf
Submitter: Jenkins
Branch:    master

commit 2bb70e7b15e6cfef4652e2e49c4e02d151d2dbdf
Author: Matt Riedemann <mriedem@xxxxxxxxxx>
Date:   Thu Dec 8 13:44:54 2016 -0500

    Don't trace on ImageNotFound in delete_image_on_error
    
    The point of the delete_image_on_error decorator is to
    cleanup an image used during snapshot operations, so it
    makes little sense to log an exception trace if the image
    delete fails because the image no longer exists, which it
    might not since _snapshot_instance method will proactively
    delete non-active images in certain situations.
    
    So let's just handle the ImageNotFound and ignore it.
    
    Change-Id: I14e061a28678ad28e38bd185e3d0a35cae41a9cf
    Closes-Bug: #1648574


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1648574

Title:
  ImageNotFound should not trace exception in delete_image_on_error
  decorator

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) newton series:
  In Progress

Bug description:
  As seen here:

  http://logs.openstack.org/69/405969/4/check/gate-tempest-dsvm-neutron-
  src-neutron-lib-ubuntu-
  xenial/04c26f3/logs/screen-n-cpu.txt?level=TRACE#_2016-12-07_06_42_10_616

  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [req-fdc419c6-edf0-4b3c-89ac-1e376a5b64e5 tempest-ImagesTestJSON-2099199377 tempest-ImagesTestJSON-2099199377] [instance: a2e32d10-4374-45c5-a732-af3459f2950d] Error while trying to clean up image dd2d2646-16a5-4135-8ff7-a3b255e01cd9
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d] Traceback (most recent call last):
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]   File "/opt/stack/new/nova/nova/compute/manager.py", line 238, in decorated_function
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]     self.image_api.delete(context, image_id)
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]   File "/opt/stack/new/nova/nova/image/api.py", line 141, in delete
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]     return session.delete(context, image_id)
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]   File "/opt/stack/new/nova/nova/image/glance.py", line 765, in delete
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d]     raise exception.ImageNotFound(image_id=image_id)
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d] ImageNotFound: Image dd2d2646-16a5-4135-8ff7-a3b255e01cd9 could not be found.
  2016-12-07 06:42:10.616 32194 ERROR nova.compute.manager [instance: a2e32d10-4374-45c5-a732-af3459f2950d] 

  The snapshot_instance method in the nova compute manager is decorated
  with the delete_image_on_error method which is meant to delete an
  image snapshot in glance if something fails during the snapshot/image
  upload process. The thing is it's a cleanup decorator, and if glance
  raises ImageNotFound, then we don't care, we shouldn't emit a
  stacktrace in that case.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1648574/+subscriptions


References