Cinder Tempest test_encrypted_cinder_volumes_cryptsetup randomly fails with {"code": 400, "message": "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be \'in-use\' and attach_status must be \'attached\' to detach. (HTTP 400) (Request-ID: req-8b4f3ddf-2bda-46ad-ad2b-71be67413523)"}. This is not the only test that fails with the same error, sometimes other tests fails with the same error.
This seems to be handled in https://bugs.launchpad.net/tempest/+bug/1722577, so after further investigation, it turned out that the issue is in the nova_volume_attach function, where the cleanup is actually added twice for a one attach command, once in self.servers_client.attach_volume found in [1], and then added another time in the nova_volume_attach function itself found at [2].
The mentioned bug is only handled in [1] but not [2].
Further Logs can be found at [3].
[1] https://github.com/openstack/tempest/blob/b2c04d4c502725f50ba3ce879911ad9610476b25/tempest/api/compute/base.py#L578
[2] https://github.com/openstack/tempest/blob/2c3da54a82e8844ea575c93576324855793738e1/tempest/scenario/manager.py#L736
[3] http://13.74.249.42/437/Cinder-tgtadm-Daily/
Yup another hit below:
https:/ /1b330c50dd371d 8d6f8e- c67b93b429db847 69e417a4684ceff a6.ssl. cf2.rackcdn. com/757111/ 9/check/ nova-multi- cell/fce0115/ testr_results. html
I've pushed a change to drop the cleanup from nova_volume_attach below:
https:/ /review. opendev. org/c/openstack /tempest/ +/767515