Skip to content

Commit fd42b87

Browse files
adk3798rkachach
authored andcommitted
mgr/cephadm: reconfig rgw daemon when certificate changes
Now updating the rgw_frontend_ssl_cert will cause us to reocnfigure rgw daemons that are part of the service. This will additionally cause us to redo the service level config operations which for rgw includes storing the cert in the config-key store where rgw will look for it Signed-off-by: Adam King <[email protected]> (cherry picked from commit 74ca2e7)
1 parent bbcd13b commit fd42b87

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/pybind/mgr/cephadm/services/cephadmservice.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,16 @@ def ingress_present() -> bool:
12671267
def config_dashboard(self, daemon_descrs: List[DaemonDescription]) -> None:
12681268
self.mgr.trigger_connect_dashboard_rgw()
12691269

1270+
def generate_config(self, daemon_spec: CephadmDaemonDeploySpec) -> Tuple[Dict[str, Any], List[str]]:
1271+
config, deps = super().generate_config(daemon_spec)
1272+
rgw_spec = cast(RGWSpec, self.mgr.spec_store[daemon_spec.service_name].spec)
1273+
ssl_cert = getattr(rgw_spec, 'rgw_frontend_ssl_certificate', None)
1274+
if isinstance(ssl_cert, list):
1275+
ssl_cert = '\n'.join(ssl_cert)
1276+
if ssl_cert:
1277+
deps.append(str(utils.md5_hash(ssl_cert)))
1278+
return config, deps
1279+
12701280

12711281
@register_cephadm_service
12721282
class RbdMirrorService(CephService):

0 commit comments

Comments
 (0)