Skip to content

Commit

Permalink
Merge pull request #902 from gbregman/devel
Browse files Browse the repository at this point in the history
Add a separate log level field for SPDK, don't display error for string context params
  • Loading branch information
gbregman authored Oct 14, 2024
2 parents 5ed0aed + f5ec7ee commit 77dc3f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ceph-nvmeof.conf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ tgt_path = /usr/local/bin/nvmf_tgt
#rpc_socket_name = spdk.sock
#tgt_cmd_extra_args = --env-context="--no-huge -m1024" --iova-mode=va
timeout = 60.0
#log_level = WARNING
#log_level =
#protocol_log_level = WARNING

# Example value: -m 0x3 -L all
# tgt_cmd_extra_args =
Expand Down
3 changes: 3 additions & 0 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,9 @@ def get_peer_message(self, context) -> str:
if not context:
return ""

if not hasattr(context, 'peer'):
return ""

try:
peer = context.peer().split(":", 1)
addr_fam = peer[0].lower()
Expand Down
4 changes: 3 additions & 1 deletion control/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ def _start_spdk(self, omap_state):

# Initialization
timeout = self.config.getfloat_with_default("spdk", "timeout", 60.0)
protocol_log_level = self.config.get_with_default("spdk", "log_level", "WARNING")
protocol_log_level = self.config.get_with_default("spdk", "protocol_log_level", None)
if not protocol_log_level or not protocol_log_level.strip():
protocol_log_level = self.config.get_with_default("spdk", "log_level", "WARNING")
if not protocol_log_level or not protocol_log_level.strip():
protocol_log_level = "WARNING"
else:
Expand Down

0 comments on commit 77dc3f5

Please sign in to comment.