Reviewed: https://review.openstack.org/290741 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=def8cfdeef4e3d086ad045a063421a61468e3cb6 Submitter: Jenkins Branch: master
commit def8cfdeef4e3d086ad045a063421a61468e3cb6 Author: Niall Bunting <[email protected]> Date: Wed Mar 9 18:13:44 2016 +0000 Copy the size of the tag set As the tags are being removed it can cause the removal of the current tag when running tests. Causing a RuntimeError to be thrown. This change makes a temporary list whilst the tags are being deleted. Co-Authored-By: Tom Cocozzello <[email protected]> Change-Id: I3cac9060b87449503fba3995d10f8d4e074bffb8 Closes-Bug: 1555275 ** Changed in: glance Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1555275 Title: Tags set changes on delete Status in Glance: Fix Released Bug description: When working on a new test I ran into this, the set should not fail due the tags being deleted. ====================================================================== FAIL: glance.tests.unit.v2.test_images_resource.TestImagesController.test_delete_deactivated_images_anyone tags: worker-0 ---------------------------------------------------------------------- Traceback (most recent call last): File "glance/tests/unit/v2/test_images_resource.py", line 2034, in test_delete_deactivated_images_anyone self.controller.delete(request, UUID1) File "glance/common/utils.py", line 362, in wrapped return func(self, req, *args, **kwargs) File "glance/api/v2/images.py", line 236, in delete image_repo.remove(image) File "glance/domain/proxy.py", line 104, in remove result = self.base.remove(base_item) File "glance/notifier.py", line 487, in remove super(ImageRepoProxy, self).remove(image) File "glance/domain/proxy.py", line 104, in remove result = self.base.remove(base_item) File "glance/domain/proxy.py", line 104, in remove result = self.base.remove(base_item) File "glance/domain/proxy.py", line 104, in remove result = self.base.remove(base_item) File "glance/domain/proxy.py", line 104, in remove result = self.base.remove(base_item) File "glance/db/__init__.py", line 294, in remove new_values = self.db_api.image_destroy(self.context, image.image_id) File "glance/db/simple/api.py", line 64, in wrapped output = func(*args, **kwargs) File "glance/db/simple/api.py", line 761, in image_destroy for tag in tags: RuntimeError: Set changed size during iteration To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1555275/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

