can not create share group from share group snapshot

Bug #2090947 reported by Pavlo Shchelokovskyy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
manila-ui
Fix Released
Undecided
Pavlo Shchelokovskyy

Bug Description

Repro:

- create a share group type if none is available, share network etc
- create a share group
- create a snapshot of share group
- try to create share group from snapshot

fails with "Unable to create a share group" right in the form, form is not submitted.

After some debugging, this looks like aftermath of
https://review.opendev.org/q/Id924fc55debdc38ae2131bf8cef396f28caa3e77

when we create a share group from snapshot, we fetch the share group type id of the original share group the snapshot was made of, and it is naturally a UUID, with dashes etc.

Then the transform_dashed_name is applied, which corrupts it, example

>>> transform_dashed_name("c6c70fa8-5c31-422a-a6ff-d585796aca89")
mm3ggnzqmzqtqljvmmztcljugizgcllbgztgmllegu4dknzzgzqwgyjyhe______

which then of course breaks the API request as there's no such share group type.

Changed in manila-ui:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila-ui/+/936972

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

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/936972
Committed: https://opendev.org/openstack/manila-ui/commit/a5143fa6128643612787a4524534e01e9bb59153
Submitter: "Zuul (22348)"
Branch: master

commit a5143fa6128643612787a4524534e01e9bb59153
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Tue Dec 3 18:19:17 2024 +0200

    Fix creation of share group from snapshot

    currently the transform_dashed_name is always applied
    to the share group type while handling the CreateShareGroupForm.

    But when the shared group is created from snapshot,
    the share group type is fetched from actual source share group,
    in UUID form.
    As the UUID naturally contains dashes, transform_dashed_name
    just mangles it, breaking creation of share group from
    share group snapshot.

    Only apply the transform_dashed_name when no snapshot_id
    was provided.

    Closes-Bug: #2090947
    Change-Id: Ie6354ff4c0d49107fdfec47821e0f9e3275e1b51

Changed in manila-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 13.0.0.0rc1

This issue was fixed in the openstack/manila-ui 13.0.0.0rc1 Epoxy release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (stable/2024.2)

Fix proposed to branch: stable/2024.2
Review: https://review.opendev.org/c/openstack/manila-ui/+/945722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-ui (stable/2024.2)

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/945722
Committed: https://opendev.org/openstack/manila-ui/commit/a38158aa54739d40389eb2d2affa860e7bed4a35
Submitter: "Zuul (22348)"
Branch: stable/2024.2

commit a38158aa54739d40389eb2d2affa860e7bed4a35
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Tue Dec 3 18:19:17 2024 +0200

    Fix creation of share group from snapshot

    currently the transform_dashed_name is always applied
    to the share group type while handling the CreateShareGroupForm.

    But when the shared group is created from snapshot,
    the share group type is fetched from actual source share group,
    in UUID form.
    As the UUID naturally contains dashes, transform_dashed_name
    just mangles it, breaking creation of share group from
    share group snapshot.

    Only apply the transform_dashed_name when no snapshot_id
    was provided.

    Closes-Bug: #2090947
    Change-Id: Ie6354ff4c0d49107fdfec47821e0f9e3275e1b51
    (cherry picked from commit a5143fa6128643612787a4524534e01e9bb59153)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/manila-ui/+/945890

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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