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.
Reviewed: https:/ /review. opendev. org/730830 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=fc51678298a 38dcd94bcfe92c5 90b38fdb7193e4
Committed: https:/
Submitter: Zuul
Branch: master
commit fc51678298a38dc d94bcfe92c590b3 8fdb7193e4
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
Change-Id: I27b9d4be419e1b