HPE 3PAR: migrating the vm attached with volume has been retyped will cause old volume attach back again
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Medium
|
Unassigned |
Bug Description
# Description
Cinder is configured with two backends, both are HPE 3PAR, but with different cpg, one is ssd, another is hdd, then create two corresponding volume types. VMs are all booted from volume, for the capacity reason, we need retype some bootable volumes attached to active vms from one type to another, after retyping, it seems to be working well, the volume type has changed without downtime, except that the temporary volume created during retyping won't be deleted. After a happy time, we do migration to these vms, after that, we found some data on the volume has been lost, but in the end, we found the "lost data" actually on the temporary volume created during retyping.
# Environment
OpenStack is rocky, but after some code investigation, I think this problem is still on the master.
cinder.conf
[DEFAULT]
enabled_backends = 3parfc-1,3parssd-1
[3parfc-1]
backend_host = control
volume_driver = cinder.
volume_backend_name = 3parfc-1
hpe3par_api_url = https:/
hpe3par_username = <username>
hpe3par_password = <password>
hpe3par_cpg = FC_r6
san_ip = 192.168.0.10
san_login = <username>
san_password = <password>
max_over_
reserved_percentage = 15
image_volume_
image_upload_
image_upload_
[3parssd-1]
backend_host = control
volume_driver = cinder.
volume_backend_name = 3parssd-1
hpe3par_api_url = https:/
hpe3par_username = <username>
hpe3par_password = <password>
hpe3par_cpg = SSD_r6
san_ip = 192.168.0.10
san_login = <username>
san_password = <password>
max_over_
reserved_percentage = 15
image_volume_
image_upload_
image_upload_
# How to Reproduce
## before retype:
[root@control01 ~]# cinder list | grep nice
| 4e59408d-
[root@control01 ~]# cinder show 4e59408d-
+------
| Property | Value |
+------
| attached_servers | ['07715bd4-
| attachment_ids | ['82074978-
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | None |
| encrypted | False |
| id | 4e59408d-
| metadata | |
| migration_status | None |
| multiattach | False |
| name | nice |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 500 |
| snapshot_id | None |
| source_volid | None |
| status | in-use |
| updated_at | 2021-11-
| user_id | c6eaad2425fa4d1
| volume_type | 3parssd |
+------
hpe
* name: TllAjaUXRsmFiZH
* lun: 21
* WWN: 60002AC00000000
[root@compute03 ~]# docker exec -it nova_libvirt virsh domblklist 2
目标 源
-------
vda /dev/disk/
vdb /dev/disk/
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-21
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
[root@compute03 ~]# ll /dev/disk/by-id/ | grep -i 60002AC00000000
lrwxrwxrwx. 1 root root 11 Nov 9 18:58 dm-uuid-
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 scsi-360002ac00
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 wwn-0x60002ac00
## during retype:
[root@control01 ~]# cinder list | grep nice
| 1829e4f0-
| 4e59408d-
[root@control01 ~]# cinder show 4e59408d-
+------
| Property | Value |
+------
| attached_servers | ['07715bd4-
| attachment_ids | ['82074978-
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | None |
| encrypted | False |
| id | 4e59408d-
| metadata | |
| migration_status | migrating |
| multiattach | False |
| name | nice |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 500 |
| snapshot_id | None |
| source_volid | None |
| status | retyping |
| updated_at | 2021-11-
| user_id | c6eaad2425fa4d1
| volume_type | 3parssd |
+------
[root@control01 ~]# cinder show 1829e4f0-
+------
| Property | Value |
+------
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | None |
| encrypted | False |
| id | 1829e4f0-
| metadata | |
| migration_status | target:
| multiattach | False |
| name | nice |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 500 |
| snapshot_id | None |
| source_volid | None |
| status | attaching |
| updated_at | 2021-11-
| user_id | c6eaad2425fa4d1
| volume_type | 3parfc |
+------
hpe:
* name: TllAjaUXRsmFiZH
* lun: 21
* WWN: 60002AC00000000
* name: GCnk8GDRT2uzfe0
* lun: 22
* wwn: 60002AC00000000
[root@compute03 ~]# docker exec -it nova_libvirt virsh blockjob 2 /dev/disk/
块复制: [ 4 %]
[root@compute03 ~]# docker exec -it nova_libvirt virsh domblklist 2 目标 源
-------
vda /dev/disk/
vdb /dev/disk/
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-21
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 9 18:58 pci-0000:
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-22
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
avg-cpu: %user %nice %system %iowait %steal %idle
2.12 0.00 1.30 0.00 0.00 96.58
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
dm-22 0.00 0.00 119.00 0.00 119.00 0.00 2048.00 0.24 1.98 1.98 0.00 0.73 8.70
dm-47 0.00 0.00 0.00 119.00 0.00 119.00 2048.00 15.74 128.50 0.00 128.50 8.40 100.00
## after retype:
[root@control01 ~]# cinder list | grep nice
| 1829e4f0-
| 4e59408d-
[root@control01 ~]# cinder show 1829e4f0-
+------
| Property | Value |
+------
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | migration src for 4e59408d-
| encrypted | False |
| id | 1829e4f0-
| metadata | |
| migration_status | deleting |
| multiattach | False |
| name | nice |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 500 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2021-11-
| user_id | c6eaad2425fa4d1
| volume_type | 3parfc |
+------
[root@control01 ~]# cinder show 4e59408d-
+------
| Property | Value |
+------
| attached_servers | ['07715bd4-
| attachment_ids | ['330ee88e-
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-
| description | None |
| encrypted | False |
| id | 4e59408d-
| metadata | |
| migration_status | success |
| multiattach | False |
| name | nice |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 500 |
| snapshot_id | None |
| source_volid | None |
| status | in-use |
| updated_at | 2021-11-
| user_id | c6eaad2425fa4d1
| volume_type | 3parfc |
+------
hpe:
* name: TllAjaUXRsmFiZH
* lun: there is no export
* WWN: 60002AC00000000
* name: GCnk8GDRT2uzfe0
* lun: 22
* wwn: 60002AC00000000
[root@compute03 ~]# docker exec -it nova_libvirt virsh domblklist 2
目标 源
-------
vda /dev/disk/
vdb /dev/disk/
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-21
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-22
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 10:51 pci-0000:
## after migration or detach/attach:
[root@compute03 ~]# docker exec -it nova_libvirt virsh domblklist 7
目标 源
-------
vda /dev/disk/
vdb /dev/disk/
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-22
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-21
[root@compute03 ~]# ll /dev/disk/by-path/ | grep lun-21
lrwxrwxrwx. 1 root root 10 Nov 10 12:03 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 12:03 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 12:03 pci-0000:
lrwxrwxrwx. 1 root root 10 Nov 10 12:03 pci-0000:
hpe:
* name: TllAjaUXRsmFiZH
* lun: 21
* WWN: 60002AC00000000
* name: GCnk8GDRT2uzfe0
* lun: 22
* wwn: 60002AC00000000
description: | updated |
description: | updated |
tags: | added: 3par attach hpe migrate retype volume |
Changed in cinder: | |
importance: | Undecided → Medium |