Skip to content

Commit

Permalink
Fix ana_map logic
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Jan 2, 2024
1 parent cff414f commit e060418
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,7 @@ def create_subsystem_safe(self, request, context=None):
max_cntlid=max_cntlid,
ana_reporting = request.ana_reporting,
)
self.logger.info(f"create_subsystem and ana_map {request.subsystem_nqn}: {ret}")
for x in range (MAX_ANA_GROUPS):
self.ana_map[request.subsystem_nqn][x+1] = pb2.ana_state.INACCESSIBLE
self.logger.info(f"create_subsystem {request.subsystem_nqn}: {ret}")

except Exception as ex:
self.logger.error(f"create_subsystem failed with: \n {ex}")
Expand All @@ -414,8 +412,6 @@ def create_subsystem_safe(self, request, context=None):
self.logger.error(f"Error persisting create_subsystem"
f" {request.subsystem_nqn}: {ex}")
raise
for x in range (MAX_ANA_GROUPS):
self.ana_map[request.subsystem_nqn][x+1] = pb2.ana_state.INACCESSIBLE
return pb2.req_status(status=ret)

def create_subsystem(self, request, context=None):
Expand Down Expand Up @@ -452,8 +448,6 @@ def delete_subsystem_safe(self, request, context=None):
self.logger.error(f"Error persisting delete_subsystem"
f" {request.subsystem_nqn}: {ex}")
raise
if self.ana_map[request.subsystem_nqn]:
self.ana_map[request.subsystem_nqn].clear()
return pb2.req_status(status=ret)

def delete_subsystem(self, request, context=None):
Expand Down

0 comments on commit e060418

Please sign in to comment.