Unable to select share networks with share types that have a hyphen in their name

Bug #1931641 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
manila-ui
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

This issue was observed in Red Hat OpenStack Platform 16.1.
When using the "Create share" form, the "Share Network" label and associated Select widget appears only if a Share type that has "driver_handles_share_servers=True" is selected. However, it was observed that this widget isn't presented for some share types, despite having the driver_handles_share_servers=True extra-spec.

Screenshots:

Share types: https://imgur.com/ZNalPbk

Create Share form with a share type that presents the Share network selection widget: https://imgur.com/a/ujMP8OI

Create Share form with a share type that must present the Share network selection widget, but doesnt: https://imgur.com/a/6tUZRsK

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Red Hat OpenStack Platform 16.1 translates to OpenStack Manila UI's train release: https://opendev.org/openstack/manila-ui/src/branch/stable/train/

If you look at the browser's inspector logs, it appears that the share networks are populated, but hidden: https://imgur.com/a/9ReoIcA

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

The issue isn't reproducible on devstack with stable/train branch code: https://imgur.com/a/cmnBQgg

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/+/796384

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

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

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

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

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

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

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

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

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

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

commit b7d87e886a1d71e02034b7dde9b96be3beabdb6a
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Jun 15 00:02:09 2021 -0700

    Fix parsing names in switched fields

    In the share creation form dialog, share network
    selection is optionally provided based on whether
    the share type chosen supports the DHSS extra-spec.
    This selection breaks often when dealing with share
    types that have a name matching the format: ".*-\d+.*".
    For example: test-700. The root cause of this seems to
    be in javascript code for "switchable" fields [1] that
    doesn't get triggered as expected.

    A similar issue manifests in the share Network Creation
    form where we setup switched fields with the Neutron
    network IDs (dashed format UUIDs) and in the Share
    Group Creation form where we setup switched fields
    with the Share Group Type IDs (dashed format UUIDs).

    So, we could encode the "-" in these field names to
    workaround this issue.

    Closes-Bug: #1931641
    [1] https://opendev.org/openstack/horizon/src/commit/647c2b7530f81c4a534ef1d403aa3d90ae608442/horizon/static/horizon/js/horizon.forms.js#L491-L613

    Change-Id: Id924fc55debdc38ae2131bf8cef396f28caa3e77
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 37e5b2f0530c9fe8117cea0dac95577b912bdecc)

tags: added: in-stable-wallaby
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/+/796384
Committed: https://opendev.org/openstack/manila-ui/commit/37e5b2f0530c9fe8117cea0dac95577b912bdecc
Submitter: "Zuul (22348)"
Branch: master

commit 37e5b2f0530c9fe8117cea0dac95577b912bdecc
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Jun 15 00:02:09 2021 -0700

    Fix parsing names in switched fields

    In the share creation form dialog, share network
    selection is optionally provided based on whether
    the share type chosen supports the DHSS extra-spec.
    This selection breaks often when dealing with share
    types that have a name matching the format: ".*-\d+.*".
    For example: test-700. The root cause of this seems to
    be in javascript code for "switchable" fields [1] that
    doesn't get triggered as expected.

    A similar issue manifests in the share Network Creation
    form where we setup switched fields with the Neutron
    network IDs (dashed format UUIDs) and in the Share
    Group Creation form where we setup switched fields
    with the Share Group Type IDs (dashed format UUIDs).

    So, we could encode the "-" in these field names to
    workaround this issue.

    Closes-Bug: #1931641
    [1] https://opendev.org/openstack/horizon/src/commit/647c2b7530f81c4a534ef1d403aa3d90ae608442/horizon/static/horizon/js/horizon.forms.js#L491-L613

    Change-Id: Id924fc55debdc38ae2131bf8cef396f28caa3e77
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

Changed in manila-ui:
status: In Progress → Fix Released
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/+/797354

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

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

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/+/797354
Committed: https://opendev.org/openstack/manila-ui/commit/803ab32358eec94804a3b630786f8cf6b0795cbd
Submitter: "Zuul (22348)"
Branch: master

