addCleanup is missing from create snapshot test

Bug #1351441 reported by Xing Yang on 2014-08-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Xing Yang

Bug Description

addCleanup is missing from the create snapshot test. Because of that, the test didn't wait for delete snapshot to complete and therefore causing the failure "Invalid volume: Volume still has 1 dependent snapshots" when it tried to delete the volume.

This failure occurred in the following tests:
tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern [2500.007672s] ... FAILED
tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern [1104.077430s] ... FAILED

When the DELETE snapshot is issued, it fails to poll for status "Not Found" like DELETE volume and DELETE server. There are 14 seconds between the DELETE snapshot and DELETE source volume which is not enough time for a successful DELETE snapshot to complete.

Xing Yang (xing-yang) on 2014-08-01
Changed in tempest:
assignee: nobody → Xing Yang (xing-yang)

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

Changed in tempest:
status: New → In Progress
Xing Yang (xing-yang) wrote :

Here are the errors we see without this fix. Delete snapshot didn't wait for snapshot to be deleted successfully. Delete volume failed because there was still dependent snapshot.

04:32:55 Captured traceback-2:
04:32:55 ~~~~~~~~~~~~~~~~~~~~~
04:32:55 Traceback (most recent call last):
04:32:55 File "tempest/scenario/manager.py", line 250, in delete_timeout
04:32:55 not_found_exception=not_found_exception)
04:32:55 File "tempest/scenario/manager.py", line 298, in _status_timeout
04:32:55 CONF.compute.build_interval):
04:32:55 File "tempest/test.py", line 627, in call_until_true
04:32:55 time.sleep(sleep_for)
04:32:55 File "/usr/local/lib/python2.7/dist-packages/fixtures/_fixtures/timeout.py", line 52, in signal_handler
04:32:55 raise TimeoutException()
04:32:55 TimeoutException
04:32:55
04:32:55
04:32:55 Captured traceback-3:
04:32:55 ~~~~~~~~~~~~~~~~~~~~~
04:32:55 Traceback (most recent call last):
04:32:55 File "tempest/scenario/manager.py", line 191, in _wait_for_cleanups
04:32:55 self.delete_timeout(**wait)
04:32:55 File "tempest/scenario/manager.py", line 250, in delete_timeout
04:32:55 not_found_exception=not_found_exception)
04:32:55 File "tempest/scenario/manager.py", line 301, in _status_timeout
04:32:55 raise exceptions.TimeoutException(message)
04:32:55 TimeoutException: Request timed out
04:32:55 Details: Timed out waiting for thing e37de26e-f415-4e00-bdb4-d1e06b576dad to become NotFound
04:32:55
04:32:55
04:32:55 Captured traceback-1:
04:32:55 ~~~~~~~~~~~~~~~~~~~~~
04:32:55 Traceback (most recent call last):
04:32:55 File "/opt/stack/new/python-cinderclient/cinderclient/v1/volumes.py", line 228, in delete
04:32:55 self._delete("/volumes/%s" % base.getid(volume))
04:32:55 File "/opt/stack/new/python-cinderclient/cinderclient/base.py", line 162, in _delete
04:32:55 resp, body = self.api.client.delete(url)
04:32:55 File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 333, in delete
04:32:55 return self._cs_request(url, 'DELETE', **kwargs)
04:32:55 File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 290, in _cs_request
04:32:55 **kwargs)
04:32:55 File "/opt/stack/new/python-cinderclient/cinderclient/client.py", line 273, in request
04:32:55 raise exceptions.from_response(resp, body)
04:32:55 BadRequest: Invalid volume: Volume still has 1 dependent snapshots (HTTP 400) (Request-ID: req-9e47bce4-daf4-4ecd-84c0-3e90d6a75675)
04:32:55

Joseph Lanoux (joseph-lanoux) wrote :

This issue will be addressed in the migration of the scenario tests that is under progress: https://etherpad.openstack.org/p/tempest-client-scenarios.

Joseph Lanoux (joseph-lanoux) wrote :

Migration of test_volume_boot_pattern: https://review.openstack.org/#/c/112535/

Changed in tempest:
status: In Progress → Fix Committed

Change abandoned by xing-yang (<email address hidden>) on branch: master
Review: https://review.openstack.org/111373
Reason: Abandon the patch as it is fixed in a different patch.

Changed in tempest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers