From 5b77e4756104554fe024d086241e81e46d71d1ed Mon Sep 17 00:00:00 2001 From: Sylvan Le Deunff Date: Wed, 3 May 2023 10:49:12 +0200 Subject: [PATCH] Fix export locations update when subnet is added Export locations of active share replicas was updated but not those of the share itself. Closes-Bug: #2017501 Change-Id: I33204657401f3eadd490fc50fedaef899dcff297 (cherry picked from commit 07ce64462c63c5253226a733f5686e78eb7223a1) --- .../drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py | 3 ++- .../bug-2017501-fix-share-export-location-update.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-2017501-fix-share-export-location-update.yaml diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py index 4ee9c8b795..98ec94c34a 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py @@ -2363,7 +2363,8 @@ class NetAppCmodeMultiSVMFileStorageLibrary( updated_export_locations = {} for share in shares: - if share['replica_state'] == constants.REPLICA_STATE_ACTIVE: + if share["replica_state"] in (None, + constants.REPLICA_STATE_ACTIVE): host = share['host'] export_locations = self._create_export( share, share_server, vserver_name, vserver_client, diff --git a/releasenotes/notes/bug-2017501-fix-share-export-location-update.yaml b/releasenotes/notes/bug-2017501-fix-share-export-location-update.yaml new file mode 100644 index 0000000000..643d4b1847 --- /dev/null +++ b/releasenotes/notes/bug-2017501-fix-share-export-location-update.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed share export location update when subnet is added to a network + containing shares. Please refer to the + `Launchpad bug #2017501 `_ + for more details.