Skip to content

Commit

Permalink
additional param to config max_gws_in_grp
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidc committed Dec 8, 2024
1 parent 5ac5249 commit f11670c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ceph-nvmeof.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ state_update_timeout_in_msec = 2000
state_update_interval_sec = 5
enable_spdk_discovery_controller = False
rebalance_period_sec = 7
max_gws_in_grp = 16
max_ns_to_change_lb_grp = 8
#omap_file_lock_duration = 20
#omap_file_lock_retries = 30
Expand Down
6 changes: 3 additions & 3 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import spdk.rpc.keyring as rpc_keyring
import spdk.rpc.log as rpc_log
from spdk.rpc.client import JSONRPCException

from google.protobuf import json_format
from google.protobuf.empty_pb2 import Empty
from .proto import gateway_pb2 as pb2
Expand All @@ -49,7 +48,6 @@
CNTLID_RANGE_SIZE = 2040
DEFAULT_MODEL_NUMBER = "Ceph bdev Controller"

MAX_POSSIBLE_ANA_GRPS = 100
MONITOR_POLLING_RATE_SEC = 2 #monitor polls gw each 2 seconds
class BdevStatus:
def __init__(self, status, error_message, bdev_name = ""):
Expand Down Expand Up @@ -375,7 +373,9 @@ def __init__(self, config: GatewayConfig, gateway_state: GatewayStateHandler, rp
self.ana_grp_state = {}
self.ana_grp_ns_load = {}
self.ana_grp_subs_load = defaultdict(dict)
for i in range(MAX_POSSIBLE_ANA_GRPS):
self.max_ana_grps = self.config.getint_with_default("gateway", "max_gws_in_grp", 16)

for i in range(self.max_ana_grps + 1):
self.ana_grp_ns_load[i] = 0
self.ana_grp_state[i] = pb2.ana_state.INACCESSIBLE
self.cluster_nonce = {}
Expand Down

0 comments on commit f11670c

Please sign in to comment.