]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Allow passing ssl_certificate as an rgw_frontend_extra_arg. 61922/head
authoraza547 <alexander-12345@hotmail.co.uk>
Sun, 26 Jan 2025 18:10:59 +0000 (18:10 +0000)
committerAdam King <adking@redhat.com>
Wed, 19 Feb 2025 22:01:15 +0000 (17:01 -0500)
Fixes: https://tracker.ceph.com/issues/69567
Signed-off-by: Alexander Hussein-Kershaw <alexhus@microsoft.com>
fix markup

(cherry picked from commit 154307e817a0646e7171906d34353c6af0e82dee)

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

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

index b1d86edbe7216192fc21135b45ca9f0ce21507ac..159493902f91147bad6ac78f44c4ad2415115e30 100644 (file)
@@ -981,6 +981,14 @@ class RgwService(CephService):
         # configure frontend
         args = []
         ftype = spec.rgw_frontend_type or "beast"
+
+        # if an ssl_certificate arg was passed as part of rgw_frontend_extra_args
+        # then we shouldn't add it automatically else the rgw won't start
+        extra_ssl_cert_provided = any(
+            arg.startswith("ssl_certificate=")
+            for arg in (spec.rgw_frontend_extra_args or [])
+        )
+
         if ftype == 'beast':
             if spec.ssl:
                 if daemon_spec.ip:
@@ -988,7 +996,8 @@ class RgwService(CephService):
                         f"ssl_endpoint={build_url(host=daemon_spec.ip, port=port).lstrip('/')}")
                 else:
                     args.append(f"ssl_port={port}")
-                args.append(f"ssl_certificate=config://rgw/cert/{spec.service_name()}")
+                if not extra_ssl_cert_provided:
+                    args.append(f"ssl_certificate=config://rgw/cert/{spec.service_name()}")
             else:
                 if daemon_spec.ip:
                     args.append(f"endpoint={build_url(host=daemon_spec.ip, port=port).lstrip('/')}")
@@ -1001,7 +1010,8 @@ class RgwService(CephService):
                     args.append(f"port={build_url(host=daemon_spec.ip, port=port).lstrip('/')}s")
                 else:
                     args.append(f"port={port}s")  # note the 's' suffix on port
-                args.append(f"ssl_certificate=config://rgw/cert/{spec.service_name()}")
+                if not extra_ssl_cert_provided:
+                    args.append(f"ssl_certificate=config://rgw/cert/{spec.service_name()}")
             else:
                 if daemon_spec.ip:
                     args.append(f"port={build_url(host=daemon_spec.ip, port=port).lstrip('/')}")