Bug 1861787 - Attaching volume created in an AZ to a shelved instance fails when cross_az_attach=False
Summary: Attaching volume created in an AZ to a shelved instance fails when cross_az_a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Lee Yarwood
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-29 14:30 UTC by Marian Krcmarik
Modified: 2023-03-21 19:34 UTC (History)
16 users (show)

Fixed In Version: openstack-tempest-26.0.0-2.20210121083412.f9d31f2.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-15 07:08:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1889687 0 None None None 2020-07-30 19:49:06 UTC
OpenStack gerrit 744039 0 None NEW config: Introduce [compute-feature-enabled]/cross_az_attach 2021-01-29 16:25:24 UTC
OpenStack gerrit 744040 0 None MERGED compute: Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable 2021-01-29 16:25:24 UTC
Red Hat Issue Tracker OSP-3157 0 None None None 2022-08-23 18:44:59 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:09:09 UTC

Description Marian Krcmarik 2020-07-29 14:30:04 UTC
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:

Comment 5 Martin Kopec 2020-10-29 09:15:18 UTC
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.

Comment 6 Marian Krcmarik 2020-11-02 18:00:08 UTC
(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.

Comment 7 Martin Kopec 2021-01-18 14:58:25 UTC
The fix (Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable) is part of tempest 26.

Comment 10 Martin Kopec 2021-01-29 16:33:13 UTC
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.

Comment 14 errata-xmlrpc 2021-09-15 07:08:45 UTC
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


Note You need to log in before you can comment on or make changes to this bug.