From 40f36e94db0baf9551095bd25b8d9425f2cb1891 Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Tue, 10 Sep 2024 09:47:44 +0200 Subject: [PATCH] mgr/cephadm: open ceph-exporter when firewalld is enabled ceph-exporter port was not opened properly during daemon deployment forcing the user to open it manually. This change fixes the logic to open the port automatically. Fixes: https://tracker.ceph.com/issues/67975 Signed-off-by: Redouane Kachach (cherry picked from commit fd93ecd88a5f31172ec99921f72bee12bdd4a6b9) Conflicts: src/pybind/mgr/cephadm/tests/test_services.py Conflict is because there was a new security related test that was part of a feature in main but not squid that included the ceph-exporter port --- src/python-common/ceph/deployment/service_spec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index d99f656fbfe1..a32d056a7050 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -2562,6 +2562,9 @@ class CephExporterSpec(ServiceSpec): self.prio_limit = prio_limit self.stats_period = stats_period + def get_port_start(self) -> List[int]: + return [self.port or 9926] + def validate(self) -> None: super(CephExporterSpec, self).validate() -- 2.47.3