NetApp driver does not cleanup previous snapmirror relantionships on replica promote

Bug #1982808 reported by Fernando Ferraz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Felipe Rodrigues

Bug Description

Description
===========
Promoting replicas results in unused snapshots being held in the ONTAP volumes, causing undesirable space consumption. The NetApp driver must release previous SnapMirror relationships in order to remove any locks to snapshots that are no longer needed, allowing ONTAP to automatically clean up snapshots.

Steps to reproduce
==================
1) Create a share with replication enabled;
2) Promote an 'in-sync' replica as the new source;
3) Promoting the original source (the active replica prior to the first promotion operation);
4) Calling 'snapmirror update' in the ONTAP system does not delete unused snapshots.

Expected result
===============
After successfully promoting a replica to a new source, all SnapMirror relationship entries with the previous source (the active replica prior to the promote operation) must be released to prevent ONTAP from retaining locks of the prior relationship setup. After that, ONTAP will automatically clean up unused snapshots by attempting a scheduled SnapMirror update.

Actual result
=============
NetApp driver does not issue a SnapMirror release operation after replica promotion to release the relationship with the prior active/source replica, resulting in the ONTAP retaining unused snapshots and consuming unnecessary resources.

Environment
===========
OpenStack Yoga (also reproducible in older releases)
NetApp ONTAP 9. x

Changed in manila:
status: New → In Progress
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
milestone: none → zed-3
assignee: nobody → Fernando Ferraz (fernando-ferraz)
importance: Undecided → Low
Revision history for this message
Fernando Ferraz (fernando-ferraz) wrote :

Link in the commit message brings me to the right report. Not sure why BOT hasn’t posted my change in here.

https://review.opendev.org/c/openstack/manila/+/849849

Changed in manila:
milestone: zed-3 → antelope-1
Changed in manila:
assignee: Fernando Ferraz (fernando-ferraz) → nobody
assignee: nobody → Felipe Rodrigues (felipefutty)
milestone: antelope-1 → antelope-2
Changed in manila:
milestone: antelope-2 → antelope-3
Changed in manila:
milestone: antelope-3 → antelope-rc1
Changed in manila:
milestone: antelope-rc1 → bobcat-1
Changed in manila:
milestone: bobcat-1 → bobcat-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/849849
Committed: https://opendev.org/openstack/manila/commit/38b13bb40b879adcc06cef0b0fa629e4b00f7122
Submitter: "Zuul (22348)"
Branch: master

commit 38b13bb40b879adcc06cef0b0fa629e4b00f7122
Author: Fernando Ferraz <email address hidden>
Date: Tue Jul 19 05:33:58 2022 -0300

    NetApp ONTAP: Fix SnapMirror snapshots not being cleaned up

    Replica promote is retaining unneeded snapshots from previous
    SnapMirror relationships and increasing the amount of space
    consumed from snapshots in the storage system.

    This patch fixes the issue by calling the snapmirror release
    operation after resync completes its transferring, which allows
    the SnapMirror software to properly cleanup unneeded resources.

    Closes-Bug: #1982808
    Change-Id: I516fb3575e30d18d971d6a1b7f3b9ad7120c3bbd

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

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

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

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

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

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

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

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

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

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

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

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/+/891756
Committed: https://opendev.org/openstack/manila/commit/e85a081f1c48fa02f728e077e09be08587c7c1e1
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit e85a081f1c48fa02f728e077e09be08587c7c1e1
Author: Fernando Ferraz <email address hidden>
Date: Tue Jul 19 05:33:58 2022 -0300

    NetApp ONTAP: Fix SnapMirror snapshots not being cleaned up

    Replica promote is retaining unneeded snapshots from previous
    SnapMirror relationships and increasing the amount of space
    consumed from snapshots in the storage system.

    This patch fixes the issue by calling the snapmirror release
    operation after resync completes its transferring, which allows
    the SnapMirror software to properly cleanup unneeded resources.

    Closes-Bug: #1982808
    Change-Id: I516fb3575e30d18d971d6a1b7f3b9ad7120c3bbd
    (cherry picked from commit 38b13bb40b879adcc06cef0b0fa629e4b00f7122)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/891757
