From: Redouane Kachach Date: Fri, 7 Feb 2025 10:46:25 +0000 (+0100) Subject: mgr/cephadm: adding the SSL cert as a dependency for rgw service X-Git-Tag: v20.0.0~107^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bd049edb9421071bf97eb4515d4ada09259a1d3c;p=ceph.git mgr/cephadm: adding the SSL cert as a dependency for rgw service this way when the user changes the SSL certificate in the spec and performs an 'orch apply' cephadm will detect the change and reconfigure the rgw service automatically Fixes: https://tracker.ceph.com/issues/69863 Signed-off-by: Redouane Kachach --- diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index 301b7ca2f414..70354282a189 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -996,6 +996,21 @@ class RgwService(CephService): def allow_colo(self) -> bool: return True + @classmethod + def get_dependencies(cls, mgr: "CephadmOrchestrator", + spec: Optional[ServiceSpec] = None, + daemon_type: Optional[str] = None) -> List[str]: + + deps = [] + rgw_spec = cast(RGWSpec, spec) + ssl_cert = getattr(rgw_spec, 'rgw_frontend_ssl_certificate', None) + if ssl_cert: + if isinstance(ssl_cert, list): + ssl_cert = '\n'.join(ssl_cert) + deps.append(f'ssl-cert:{str(utils.md5_hash(ssl_cert))}') + + return sorted(deps) + def set_realm_zg_zone(self, spec: RGWSpec) -> None: assert self.TYPE == spec.service_type