Share group deletion fails due to already deleted share server

Bug #2004212 reported by Carlos Eduardo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Carlos Eduardo

Bug Description

Description
===========
During the deletion of share network subnets, we are not checking for leftover share groups and preventing the deletion in case there are share groups in the subnet.

Steps to reproduce
==================

A chronological list of steps which will help reproduce the issue you hit:
* Create a share network
* Create a share group type and a share group in a DHSS True environment
* Create a share in the share group
* Delete the share
* Delete the share network subnet

Expected result
===============
Manila should prevent the deletion of the share network subnet, as there is a share group related to it.

Actual result
=============
Manila allows the deletion of the share network subnet, thus deleting the share server. When we request the deletion of the share group, it fails due to the share server not being known to Manila anymore.

Environment
===========
1. Devstack - Dummy Driver on DHSS=True (could happen with any DHSS=True backend)

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

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

Changed in manila:
status: New → In Progress
Changed in manila:
assignee: nobody → Carlos Eduardo (silvacarlose)
milestone: none → antelope-3
importance: Undecided → Medium
Changed in manila:
milestone: antelope-3 → antelope-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/manila-tempest-plugin/+/875981
Committed: https://opendev.org/openstack/manila-tempest-plugin/commit/dab53f8e2b6d84114288ccf3c63751be8236cc57
Submitter: "Zuul (22348)"
Branch: master

commit dab53f8e2b6d84114288ccf3c63751be8236cc57
Author: silvacarloss <email address hidden>
Date: Wed Mar 1 16:28:05 2023 -0300

    Correct share group tests cleanup order

    Some share group tests were taking advantage of a bug in Manila.
    Share network subnets were being allowed to be deleted even when
    its share servers were tied to a share group. With that bug being
    fixed, we need to ensure that the share groups are deleted before
    the share network subnet alongside the share servers are.

    Related-Bug: #2004212
    Change-Id: I05607883c34bca586c795c7efab1df8d0edd6cff

Changed in manila:
milestone: antelope-rc1 → bobcat-1
Changed in manila:
milestone: bobcat-1 → bobcat-2
Changed in manila:
milestone: bobcat-2 → bobcat-3
Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/872330
Committed: https://opendev.org/openstack/manila/commit/2b52056721297b494a1d09b773b3d48666cc159f
Submitter: "Zuul (22348)"
Branch: master

commit 2b52056721297b494a1d09b773b3d48666cc159f
Author: silvacarloss <email address hidden>
Date: Tue Jan 31 13:22:08 2023 -0300

    Check share network for share groups before deletion

    Share network subnets were not checking for the existence of share
    groups while processing a delete request. Then, if a share network
    had a share server that was tied to a share group, it would end up
    deleting the share server, leaving the share group orphan. When we
    triggered the deletion of the share group, it would fail, as the
    share server was not known to Manila anymore.

    Fix that issue by adding an extra validation step during the share
    network subnet delete API.

    Closes-Bug: #2004212
    Depends-On: https://review.opendev.org/c/openstack/manila-tempest-plugin/+/875981
    Change-Id: I563bf925523fa44689c83f432ce5a460276afef7

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to manila-tempest-plugin (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila-tempest-plugin/+/918702

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/manila-tempest-plugin/+/918702
Committed: https://opendev.org/openstack/manila-tempest-plugin/commit/986c7bd09d4645b1aefb4ed96b83ecce49091369
Submitter: "Zuul (22348)"
Branch: master

commit 986c7bd09d4645b1aefb4ed96b83ecce49091369
Author: Goutham Pacha Ravi <email address hidden>
Date: Wed May 8 16:18:08 2024 -0700

    Fix racy DHSS=True share groups test

    We recently addressed a bug in Manila where
    share networks couldn't be deleted when they were
    still associated with any share groups [1]. After this
    fix, we had a couple of tests failing sporadically
    because they weren't waiting for the deletion of
    the share groups prior to attempting deletion
    of the share network subnets.

    Change-Id: I532ff3f0b2613340e0cb46c3b7e57a22cfa50c61
    Related-Bug: #2004212
    Closes-Bug: #2064673
    Signed-off-by: Goutham Pacha Ravi <email address hidden>

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

This issue was fixed in the openstack/manila 19.0.0.0rc1 release candidate.

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.