diff options
author | Adam King <adking@redhat.com> | 2023-05-08 16:11:24 +0200 |
---|---|---|
committer | Adam King <adking@redhat.com> | 2023-05-08 16:11:24 +0200 |
commit | 3693544e56b2480547c21575ab70ec2e67977b94 (patch) | |
tree | 2a1755f23dcacfcdce16a9e6ce40ee57bed0c891 /src/pybind/mgr | |
parent | Merge pull request #51387 from zdover23/wip-doc-2023-05-08-rados-operations-s... (diff) | |
download | ceph-3693544e56b2480547c21575ab70ec2e67977b94.tar.xz ceph-3693544e56b2480547c21575ab70ec2e67977b94.zip |
mgr/cephadm: lower log level when logging about related services
This was recently added in https://github.com/ceph/ceph/commit/088d2c4205c599a7d4f2ce4de8e2af8e129adac8
and seems to work fine, but logging these things at info
level spams the log as every single service every serve
loop iteration is reporting on whether it has related
daemons. This changes it to only log when it finds
related daemons or when it prefers a host due to those
related daemons, and do both of those at only debug level.
Signed-off-by: Adam King <adking@redhat.com>
Diffstat (limited to 'src/pybind/mgr')
-rw-r--r-- | src/pybind/mgr/cephadm/inventory.py | 4 | ||||
-rw-r--r-- | src/pybind/mgr/cephadm/schedule.py | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py index 929bc2c343f..98c9a488078 100644 --- a/src/pybind/mgr/cephadm/inventory.py +++ b/src/pybind/mgr/cephadm/inventory.py @@ -1113,14 +1113,14 @@ class HostCache(): if service_spec.service_type == 'ingress': dds = list(dd for dd in self._get_daemons() if dd.service_name() == cast(IngressSpec, service_spec).backend_service) dds += list(dd for dd in self._get_tmp_daemons() if dd.service_name() == cast(IngressSpec, service_spec).backend_service) - logger.info(f'Found related daemons {dds} for service {service_spec.service_name()}') + logger.debug(f'Found related daemons {dds} for service {service_spec.service_name()}') return dds else: for ingress_spec in [cast(IngressSpec, s) for s in self.mgr.spec_store.active_specs.values() if s.service_type == 'ingress']: if ingress_spec.backend_service == service_spec.service_name(): dds = list(dd for dd in self._get_daemons() if dd.service_name() == ingress_spec.service_name()) dds += list(dd for dd in self._get_tmp_daemons() if dd.service_name() == ingress_spec.service_name()) - logger.info(f'Found related daemons {dds} for service {service_spec.service_name()}') + logger.debug(f'Found related daemons {dds} for service {service_spec.service_name()}') return dds return None diff --git a/src/pybind/mgr/cephadm/schedule.py b/src/pybind/mgr/cephadm/schedule.py index 0e39c8ee6d9..888a2a0335d 100644 --- a/src/pybind/mgr/cephadm/schedule.py +++ b/src/pybind/mgr/cephadm/schedule.py @@ -258,11 +258,6 @@ class HostAssignment(object): self.validate() - if self.related_service_daemons: - logger.info(f'Service {self.service_name} has related daemons already placed: {self.related_service_daemons}') - else: - logger.info(f'Service {self.service_name} has no related daemon already placed.') - count = self.spec.placement.count # get candidate hosts based on [hosts, label, host_pattern] @@ -362,7 +357,7 @@ class HostAssignment(object): if need <= 0: break if dp.hostname in related_service_hosts and dp.hostname not in [h.hostname for h in self.unreachable_hosts]: - logger.info(f'Preferring {dp.hostname} for service {self.service_name} as related daemons have been placed there') + logger.debug(f'Preferring {dp.hostname} for service {self.service_name} as related daemons have been placed there') to_add.append(dp) need -= 1 # this is last use of need so it can work as a counter # at this point, we've either met our placement quota entirely using hosts with related |