commit 803ab32358eec94804a3b630786f8cf6b0795cbd
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Jun 21 14:58:54 2021 -0700

    Fix share group creation with share types

    A recent change [1] introduced an encoding for
    problematic field names. On the share group
    creation form, an encoding was missed causing
    a silent failure where the share type/s chosen
    were ignored in the API request.

    [1] 37e5b2f0530c9fe8117cea0dac95577b912bdecc
    Change-Id: I0983359acc489513a5a0940ac379e0a078870548
    Partial-Bug: #1931641
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

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

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/797163
Committed: https://opendev.org/openstack/manila-ui/commit/6ad8fd882afe8c7ad2f0c45a26920db824c45db5
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 6ad8fd882afe8c7ad2f0c45a26920db824c45db5
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Jun 15 00:02:09 2021 -0700

    Fix parsing names in switched fields

    In the share creation form dialog, share network
    selection is optionally provided based on whether
    the share type chosen supports the DHSS extra-spec.
    This selection breaks often when dealing with share
    types that have a name matching the format: ".*-\d+.*".
    For example: test-700. The root cause of this seems to
    be in javascript code for "switchable" fields [1] that
    doesn't get triggered as expected.

    A similar issue manifests in the share Network Creation
    form where we setup switched fields with the Neutron
    network IDs (dashed format UUIDs) and in the Share
    Group Creation form where we setup switched fields
    with the Share Group Type IDs (dashed format UUIDs).

    So, we could encode the "-" in these field names to
    workaround this issue.

    Closes-Bug: #1931641
    [1] https://opendev.org/openstack/horizon/src/commit/647c2b7530f81c4a534ef1d403aa3d90ae608442/horizon/static/horizon/js/horizon.forms.js#L491-L613

    Change-Id: Id924fc55debdc38ae2131bf8cef396f28caa3e77
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 37e5b2f0530c9fe8117cea0dac95577b912bdecc)
    (cherry picked from commit b7d87e886a1d71e02034b7dde9b96be3beabdb6a)

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

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

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

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

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

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

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

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

commit a97f5e67508b02c428c9adde3eee8fdcdacba58b
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Jun 15 00:02:09 2021 -0700

    Fix parsing names in switched fields

    In the share creation form dialog, share network
    selection is optionally provided based on whether
    the share type chosen supports the DHSS extra-spec.
    This selection breaks often when dealing with share
    types that have a name matching the format: ".*-\d+.*".
    For example: test-700. The root cause of this seems to
    be in javascript code for "switchable" fields [1] that
    doesn't get triggered as expected.

    A similar issue manifests in the share Network Creation
    form where we setup switched fields with the Neutron
    network IDs (dashed format UUIDs) and in the Share
    Group Creation form where we setup switched fields
    with the Share Group Type IDs (dashed format UUIDs).

    So, we could encode the "-" in these field names to
    workaround this issue.

    Closes-Bug: #1931641
    [1] https://opendev.org/openstack/horizon/src/commit/647c2b7530f81c4a534ef1d403aa3d90ae608442/horizon/static/horizon/js/horizon.forms.js#L491-L613

    Change-Id: Id924fc55debdc38ae2131bf8cef396f28caa3e77
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 37e5b2f0530c9fe8117cea0dac95577b912bdecc)
    (cherry picked from commit b7d87e886a1d71e02034b7dde9b96be3beabdb6a)
    (cherry picked from commit 6ad8fd882afe8c7ad2f0c45a26920db824c45db5)

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

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

commit f421aeb1e18664411cbb20420fe2c4847767573b
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Jun 21 14:58:54 2021 -0700

    Fix share group creation with share types

    A recent change [1] introduced an encoding for
    problematic field names. On the share group
    creation form, an encoding was missed causing
    a silent failure where the share type/s chosen
    were ignored in the API request.

    [1] 37e5b2f0530c9fe8117cea0dac95577b912bdecc
    Change-Id: I0983359acc489513a5a0940ac379e0a078870548
    Partial-Bug: #1931641
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 803ab32358eec94804a3b630786f8cf6b0795cbd)

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

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/796547
Committed: https://opendev.org/openstack/manila-ui/commit/902baefc33f3b783060b075331298b66adf77ac3
Submitter: "Zuul (22348)"
Branch: stable/train

