diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py index 543aaba65c..0a35191c57 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py @@ -1750,6 +1750,10 @@ class NetAppCmodeFileStorageLibrary(object): snapshot_name = self._get_backend_snapshot_name(snapshot['id']) LOG.debug('Creating snapshot %s', snapshot_name) vserver_client.create_snapshot(share_name, snapshot_name) + if not vserver_client.snapshot_exists(snapshot_name, share_name): + raise exception.SnapshotResourceNotFound( + name=snapshot_name) + return {'provider_location': snapshot_name} def revert_to_snapshot(self, context, snapshot, share_server=None): diff --git a/releasenotes/notes/netapp-check-snapshot-after-creation-1b59038a3a117c65.yaml b/releasenotes/notes/netapp-check-snapshot-after-creation-1b59038a3a117c65.yaml new file mode 100644 index 0000000000..6fe112632e --- /dev/null +++ b/releasenotes/notes/netapp-check-snapshot-after-creation-1b59038a3a117c65.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + NetApp driver now checks after sending snapshot-create request that the + snapshot has been properly created. If snapshot is not checked, manila + assumes that working snapshot is available. But when user tries to access + the snapshot, request could fail. + `Launchpad bug 1971710 `_ + for more details.