Skip to content

Commit

Permalink
sapcc: continue to ensure next share instance on NotFound error
Browse files Browse the repository at this point in the history
Share instance may be deleted in the meanwhile. Ignore the error and
less noises in sentry.

Change-Id: I24eceb64c9511928fbbedc65e425ce6ae39f08a9
  • Loading branch information
chuan137 authored and Carthaca committed Nov 26, 2024
1 parent 006cf74 commit a9ade7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manila/share/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,11 @@ def ensure_driver_resources(self, ctxt):
)
continue

share_instance = self.db.share_instance_get(
ctxt, share_instance['id'], with_share_data=True)
try:
share_instance = self.db.share_instance_get(
ctxt, share_instance['id'], with_share_data=True)
except exception.NotFound:
continue
share_instance_dict = self._get_share_instance_dict(
ctxt, share_instance)
update_share_instances.append(share_instance_dict)
Expand Down

0 comments on commit a9ade7b

Please sign in to comment.