Skip to content

Commit

Permalink
Fixed allocation of invalid load balancing group during ns-create
Browse files Browse the repository at this point in the history
Signed-off-by: Leonid Chernin <[email protected]>
  • Loading branch information
Leonid Chernin committed Jun 13, 2024
1 parent 91c9729 commit 6c6113b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,10 @@ def choose_anagrpid_for_namespace(self, nsid) ->int:
min_load = 2000
chosen_ana_group = 0
for ana_grp in self.clusters:
ana_load[ana_grp] = 0;
for name in self.clusters[ana_grp]:
ana_load[ana_grp] += self.clusters[ana_grp][name] # accumulate the total load per ana group for all ana_grp clusters
if ana_grp in grps_list: #to take into consideration only valid groups
ana_load[ana_grp] = 0;
for name in self.clusters[ana_grp]:
ana_load[ana_grp] += self.clusters[ana_grp][name] # accumulate the total load per ana group for all valid ana_grp clusters
for ana_grp in ana_load :
self.logger.info(f" ana group {ana_grp} load = {ana_load[ana_grp]} ")
if ana_load[ana_grp] <= min_load:
Expand Down

0 comments on commit 6c6113b

Please sign in to comment.