Share network update returns success when it shouldn't

Bug #1846836 reported by Carlos Eduardo on 2019-10-04
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Manila
Medium
Carlos Eduardo

Bug Description

After API version 2.51, a share network is able to span multiple subnets. While performing the command `share-network-update`, Manila is returning success when there is no default subnet to be updated.

Environment:
   - Manila on API version 2.51 or bigger

Steps to excecute:
1) Create or show a share network
2) Delete all the subnets contained in the share network
3) Try to update neutron_net_id or neutron_subnet_id of the given share network.

The bug:
Manila returns success even if the share network does not contain any default subnet and the mentioned fields was not properly updated.

Expected behavior:
Manila should return an error message when someone try to update a share network and it has no default subnet.

Changed in manila:
assignee: nobody → Carlos Eduardo (silvacarlose)
Jason Grosso (jgrosso) on 2019-10-10
Changed in manila:
importance: Undecided → Low
importance: Low → Medium

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

Changed in manila:
status: New → In Progress

Reviewed: https://review.opendev.org/687959
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=de2d94172bebc8d8771e2e67860d94559a86cece
Submitter: Zuul
Branch: master

commit de2d94172bebc8d8771e2e67860d94559a86cece
Author: silvacarloss <email address hidden>
Date: Wed Oct 9 14:25:57 2019 +0000

    Fix share network update erroneously returns success

    This patch fixes an issue while performing share network update.
    Manila was allowing the user to update a share network even if it
    did not contain a default subnet. Now, we throw an error if there
    is no default subnet to be updated. Also, adds an extra validation.
    Now, Manila do not allow the default share network subnet update if
    it is going to have only `neutron_net_id` or `neutron_subnet_id`
    after the update.

    Change-Id: Iba2761db53da68a1c497e2e5dd370c36a22ebbed
    Closes-Bug: #1846836

Changed in manila:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/688543
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=0c10d54a096de7dbdf6eb1d781753317325f64db
Submitter: Zuul
Branch: stable/train

commit 0c10d54a096de7dbdf6eb1d781753317325f64db
Author: silvacarloss <email address hidden>
Date: Wed Oct 9 14:25:57 2019 +0000

    Fix share network update erroneously returns success

    This patch fixes an issue while performing share network update.
    Manila was allowing the user to update a share network even if it
    did not contain a default subnet. Now, we throw an error if there
    is no default subnet to be updated. Also, adds an extra validation.
    Now, Manila do not allow the default share network subnet update if
    it is going to have only `neutron_net_id` or `neutron_subnet_id`
    after the update.

    Change-Id: Iba2761db53da68a1c497e2e5dd370c36a22ebbed
    Closes-Bug: #1846836
    (cherry picked from commit de2d94172bebc8d8771e2e67860d94559a86cece)

tags: added: in-stable-train

This issue was fixed in the openstack/manila 9.1.0 release.

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

Other bug subscribers