Description of problem: The parameter cross_az_attach=False is used by default in DCN based deployments [1]. All compute nodes from each DCN site are in one AZ. The DCN HCI setup adds aditionally ceph cluster to the DCN site and there is the AZ with same name created for volume service on the DCN HCI site. The tempest test [2] creates an instance in one AZ, then creates a volume in the same AZ, shelve the instance and tries to attach the volume which fails on: Invalid volume: Instance ce7ecd63-6774-4551-ae09-6fdb8e520814 and volume 9368c908-e0e4-4187-9b6c-766732ffee90 are not in the same availability_zone. Instance is in None. Volume is in az-dcn1' The thing is that once an instance is shleved successfully the attribute OS-EXT-AZ:availability_zone becomes None while before the shelve operation It was az-dcn1. Is that a bug? or simply not supported scenario and tempest test should be modified to take that in account? [1] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/environments/dcn.yaml#L22 [2] https://github.com/openstack/tempest/blob/master/tempest/api/compute/volumes/test_attach_volume.py#L273-L290 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create an Nova AZ and Volume AZ, the same name. 2. Spawn an instance in the Nova AZ, shelve the instance 3. Try to attach the volume to the instance Actual results: It si refused to attach due to AZ incompability Expected results: Needs to be defined Additional info:
I think the LP 1889687 is very related to this one: https://bugs.launchpad.net/tempest/+bug/1647999 where we introduced compute_volume_common_az option -> https://review.opendev.org/#/c/408498/. I assume compute_volume_common_az option should resolve half your issue as I commented within the reviews (744039 and 744040). Let me know what you think, then we can update the review and push it forward.
(In reply to Martin Kopec from comment #5) > I think the LP 1889687 is very related to this one: > https://bugs.launchpad.net/tempest/+bug/1647999 where we introduced > compute_volume_common_az option -> https://review.opendev.org/#/c/408498/. I > assume compute_volume_common_az option should resolve half your issue as I > commented within the reviews (744039 and 744040). Let me know what you > think, then we can update the review and push it forward. The tempest option you mentioned was used the problem is the default behaviour SHELVED instance has no AZ attribute since It does not reside on any compute host, trying to unshelve such instance may fail If cross AZ attach is disable since It may be respawned on a compute host outside of desired AZ.
The fix (Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable) is part of tempest 26.
The fix (Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable) is part of tempest 26. Tempest 26 (openstack-tempest-26.0.0-2.20210121083412.f9d31f2.el8ost) is now available in RHOS-16.2 repos.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2021:3483