commit 902baefc33f3b783060b075331298b66adf77ac3
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Jun 15 00:02:09 2021 -0700

    Fix parsing names in switched fields

    In the share creation form dialog, share network
    selection is optionally provided based on whether
    the share type chosen supports the DHSS extra-spec.
    This selection breaks often when dealing with share
    types that have a name matching the format: ".*-\d+.*".
    For example: test-700. The root cause of this seems to
    be in javascript code for "switchable" fields [1] that
    doesn't get triggered as expected.

    A similar issue manifests in the share Network Creation
    form where we setup switched fields with the Neutron
    network IDs (dashed format UUIDs) and in the Share
    Group Creation form where we setup switched fields
    with the Share Group Type IDs (dashed format UUIDs).

    So, we could encode the "-" in these field names to
    workaround this issue.

    Unfortunately this isn't a clean cherry-pick since
    we need to support users running manila-ui under
    python2 in this branch - and unicode wrangling
    isn't cleanly possible due to some assumptions
    django makes about field names in the forms code as
    well as in tests.

    Closes-Bug: #1931641
    [1] https://opendev.org/openstack/horizon/src/commit/647c2b7530f81c4a534ef1d403aa3d90ae608442/horizon/static/horizon/js/horizon.forms.js#L491-L613

    Change-Id: Id924fc55debdc38ae2131bf8cef396f28caa3e77
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 37e5b2f0530c9fe8117cea0dac95577b912bdecc)
    (cherry picked from commit b7d87e886a1d71e02034b7dde9b96be3beabdb6a)
    (cherry picked from commit 6ad8fd882afe8c7ad2f0c45a26920db824c45db5)
    (cherry picked from commit a97f5e67508b02c428c9adde3eee8fdcdacba58b)
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

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

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

commit bf820e10c742c3aff610665d7ec1b7c56a1fea9f
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Jun 21 14:58:54 2021 -0700

    Fix share group creation with share types

    A recent change [1] introduced an encoding for
    problematic field names. On the share group
    creation form, an encoding was missed causing
    a silent failure where the share type/s chosen
    were ignored in the API request.

    [1] 37e5b2f0530c9fe8117cea0dac95577b912bdecc
    Change-Id: I0983359acc489513a5a0940ac379e0a078870548
    Partial-Bug: #1931641
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 803ab32358eec94804a3b630786f8cf6b0795cbd)
    (cherry picked from commit f421aeb1e18664411cbb20420fe2c4847767573b)

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

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/797486
Committed: https://opendev.org/openstack/manila-ui/commit/21e31332cb0a3e77122aff63ca2bbfd045e093e5
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 21e31332cb0a3e77122aff63ca2bbfd045e093e5
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Jun 21 14:58:54 2021 -0700

    Fix share group creation with share types

    A recent change [1] introduced an encoding for
    problematic field names. On the share group
    creation form, an encoding was missed causing
    a silent failure where the share type/s chosen
    were ignored in the API request.

    [1] 37e5b2f0530c9fe8117cea0dac95577b912bdecc
    Change-Id: I0983359acc489513a5a0940ac379e0a078870548
    Partial-Bug: #1931641
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 803ab32358eec94804a3b630786f8cf6b0795cbd)
    (cherry picked from commit f421aeb1e18664411cbb20420fe2c4847767573b)
    (cherry picked from commit bf820e10c742c3aff610665d7ec1b7c56a1fea9f)

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

Reviewed: https://review.opendev.org/c/openstack/manila-ui/+/797487
Committed: https://opendev.org/openstack/manila-ui/commit/2ce86803ba72d00e8207ad3db373b7d6bd65cd59
Submitter: "Zuul (22348)"
Branch: stable/train

commit 2ce86803ba72d00e8207ad3db373b7d6bd65cd59
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Jun 21 14:58:54 2021 -0700

    Fix share group creation with share types

    A recent change [1] introduced an encoding for
    problematic field names. On the share group
    creation form, an encoding was missed causing
    a silent failure where the share type/s chosen
    were ignored in the API request.

    [1] 37e5b2f0530c9fe8117cea0dac95577b912bdecc
    Change-Id: I0983359acc489513a5a0940ac379e0a078870548
    Partial-Bug: #1931641
    Signed-off-by: Goutham Pacha Ravi <email address hidden>
    (cherry picked from commit 803ab32358eec94804a3b630786f8cf6b0795cbd)
    (cherry picked from commit f421aeb1e18664411cbb20420fe2c4847767573b)
    (cherry picked from commit bf820e10c742c3aff610665d7ec1b7c56a1fea9f)
    (cherry picked from commit 21e31332cb0a3e77122aff63ca2bbfd045e093e5)

Changed in manila-ui:
importance: Undecided → Medium
assignee: nobody → Goutham Pacha Ravi (gouthamr)
milestone: none → xena-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 3.1.0

This issue was fixed in the openstack/manila-ui 3.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 6.0.0.0rc1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 5.1.0

This issue was fixed in the openstack/manila-ui 5.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui 4.1.0

This issue was fixed in the openstack/manila-ui 4.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila-ui train-eol

This issue was fixed in the openstack/manila-ui train-eol release.

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.