From: Redouane Kachach Date: Tue, 10 Sep 2024 07:47:44 +0000 (+0200) Subject: mgr/cephadm: open ceph-exporter when firewalld is enabled X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=40f36e94db0baf9551095bd25b8d9425f2cb1891;p=ceph.git 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 --- diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index d99f656fbfe..a32d056a705 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()