Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a separate log level field for SPDK, don't display error for string context params #902

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading