Skip to content

Commit

Permalink
Update ANA group is in local namespace list.
Browse files Browse the repository at this point in the history
Fixes #894

Signed-off-by: Gil Bregman <[email protected]>
  • Loading branch information
gbregman committed Oct 13, 2024
1 parent 3934c4c commit 54d5ccd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@ def namespace_change_load_balancing_group_safe(self, request, context):
self.logger.error(errmsg)
return pb2.req_status(status=errno.ENODEV, error_message=errmsg)

find_ret = self.subsystem_nsid_bdev_and_uuid.find_namespace(request.subsystem, nsid)

omap_lock = self.omap_lock.get_omap_lock_to_use(context)
with omap_lock:
ns_entry = None
Expand Down Expand Up @@ -1453,6 +1455,8 @@ def namespace_change_load_balancing_group_safe(self, request, context):
transit_anagrpid=0
)
self.logger.debug(f"nvmf_subsystem_set_ns_ana_group: {ret}")
if not find_ret.empty():
find_ret.anagrpid = request.anagrpid
except Exception as ex:
errmsg = f"{change_lb_group_failure_prefix}:\n{ex}"
resp = self.parse_json_exeption(ex)
Expand Down

0 comments on commit 54d5ccd

Please sign in to comment.