Fix leak of Manila ports on share server deletion

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

Bug Description

There are two scenarios we observed
1. if we want to delete a share server, we should double check if there are ports belonging to the share server. It may be possible, that there are ports existing without a corresponding manila network allocation entry in the manila db, because port create request may have been successfully sent to neutron, but the response, the created port could not be stored in manila due to unreachable db (e.g. during manila-share deployment when proxysql sidecar gets terminated)

2. Manila share server deletion happens asynchronously. If deletion of share server fails in between, share server network ports remained as it is. This is leak. So we should better delete share network ports first and then continue share server deletion.

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

Changed in manila:
status: New → In Progress
Vida Haririan (vhariria)
Changed in manila:
assignee: nobody → kiran pawar (kpdev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/920513
Committed: https://opendev.org/openstack/manila/commit/76d032969848fa409f3b7da499cc2da3de67f6be
Submitter: "Zuul (22348)"
Branch: master

commit 76d032969848fa409f3b7da499cc2da3de67f6be
Author: Kiran Pawar <email address hidden>
Date: Mon May 27 12:43:01 2024 +0000

    Fix leak of ports on share server deletion

    - Manila share server deletion happens asynchronously. If deletion of
    share server fails in between, share server network ports remained as
    it is. So we should better delete share network ports first and then
    continue share server deletion.
    - It may be possible, that there are ports existing without a
    corresponding manila network allocation entry in the manila db, because
    port create request may have been successfully sent to neutron, but not
    stored in db. So query(and delete) those from neutron after db entries
    are deleted.

    Closes-bug: #2067266
    Change-Id: Id86dade1194494e599aea9adad06e4ca6cb119b6

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/manila/+/921288

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

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

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/921292
Committed: https://opendev.org/openstack/manila/commit/19622387dc54ed2458bc514854e742160954318c
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit 19622387dc54ed2458bc514854e742160954318c
Author: Kiran Pawar <email address hidden>
Date: Mon May 27 12:43:01 2024 +0000

    Fix leak of ports on share server deletion

    - Manila share server deletion happens asynchronously. If deletion of
    share server fails in between, share server network ports remained as
    it is. So we should better delete share network ports first and then
    continue share server deletion.
    - It may be possible, that there are ports existing without a
    corresponding manila network allocation entry in the manila db, because
    port create request may have been successfully sent to neutron, but not
    stored in db. So query(and delete) those from neutron after db entries
    are deleted.

    Closes-bug: #2067266
    Change-Id: Id86dade1194494e599aea9adad06e4ca6cb119b6
    (cherry picked from commit 76d032969848fa409f3b7da499cc2da3de67f6be)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/921288
Committed: https://opendev.org/openstack/manila/commit/ed585103e4c26478b60b397b0bb064b50dc1acb5
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit ed585103e4c26478b60b397b0bb064b50dc1acb5
Author: Kiran Pawar <email address hidden>
Date: Mon May 27 12:43:01 2024 +0000

    Fix leak of ports on share server deletion

    - Manila share server deletion happens asynchronously. If deletion of
    share server fails in between, share server network ports remained as
    it is. So we should better delete share network ports first and then
    continue share server deletion.
    - It may be possible, that there are ports existing without a
    corresponding manila network allocation entry in the manila db, because
    port create request may have been successfully sent to neutron, but not
    stored in db. So query(and delete) those from neutron after db entries
    are deleted.

    Closes-bug: #2067266
    Change-Id: Id86dade1194494e599aea9adad06e4ca6cb119b6
    (cherry picked from commit 76d032969848fa409f3b7da499cc2da3de67f6be)
    (cherry picked from commit 19622387dc54ed2458bc514854e742160954318c)

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/manila/+/921487

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/921487
Committed: https://opendev.org/openstack/manila/commit/18b6562ddc46946aad3ec9b9d77f8e70c8a3bc13
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 18b6562ddc46946aad3ec9b9d77f8e70c8a3bc13
Author: Kiran Pawar <email address hidden>
Date: Mon May 27 12:43:01 2024 +0000

    Fix leak of ports on share server deletion

    - Manila share server deletion happens asynchronously. If deletion of
    share server fails in between, share server network ports remained as
    it is. So we should better delete share network ports first and then
    continue share server deletion.
    - It may be possible, that there are ports existing without a
    corresponding manila network allocation entry in the manila db, because
    port create request may have been successfully sent to neutron, but not
    stored in db. So query(and delete) those from neutron after db entries
    are deleted.

    Closes-bug: #2067266
    Change-Id: Id86dade1194494e599aea9adad06e4ca6cb119b6
    (cherry picked from commit 76d032969848fa409f3b7da499cc2da3de67f6be)
    (cherry picked from commit 19622387dc54ed2458bc514854e742160954318c)
    (cherry picked from commit ed585103e4c26478b60b397b0bb064b50dc1acb5)

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

Changed in manila:
milestone: none → dalmatian-2
importance: Undecided → Medium
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.