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)
Reviewed: https:/ /review. opendev. org/736302 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=408531cf2b0 ae6bd5771046bd0 f73cb795c7d9d4
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 408531cf2b0ae6b d5771046bd0f73c b795c7d9d4
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)
Change-Id: I27b9d4be419e1b
(cherry picked from commit fc51678298a38dc