Committed: https://opendev.org/openstack/manila/commit/6db352411413818ddd6c02762fda5d67e0219361
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 6db352411413818ddd6c02762fda5d67e0219361
Author: Fernando Ferraz <email address hidden>
Date: Tue Jul 19 05:33:58 2022 -0300

    NetApp ONTAP: Fix SnapMirror snapshots not being cleaned up

    Replica promote is retaining unneeded snapshots from previous
    SnapMirror relationships and increasing the amount of space
    consumed from snapshots in the storage system.

    This patch fixes the issue by calling the snapmirror release
    operation after resync completes its transferring, which allows
    the SnapMirror software to properly cleanup unneeded resources.

    Closes-Bug: #1982808
    Change-Id: I516fb3575e30d18d971d6a1b7f3b9ad7120c3bbd
    (cherry picked from commit 38b13bb40b879adcc06cef0b0fa629e4b00f7122)
    (cherry picked from commit e85a081f1c48fa02f728e077e09be08587c7c1e1)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/891758
Committed: https://opendev.org/openstack/manila/commit/65bcc27100abbbf838ff02735594da5bae3b05c1
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 65bcc27100abbbf838ff02735594da5bae3b05c1
Author: Fernando Ferraz <email address hidden>
Date: Tue Jul 19 05:33:58 2022 -0300

    NetApp ONTAP: Fix SnapMirror snapshots not being cleaned up

    Replica promote is retaining unneeded snapshots from previous
    SnapMirror relationships and increasing the amount of space
    consumed from snapshots in the storage system.

    This patch fixes the issue by calling the snapmirror release
    operation after resync completes its transferring, which allows
    the SnapMirror software to properly cleanup unneeded resources.

    Closes-Bug: #1982808
    Change-Id: I516fb3575e30d18d971d6a1b7f3b9ad7120c3bbd
    (cherry picked from commit 38b13bb40b879adcc06cef0b0fa629e4b00f7122)
    (cherry picked from commit e85a081f1c48fa02f728e077e09be08587c7c1e1)
    (cherry picked from commit 6db352411413818ddd6c02762fda5d67e0219361)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/892036
Committed: https://opendev.org/openstack/manila/commit/b300d878b4d82b315ce3dc76cf4dcf0c80f47b1b
Submitter: "Zuul (22348)"
Branch: stable/xena

commit b300d878b4d82b315ce3dc76cf4dcf0c80f47b1b
Author: Fernando Ferraz <email address hidden>
Date: Tue Jul 19 05:33:58 2022 -0300

    NetApp ONTAP: Fix SnapMirror snapshots not being cleaned up

    Replica promote is retaining unneeded snapshots from previous
    SnapMirror relationships and increasing the amount of space
    consumed from snapshots in the storage system.

    This patch fixes the issue by calling the snapmirror release
    operation after resync completes its transferring, which allows
    the SnapMirror software to properly cleanup unneeded resources.

    Closes-Bug: #1982808
    Change-Id: I516fb3575e30d18d971d6a1b7f3b9ad7120c3bbd
    (cherry picked from commit 38b13bb40b879adcc06cef0b0fa629e4b00f7122)
    (cherry picked from commit e85a081f1c48fa02f728e077e09be08587c7c1e1)
    (cherry picked from commit 6db352411413818ddd6c02762fda5d67e0219361)
    (cherry picked from commit 65bcc27100abbbf838ff02735594da5bae3b05c1)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 16.1.0

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

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

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

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

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

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

This issue was fixed in the openstack/manila xena-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/wallaby)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/manila/+/892402
Reason: stable/wallaby branch of openstack/manila is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

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.