Skip to content

Commit

Permalink
Merge pull request #166 from adk3798/rados-connect-name
Browse files Browse the repository at this point in the history
control/state: add name to rados.Rados object initialization
  • Loading branch information
epuertat authored Aug 7, 2023
2 parents 9f5d41a + 03ff595 commit 1467774
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ceph-nvmeof.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ state_update_interval_sec = 5
[ceph]
pool = rbd
config_file = /etc/ceph/ceph.conf
id =

[mtls]
server_key = ./server.key
Expand Down
3 changes: 2 additions & 1 deletion control/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def __init__(self, config):
self.omap_name = f"nvmeof.{gateway_group}.state" if gateway_group else "nvmeof.state"
ceph_pool = self.config.get("ceph", "pool")
ceph_conf = self.config.get("ceph", "config_file")
rados_id = self.config.get_with_default("ceph", "id", "")

try:
conn = rados.Rados(conffile=ceph_conf)
conn = rados.Rados(conffile=ceph_conf, rados_id=rados_id)
conn.connect()
self.ioctx = conn.open_ioctx(ceph_pool)
# Create a new gateway persistence OMAP object
Expand Down

0 comments on commit 1467774

Please sign in to comment.