Skip to content

Commit

Permalink
Merge pull request #41 from stackhpc/upstream/2023.1-2024-08-05
Browse files Browse the repository at this point in the history
Synchronise 2023.1 with upstream
  • Loading branch information
markgoddard authored Aug 5, 2024
2 parents e177c71 + 6fbe498 commit d90f70b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
26 changes: 24 additions & 2 deletions glance/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,19 @@ def _set_acls(self, image):
member_ids = [m.member_id for m in member_repo.list()]
for location in image.locations:
if CONF.enabled_backends:
# NOTE(whoami-rajat): Do not set_acls if store is not defined
# on this node. This is possible in case of edge deployment
# that image location is present but the actual store is
# not related to this node.
image_store = location['metadata'].get('store')
if image_store not in CONF.enabled_backends:
msg = (_("Store %s is not available on "
"this node, skipping `_set_acls` "
"call.") % image_store)
LOG.debug(msg)
continue
self.store_api.set_acls_for_multi_store(
location['url'], location['metadata'].get('store'),
location['url'], image_store,
public=public, read_tenants=member_ids,
context=self.context
)
Expand Down Expand Up @@ -655,8 +666,19 @@ def _set_acls(self):
member_ids = [m.member_id for m in self.repo.list()]
for location in self.image.locations:
if CONF.enabled_backends:
# NOTE(whoami-rajat): Do not set_acls if store is not
# defined on this node. This is possible in case of edge
# deployment that image location is present but the actual
# store is not related to this node.
image_store = location['metadata'].get('store')
if image_store not in CONF.enabled_backends:
msg = (_("Store %s is not available on "
"this node, skipping `_set_acls` "
"call.") % image_store)
LOG.debug(msg)
continue
self.store_api.set_acls_for_multi_store(
location['url'], location['metadata'].get('store'),
location['url'], image_store,
public=public, read_tenants=member_ids,
context=self.context
)
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/fix-set-acls-bc17b5e125425c9b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
`Bug #2073945 <https://bugs.launchpad.net/glance/+bug/2073945>`_:
Fixed issue with VM creation in DCN cases with RBD backend where
an edge node doesn't have the store defined which is part of the
image locations and the operation fails.

0 comments on commit d90f70b

Please sign in to comment.