Skip to content

Commit

Permalink
Merge pull request ceph#186 from ceph/controller-range
Browse files Browse the repository at this point in the history
 Add controller id range to ceph-nvmeof.conf and pass to gateway
  • Loading branch information
gbregman authored Aug 17, 2023
2 parents 4ba4b14 + 89f8d81 commit 7aa987f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ceph-nvmeof.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ port = 5500
enable_auth = False
state_update_notify = True
state_update_interval_sec = 5
#min_controller_id = 1
#max_controller_id = 65519

[ceph]
pool = rbd
Expand Down
4 changes: 4 additions & 0 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ def create_subsystem(self, request, context=None):

self.logger.info(
f"Received request to create subsystem {request.subsystem_nqn}")
min_cntlid = self.config.getint_with_default("gateway", "min_controller_id", 1)
max_cntlid = self.config.getint_with_default("gateway", "max_controller_id", 65519)
try:
ret = rpc_nvmf.nvmf_create_subsystem(
self.spdk_rpc_client,
nqn=request.subsystem_nqn,
serial_number=request.serial_number,
max_namespaces=request.max_namespaces,
min_cntlid=min_cntlid,
max_cntlid=max_cntlid,
)
self.logger.info(f"create_subsystem {request.subsystem_nqn}: {ret}")
except Exception as ex:
Expand Down

0 comments on commit 7aa987f

Please sign in to comment.