Skip to content

Commit bf3a294

Browse files
authored
Merge pull request ceph#54856 from linuxbox2/wip-accept-new-awssigv4
rgw: cumulatively fix 6 AWS SigV4 request failure cases Reviewed-by: Casey Bodley <[email protected]>
2 parents fda8b5a + ccbb1f5 commit bf3a294

File tree

29 files changed

+40722
-166
lines changed

29 files changed

+40722
-166
lines changed

qa/suites/rgw/verify/0-install.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
tasks:
22
- install:
33
# extra packages added for the rgw-datacache task
4+
# java and maven needed for S3 trailer signature tests
45
extra_system_packages:
5-
deb: ['s3cmd']
6-
rpm: ['s3cmd']
6+
deb: ['s3cmd', 'maven']
7+
rpm: ['s3cmd', 'maven']
78
- ceph:
89
- openssl_keys:
910
- rgw:

qa/suites/rgw/verify/tasks/cls.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ tasks:
1313
- rgw/test_rgw_gc_log.sh
1414
- rgw/test_rgw_obj.sh
1515
- rgw/test_librgw_file.sh
16+
- rgw/test_awssdkv4_sig.sh

qa/tasks/rgw.py

Lines changed: 27 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
@@ -61,6 +62,16 @@ def start_rgw(ctx, config, clients):
6162
log.info("Using %s as radosgw frontend", ctx.rgw.frontend)
6263

6364
endpoint = ctx.rgw.role_endpoints[client]
65+
66+
# create a file with rgw endpoint in it for test_awssdkv4 workunit
67+
url = endpoint.url()
68+
# remove trailing slash from the url
69+
if url[-1] == '/':
70+
url = url[:-1]
71+
url_file = '{tdir}/url_file'.format(tdir=testdir)
72+
ctx.cluster.only(client).run(args=['sudo', 'echo', '-n', '{url}'.format(url=url), run.Raw('|'), 'sudo', 'tee', url_file])
73+
ctx.cluster.only(client).run(args=['sudo', 'chown', 'ceph', url_file])
74+
6475
frontends = ctx.rgw.frontend
6576
frontend_prefix = client_config.get('frontend_prefix', None)
6677
if frontend_prefix:
@@ -70,6 +81,21 @@ def start_rgw(ctx, config, clients):
7081
# add the ssl certificate path
7182
frontends += ' ssl_certificate={}'.format(endpoint.cert.certificate)
7283
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+
7399
else:
74100
frontends += ' port={}'.format(endpoint.port)
75101

@@ -239,6 +265,7 @@ def start_rgw(ctx, config, clients):
239265
],
240266
)
241267
ctx.cluster.only(client).run(args=['sudo', 'rm', '-f', token_path])
268+
ctx.cluster.only(client).run(args=['sudo', 'rm', '-f', url_file])
242269
rgwadmin(ctx, client, cmd=['gc', 'process', '--include-all'], check_status=True)
243270

244271
def assign_endpoints(ctx, config, default_cert):

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.

qa/workunits/rgw/jcksum/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Maven
2+
target/
3+
4+
# Ignore Gradle GUI config
5+
gradle-app.setting
6+
7+
# Eclipse
8+
/.classpath
9+
/.settings/
10+
/.project
11+
/bin/
12+
13+
# IntelliJ
14+
.idea
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# Misc
20+
*.log
61.1 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

qa/workunits/rgw/jcksum/README.md

Whitespace-only changes.

qa/workunits/rgw/jcksum/file-0b

Whitespace-only changes.

0 commit comments

Comments
 (0)