After live migrating a volume into the 3PAR driver the volume would be
unusable. And we would no longer be able to do any operation with it.
Migrated in-use volumes cannot be renamed when migrated and therefore
need to use the "_name_id" field of the Volume object (volumes table in
the DB) to store the original volume's ID so the driver can locate the
volume.
The problem is that, even though the 3PAR driver sets the "_name_id"
field, it doesn't use it for any operation, so once the volume has been
migrated and the ID of the volume no longer matches the one that was
used to create the volume (value now in "_name_id") it will no longer be
able to locate the volume.
This patch adds the logic necessary to locate volumes using the
"_name_id" field.
Closes-Bug: #1697422
Change-Id: I27b9d4be419e1b52db02d4525b292ceeb5d5f867
(cherry picked from commit fc51678298a38dcd94bcfe92c590b38fdb7193e4)
(cherry picked from commit cfde6bd1c0129de86ce123c15742d948624b478f)
Conflicts: cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py cinder/volume/drivers/hpe/hpe_3par_common.py cinder/volume/drivers/hpe/hpe_3par_iscsi.py
Reviewed: https:/ /review. opendev. org/739468 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=ce907746784 6fdb08d2de819ea 6db7ef0fb99516
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit ce9077467846fdb 08d2de819ea6db7 ef0fb99516
Author: Gorka Eguileor <email address hidden>
Date: Tue May 19 14:01:13 2020 +0200
3PAR: Fix live migration
After live migrating a volume into the 3PAR driver the volume would be
unusable. And we would no longer be able to do any operation with it.
Migrated in-use volumes cannot be renamed when migrated and therefore
need to use the "_name_id" field of the Volume object (volumes table in
the DB) to store the original volume's ID so the driver can locate the
volume.
The problem is that, even though the 3PAR driver sets the "_name_id"
field, it doesn't use it for any operation, so once the volume has been
migrated and the ID of the volume no longer matches the one that was
used to create the volume (value now in "_name_id") it will no longer be
able to locate the volume.
This patch adds the logic necessary to locate volumes using the
"_name_id" field.
Closes-Bug: #1697422 52db02d4525b292 ceeb5d5f867 d94bcfe92c590b3 8fdb7193e4) 86ce123c15742d9 48624b478f)
cinder/ tests/unit/ volume/ drivers/ hpe/test_ hpe3par. py
cinder/ volume/ drivers/ hpe/hpe_ 3par_common. py
cinder/ volume/ drivers/ hpe/hpe_ 3par_iscsi. py
Change-Id: I27b9d4be419e1b
(cherry picked from commit fc51678298a38dc
(cherry picked from commit cfde6bd1c0129de
Conflicts: