diff --git a/doc/source/admin/shared-file-systems-share-server-management.rst b/doc/source/admin/shared-file-systems-share-server-management.rst index 11f592e06e..78ac44a87e 100644 --- a/doc/source/admin/shared-file-systems-share-server-management.rst +++ b/doc/source/admin/shared-file-systems-share-server-management.rst @@ -211,3 +211,9 @@ their size and amount of built instances. If one of these limits is reached during a request that requires a share server to be provided, manila will create a new share server to place such request. + +.. note:: + The limits can be ignored when placing a new share created from parent + snapshot in the same host as the parent. For this scenario, the share server + must be the same, so it does not take the limit in account, reusing the + share server anyway. diff --git a/manila/share/manager.py b/manila/share/manager.py index 2a7bb49db7..03500fae7d 100644 --- a/manila/share/manager.py +++ b/manila/share/manager.py @@ -704,13 +704,15 @@ class ShareManager(manager.SchedulerDependentManager): except exception.ShareServerNotFound: available_share_servers = None - compatible_share_server = None - if available_share_servers: + # creating from snapshot in the same host must reuse the server, + # so it ignores the server limits. + if available_share_servers and not parent_share_same_dest: available_share_servers = ( self._check_share_server_backend_limits( context, available_share_servers, share_instance=share_instance)) + compatible_share_server = None if available_share_servers: try: compatible_share_server = ( diff --git a/releasenotes/notes/fix-creating-from-snapshot-server-limit-7b575c7cbf081efc.yaml b/releasenotes/notes/fix-creating-from-snapshot-server-limit-7b575c7cbf081efc.yaml new file mode 100644 index 0000000000..ee383b725a --- /dev/null +++ b/releasenotes/notes/fix-creating-from-snapshot-server-limit-7b575c7cbf081efc.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fix creating from snapshot operation with server limits. If the new share + and parent are in the same host, the share server must be resued, so the + limits must be ignored. For more details, please refer to + `launchpad bug #1918845 `_