]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common, rbd-wnbd: bump Windows log level
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 7 Dec 2022 13:18:48 +0000 (15:18 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 24 Mar 2023 12:34:04 +0000 (12:34 +0000)
We're increasing the log level for certain Windows operational log
messages.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 3d8afc00215146fbc0226c2c6ccc7cb5dd3a2bb5)

src/common/win32/service.cc
src/tools/rbd_wnbd/rbd_wnbd.cc

index 846c5d09dfaa8859e1a0c6fd586042418a0c5c8c..7cf7620bf87bc6d119c7d0387ab45a59fb087604 100644 (file)
@@ -69,14 +69,14 @@ void WINAPI ServiceBase::run()
   s_service->set_status(SERVICE_START_PENDING);
 
   // TODO: should we expect exceptions?
-  ldout(s_service->cct, 5) << "Starting service." << dendl;
+  ldout(s_service->cct, 0) << "Starting service." << dendl;
   int err = s_service->run_hook();
   if (err) {
     lderr(s_service->cct) << "Failed to start service. Error code: "
                           << err << dendl;
     s_service->shutdown(true);
   } else {
-    ldout(s_service->cct, 5) << "Successfully started service." << dendl;
+    ldout(s_service->cct, 0) << "Successfully started service." << dendl;
     s_service->set_status(SERVICE_RUNNING);
   }
 }
@@ -98,7 +98,7 @@ void ServiceBase::shutdown(bool ignore_errors)
       set_status(original_state);
     }
   } else {
-    dout(5) << "Shutdown hook completed." << dendl;
+    dout(0) << "Shutdown hook completed." << dendl;
     set_status(SERVICE_STOPPED);
   }
 }
@@ -113,7 +113,7 @@ void ServiceBase::stop()
     derr << "Service stop hook failed. Error code: " << err << dendl;
     set_status(original_state);
   } else {
-    dout(5) << "Successfully stopped service." << dendl;
+    dout(0) << "Successfully stopped service." << dendl;
     set_status(SERVICE_STOPPED);
   }
 }
index 5188f5ae292f47ca489152dd9b01c670b8c6b5de..0671844d10412b072fd5fbea23c581af970f0455 100644 (file)
@@ -483,7 +483,7 @@ int map_device_using_suprocess(std::string arguments, int timeout_ms)
     } else {
       // The process closed the pipe without notifying us or exiting.
       // This is quite unlikely, but we'll terminate the process.
-      dout(5) << "Terminating unresponsive process." << dendl;
+      dout(0) << "Terminating unresponsive process." << dendl;
       TerminateProcess(pi.hProcess, 1);
       exit_code = -EINVAL;
     }
@@ -502,7 +502,7 @@ int map_device_using_suprocess(std::string arguments, int timeout_ms)
 
 BOOL WINAPI console_handler_routine(DWORD dwCtrlType)
 {
-  dout(5) << "Received control signal: " << dwCtrlType
+  dout(0) << "Received control signal: " << dwCtrlType
           << ". Exiting." << dendl;
 
   std::unique_lock l{shutdown_lock};
@@ -606,12 +606,12 @@ int restart_registered_mappings(
       continue;
     }
     if (cfg.wnbd_mapped) {
-      dout(5) << __func__ << ": device already mapped: "
+      dout(1) << __func__ << ": device already mapped: "
               << cfg.devpath << dendl;
       continue;
     }
     if (!cfg.persistent) {
-      dout(5) << __func__ << ": cleaning up non-persistent mapping: "
+      dout(1) << __func__ << ": cleaning up non-persistent mapping: "
               << cfg.devpath << dendl;
       r = remove_config_from_registry(&cfg);
       if (r) {
@@ -640,7 +640,7 @@ int restart_registered_mappings(
           return;
         }
 
-        dout(5) << "Remapping: " << cfg.devpath
+        dout(1) << "Remapping: " << cfg.devpath
                 << ". Timeout: " << time_left_ms << " ms." << dendl;
 
         // We'll try to map all devices and return a non-zero value
@@ -651,7 +651,7 @@ int restart_registered_mappings(
           derr << "Could not create mapping: "
                << cfg.devpath << ". Error: " << r << dendl;
         } else {
-          dout(5) << "Successfully remapped: " << cfg.devpath << dendl;
+          dout(1) << "Successfully remapped: " << cfg.devpath << dendl;
         }
       });
   }
@@ -704,7 +704,7 @@ int disconnect_all_mappings(
         cfg.hard_disconnect_fallback = true;
         cfg.soft_disconnect_timeout = time_left_ms / 1000;
 
-        dout(5) << "Removing mapping: " << cfg.devpath
+        dout(1) << "Removing mapping: " << cfg.devpath
                 << ". Timeout: " << cfg.soft_disconnect_timeout
                 << "s. Hard disconnect: " << cfg.hard_disconnect
                 << dendl;
@@ -715,7 +715,7 @@ int disconnect_all_mappings(
           derr << "Could not remove mapping: " << cfg.devpath
                << ". Error: " << r << dendl;
         } else {
-          dout(5) << "Successfully removed mapping: " << cfg.devpath << dendl;
+          dout(1) << "Successfully removed mapping: " << cfg.devpath << dendl;
         }
       });
   }
@@ -774,14 +774,14 @@ class RBDService : public ServiceBase {
     {
       switch(request->command) {
         case Connect:
-          dout(5) << "Received device connect request. Command line: "
+          dout(1) << "Received device connect request. Command line: "
                   << (char*)request->arguments << dendl;
           // TODO: use the configured service map timeout.
           // TODO: add ceph.conf options.
           return map_device_using_suprocess(
             (char*)request->arguments, DEFAULT_MAP_TIMEOUT_MS);
         default:
-          dout(5) << "Received unsupported command: "
+          dout(1) << "Received unsupported command: "
                   << request->command << dendl;
           return -ENOSYS;
       }