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

Need a proper SPDK log level in conf #873

Closed
gbregman opened this issue Sep 24, 2024 · 1 comment · Fixed by #902
Closed

Need a proper SPDK log level in conf #873

gbregman opened this issue Sep 24, 2024 · 1 comment · Fixed by #902
Assignees

Comments

@gbregman
Copy link
Contributor

Right now we have one SPDK log_level in the conf file which is used for both the SPDK protocol with the gateway and the inner SPDK logic. The problem is if we set this to DEBUG we get tons of messages about the protocol which are probably not interested in. We need a way to set the SPDK log level without changing the protocol log level. We tried to do so in the past but reverted the change because of update issues in cephadm. We should at least allow this in a development environment, where we don't have cephadm. We need to see if we cal also add it to the cephadm spec file without breaking the update.

Also, the protocol log level is used for 3 different connections:

  • the regular gw-SPDK connection
  • the specific connection used for get_subsysystems
  • the connection used for pings

We need to see if we really need this in all these connection. We should probably disable the protocol log for the ping connection. Maybe even for the get_subsystems one.

@gbregman gbregman self-assigned this Sep 24, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in NVMe-oF Sep 24, 2024
@gbregman
Copy link
Contributor Author

One way of doing so is:

diff --git a/control/server.py b/control/server.py
index 332cbcd..795f3af 100644
--- a/control/server.py
+++ b/control/server.py
@@ -414,7 +414,9 @@ class GatewayServer:

         # 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", "")
+        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:

This was we first try to read the field protocol_log_level from the conf file. If it's not there we fallback to the old behavior and use the log_level field. This way we maintain backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
1 participant