Wait volume available before deleting them in functional test

Bug #1698085 reported by Rui Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
In Progress
Undecided
Rui Chen

Bug Description

In openstackclient.tests.functional.compute.v2.test_server.ServerTests.test_server_boot_from_volume, server is deleted, then delete the volumes attached on server immediately in clean up logic, but in some slow CI host, the volume is still in dettaching process, it's not available status, deleting volume would failed, like this, we need to add some "waiting for" logic.

ft1.3: openstackclient.tests.functional.compute.v2.test_server.ServerTests.test_server_boot_from_volume_StringException: traceback-1: {{{
Traceback (most recent call last):
  File "openstackclient/tests/functional/base.py", line 64, in openstack
    return execute('openstack ' + cmd, fail_ok=fail_ok)
  File "openstackclient/tests/functional/base.py", line 41, in execute
    result_err)
tempest.lib.exceptions.CommandFailed: Command 'openstack volume delete f73f7e5fd7444db2921533a8172a54ec' returned non-zero exit status 1.
stdout:

stderr:
Failed to delete volume with name or ID 'f73f7e5fd7444db2921533a8172a54ec': Invalid volume: Volume status must be available or error or error_restoring or error_extending or error_managing and must not be migrating, attached, belong to a group or have snapshots. (HTTP 400) (Request-ID: req-0eb8b8f3-c229-429a-926f-f3d44b70c753)
1 of 1 volumes failed to delete.
}}}

traceback-2: {{{
Traceback (most recent call last):
  File "openstackclient/tests/functional/base.py", line 64, in openstack
    return execute('openstack ' + cmd, fail_ok=fail_ok)
  File "openstackclient/tests/functional/base.py", line 41, in execute
    result_err)
tempest.lib.exceptions.CommandFailed: Command 'openstack volume delete 7011252e9d494fd6ba2b3292a396f2d0' returned non-zero exit status 1.
stdout:

stderr:
Failed to delete volume with name or ID '7011252e9d494fd6ba2b3292a396f2d0': Invalid volume: Volume status must be available or error or error_restoring or error_extending or error_managing and must not be migrating, attached, belong to a group or have snapshots. (HTTP 400) (Request-ID: req-c1de0e0d-c9ab-4e83-b78a-efb8a0b191a1)
1 of 1 volumes failed to delete.
}}}

Traceback (most recent call last):
  File "openstackclient/tests/functional/compute/v2/test_server.py", line 340, in test_server_boot_from_volume
    server_name
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Rui Chen (kiwik-chenrui)
Changed in python-openstackclient:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
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.