Skip to content

Commit ccbb1f5

Browse files
committed
qa: move cert import into rgw task
Signed-off-by: Ali Maredia <[email protected]>
1 parent 639ea51 commit ccbb1f5

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

qa/tasks/rgw.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
rgw routines
33
"""
4+
from io import BytesIO
45
import argparse
56
import contextlib
67
import logging
@@ -80,6 +81,21 @@ def start_rgw(ctx, config, clients):
8081
# add the ssl certificate path
8182
frontends += ' ssl_certificate={}'.format(endpoint.cert.certificate)
8283
frontends += ' ssl_port={}'.format(endpoint.port)
84+
path = 'lib/security/cacerts'
85+
ctx.cluster.only(client).run(
86+
args=['sudo',
87+
'keytool',
88+
'-import', '-alias', '{alias}'.format(
89+
alias=endpoint.hostname),
90+
'-keystore',
91+
run.Raw(
92+
'$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)),
93+
'-file', endpoint.cert.certificate,
94+
'-storepass', 'changeit',
95+
],
96+
stdout=BytesIO()
97+
)
98+
8399
else:
84100
frontends += ' port={}'.format(endpoint.port)
85101

qa/tasks/s3tests_java.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,6 @@ def install_required_packages(self, client):
159159
stdout=BytesIO()
160160
)
161161

162-
endpoint = self.ctx.rgw.role_endpoints[client]
163-
if endpoint.cert:
164-
path = 'lib/security/cacerts'
165-
self.ctx.cluster.only(client).run(
166-
args=['sudo',
167-
'keytool',
168-
'-import', '-alias', '{alias}'.format(
169-
alias=endpoint.hostname),
170-
'-keystore',
171-
run.Raw(
172-
'$(readlink -e $(dirname $(readlink -e $(which keytool)))/../{path})'.format(path=path)),
173-
'-file', endpoint.cert.certificate,
174-
'-storepass', 'changeit',
175-
],
176-
stdout=BytesIO()
177-
)
178-
179162
def create_users(self):
180163
"""
181164
Create a main and an alternative s3 user.

0 commit comments

Comments
 (0)