From: Ali Maredia Date: Mon, 12 Feb 2024 23:25:17 +0000 (-0500) Subject: qa: move cert import into rgw task X-Git-Tag: v19.1.0~290^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ccbb1f5aa9c970ca1d2a15690543f8039566d2ae;p=ceph.git qa: move cert import into rgw task Signed-off-by: Ali Maredia --- diff --git a/qa/tasks/rgw.py b/qa/tasks/rgw.py index e733b73c61e48..fef38e505f309 100644 --- a/qa/tasks/rgw.py +++ b/qa/tasks/rgw.py @@ -1,6 +1,7 @@ """ rgw routines """ +from io import BytesIO import argparse import contextlib import logging @@ -80,6 +81,21 @@ def start_rgw(ctx, config, clients): # add the ssl certificate path frontends += ' ssl_certificate={}'.format(endpoint.cert.certificate) frontends += ' ssl_port={}'.format(endpoint.port) + path = 'lib/security/cacerts' + ctx.cluster.only(client).run( + args=['sudo', + 'keytool', + '-import', '-alias', '{alias}'.format( + alias=endpoint.hostname), + '-keystore', + run.Raw( + '$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)), + '-file', endpoint.cert.certificate, + '-storepass', 'changeit', + ], + stdout=BytesIO() + ) + else: frontends += ' port={}'.format(endpoint.port) diff --git a/qa/tasks/s3tests_java.py b/qa/tasks/s3tests_java.py index 78a1edb6f613d..3e20e10d06cac 100644 --- a/qa/tasks/s3tests_java.py +++ b/qa/tasks/s3tests_java.py @@ -159,23 +159,6 @@ class S3tests_java(Task): stdout=BytesIO() ) - endpoint = self.ctx.rgw.role_endpoints[client] - if endpoint.cert: - path = 'lib/security/cacerts' - self.ctx.cluster.only(client).run( - args=['sudo', - 'keytool', - '-import', '-alias', '{alias}'.format( - alias=endpoint.hostname), - '-keystore', - run.Raw( - '$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)), - '-file', endpoint.cert.certificate, - '-storepass', 'changeit', - ], - stdout=BytesIO() - ) - def create_users(self): """ Create a main and an alternative s3 user.