Bug 1731276
| Summary: | [OSP14] Detaching second instance from a multiattached 3PAR volume leaves volume in detaching state | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Alan Bishop <abishop> |
| Component: | openstack-cinder | Assignee: | Alan Bishop <abishop> |
| Status: | CLOSED ERRATA | QA Contact: | Tzach Shefi <tshefi> |
| Severity: | medium | Docs Contact: | Chuck Copello <ccopello> |
| Priority: | medium | ||
| Version: | 14.0 (Rocky) | CC: | abishop, ccopello, cswanson, eharney, pgrist, rheslop, shdunne, slinaber, sneha.rai, tshefi |
| Target Milestone: | z4 | Keywords: | Triaged, ZStream |
| Target Release: | 14.0 (Rocky) | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | openstack-cinder-13.0.5-5.el7ost | Doc Type: | Bug Fix |
| Doc Text: |
This patch fixes the 3PAR driver's attach/detach code that under certain circumstances, would fail to maintain a volume's correct connection status when multiple instances are attached.
|
Story Points: | --- |
| Clone Of: | 1731275 | Environment: | |
| Last Closed: | 2019-09-03 15:22:23 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1731275 | ||
| Bug Blocks: | 1708705, 1713669, 1725012 | ||
|
Description
Alan Bishop
2019-07-18 20:48:44 UTC
Verified on:
openstack-cinder-13.0.5-5.el7ost.noarch
Configure 3par iscsi as Cinder's backend:
(overcloud) [stack@undercloud-0 ~]$ cinder service-list
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-backup | controller-1 | nova | enabled | up | 2019-08-20T07:36:14.000000 | - |
| cinder-scheduler | controller-0 | nova | enabled | up | 2019-08-20T07:36:14.000000 | - |
| cinder-scheduler | controller-1 | nova | enabled | up | 2019-08-20T07:36:12.000000 | - |
| cinder-scheduler | controller-2 | nova | enabled | up | 2019-08-20T07:36:08.000000 | - |
| cinder-volume | controller-0@3par | nova | enabled | up | 2019-08-20T07:36:13.000000 | - |
(overcloud) [stack@undercloud-0 ~]$ cinder type-create multiattach
+--------------------------------------+-------------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+-------------+-------------+-----------+
| 785fb68c-7b2e-453c-aca4-68d16dc28fab | multiattach | - | True |
+--------------------------------------+-------------+-------------+-----------+
(overcloud) [stack@undercloud-0 ~]$ cinder type-key multiattach set multiattach="<is> True"
(overcloud) [stack@undercloud-0 ~]$ cinder type-key multiattach set volume_backend_name=3par
(overcloud) [stack@undercloud-0 ~]$ cinder create 1 --volume-type multiattach
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2019-08-20T07:35:12.000000 |
| description | None |
| encrypted | False |
| id | 5cbc4920-6bbe-4045-981c-e298dfb6a85b |
| metadata | {} |
| migration_status | None |
| multiattach | True |
| name | None |
| os-vol-host-attr:host | controller-0@3par#SSD_r5 |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 5d709c2af9044a9d9fbee83ee81157a2 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2019-08-20T07:35:13.000000 |
| user_id | 6f3cf8f602e64e4dbf94c4a9ffc0c122 |
| volume_type | multiattach |
+--------------------------------+--------------------------------------+
Boot two instances:
(overcloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+
| d21f8b47-54a2-4948-8ece-793797bf64ab | inst1 | ACTIVE | - | Running | internal=192.168.0.16, 10.0.0.211 |
| 975aea99-d6a6-4f25-ad81-c60192e1dc32 | inst2 | ACTIVE | - | Running | internal=192.168.0.20, 10.0.0.215 |
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+
Attach said volume to both instances:
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst1 5cbc4920-6bbe-4045-981c-e298dfb6a85b auto
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdb |
| id | 5cbc4920-6bbe-4045-981c-e298dfb6a85b |
| serverId | d21f8b47-54a2-4948-8ece-793797bf64ab |
| volumeId | 5cbc4920-6bbe-4045-981c-e298dfb6a85b |
+----------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst2 5cbc4920-6bbe-4045-981c-e298dfb6a85b auto
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdb |
| id | 5cbc4920-6bbe-4045-981c-e298dfb6a85b |
| serverId | 975aea99-d6a6-4f25-ad81-c60192e1dc32 |
| volumeId | 5cbc4920-6bbe-4045-981c-e298dfb6a85b |
+----------+--------------------------------------+
Both instances attached to same volume:
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+--------+------+------+-------------+----------+---------------------------------------------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+---------------------------------------------------------------------------+
| 5cbc4920-6bbe-4045-981c-e298dfb6a85b | in-use | - | 1 | multiattach | false | 975aea99-d6a6-4f25-ad81-c60192e1dc32,d21f8b47-54a2-4948-8ece-793797bf64ab |
+--------------------------------------+--------+------+------+-------------+----------+---------------------------------------------------------------------------+
Detach inst2 from volume first:
(overcloud) [stack@undercloud-0 ~]$ nova volume-detach inst2 5cbc4920-6bbe-4045-981c-e298dfb6a85b
inst2 detached, only isnt1 remains attached
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 5cbc4920-6bbe-4045-981c-e298dfb6a85b | in-use | - | 1 | multiattach | false | d21f8b47-54a2-4948-8ece-793797bf64ab |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
Now detach inst1
(overcloud) [stack@undercloud-0 ~]$ nova volume-detach inst1 5cbc4920-6bbe-4045-981c-e298dfb6a85b
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 5cbc4920-6bbe-4045-981c-e298dfb6a85b | available | - | 1 | multiattach | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
Successfully detach both instances from multiattach volume 3par iscsi volume.
Good to verify.
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, 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/RHBA-2019:2618 |