]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: refine log message
authorSage Weil <sage@redhat.com>
Fri, 13 Mar 2020 20:00:20 +0000 (15:00 -0500)
committerSage Weil <sage@redhat.com>
Fri, 13 Mar 2020 21:33:58 +0000 (16:33 -0500)
Avoid a lot of these

2020-03-13T14:58:38.785360-0500 mgr.x [INF] No data_devices, skipping DriveGroup: osd.all

every time we consider the OSD spec and find nothing to do.  Instead, log
something like this each time we actually have work to do:

2020-03-13T15:04:22.803356-0500 mgr.x [INF] Applying osd.all on host gnit...
2020-03-13T15:04:33.723731-0500 mgr.x [INF] Deploying daemon osd.5 on gnit

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/cephadm/module.py

index 806ddce9ad0ca4409de9ea0dfcb9fe6f7be4eaa1..56e525196de061bfcb756a3f8b120c033ac3c6de 100644 (file)
@@ -1955,7 +1955,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
 
     def create_osds(self, drive_group):
         # type: (DriveGroupSpec) -> orchestrator.Completion
-        self.log.info("Processing DriveGroup {}".format(drive_group))
+        self.log.debug("Processing DriveGroup {}".format(drive_group))
         # 1) use fn_filter to determine matching_hosts
         matching_hosts = drive_group.placement.pattern_matches_hosts([x for x in self.cache.get_hosts()])
         # 2) Map the inventory to the InventoryHost object
@@ -1978,8 +1978,10 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
             cmd = translate.to_ceph_volume(drive_group, drive_selection).run()
             self.log.debug(f"translated to cmd {cmd}")
             if not cmd:
-                self.log.info("No data_devices, skipping DriveGroup: {}".format(drive_group.service_name()))
+                self.log.debug("No data_devices, skipping DriveGroup: {}".format(drive_group.service_name()))
                 continue
+            self.log.info('Applying %s on host %s...' % (
+                drive_group.service_name(), host))
             ret_msg = self._create_osd(host, cmd)
             ret.append(ret_msg)
         return trivial_result(", ".join(ret))