Hp3par:after volume retyped or migrated, the volume can not work normally.such as clone,create snapshot attach,detach and so on.

Bug #1697422 reported by jingtao liang
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

Version :the newest
reproduce:
1 create a volume A .
2 attach A to an instance.
3 migrate A to another host.
4 Then use A do clone,create snapshot or others.

reasons:

After volume retyped,swap src and dest volume DB records so we can continue using the src id and asynchronously delete the destination id.But the volume name on hp3par has not change.So we can not get the exact volume name from the changed volume id.Function is as follows:
 def _get_3par_vol_name(self, volume_id):
        """Get converted 3PAR volume name.

        Converts the openstack volume id from
        ecffc30f-98cb-4cf5-85ee-d7309cc17cd2
        to
        osv-7P.DD5jLTPWF7tcwnMF80g

        We convert the 128 bits of the uuid into a 24character long
        base64 encoded string to ensure we don't exceed the maximum
        allowed 31 character name limit on 3Par

        We strip the padding '=' and replace + with .
        and / with -
        """
        volume_name = self._encode_name(volume_id)
        return "osv-%s" % volume_name

Like create,delete .These action will get volume name by volume_id.Then can not get the right volume.

I hope someone can notice the problem.Tks

Revision history for this message
jingtao liang (liang-jingtao) wrote :

related bug:1696906

summary: - Hp3par:after volume retyped or migrate, the volume can not work
+ Hp3par:after volume retyped or migrated, the volume can not work
normally.such as clone,create snapshot attach,detach and so on.
description: updated
Changed in cinder:
status: New → Confirmed
status: Confirmed → New
Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/730830

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/730830
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fc51678298a38dcd94bcfe92c590b38fdb7193e4
Submitter: Zuul
Branch: master

commit fc51678298a38dcd94bcfe92c590b38fdb7193e4
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
    Change-Id: I27b9d4be419e1b52db02d4525b292ceeb5d5f867

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/736302

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/736303

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ussuri)

Reviewed: https://review.opendev.org/736302
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=408531cf2b0ae6bd5771046bd0f73cb795c7d9d4
Submitter: Zuul
Branch: stable/ussuri

commit 408531cf2b0ae6bd5771046bd0f73cb795c7d9d4
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
    Change-Id: I27b9d4be419e1b52db02d4525b292ceeb5d5f867
    (cherry picked from commit fc51678298a38dcd94bcfe92c590b38fdb7193e4)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/train)

Reviewed: https://review.opendev.org/736303
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=cfde6bd1c0129de86ce123c15742d948624b478f
Submitter: Zuul
Branch: stable/train

commit cfde6bd1c0129de86ce123c15742d948624b478f
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
    Change-Id: I27b9d4be419e1b52db02d4525b292ceeb5d5f867
    (cherry picked from commit fc51678298a38dcd94bcfe92c590b38fdb7193e4)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/739468

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/740931

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/stein)

Reviewed: https://review.opendev.org/739468
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ce9077467846fdb08d2de819ea6db7ef0fb99516
Submitter: Zuul
Branch: stable/stein

commit ce9077467846fdb08d2de819ea6db7ef0fb99516
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
    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

tags: added: in-stable-stein
Eric Harney (eharney)
tags: added: 3par
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.