From: Mark Kogan Date: Wed, 25 Jun 2025 12:21:49 +0000 (+0000) Subject: qa/rgw: fix perl tests missing Amazon::S3 module X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F63760%2Fhead;p=ceph.git qa/rgw: fix perl tests missing Amazon::S3 module and a second case where perl tests can fail without error output 1. fix errors like: `Can't locate Amazon/S3.pm in @INC (you may need to install the Amazon::S3 module)` by priming the perl tests with installing the Amazon::S3 module from cpan ex: ``` 2025-06-23T19:18:40.162 INFO:tasks.workunit.client.0.smithi090.stderr:Can't locate Amazon/S3.pm in @INC (you may need to install the Amazon::S3 module) (@INC contains: /usr/local/lib64/perl5/5.32 ... ``` 2. log an error when RGW process is not detected Fixes: https://tracker.ceph.com/issues/71577 Signed-off-by: Mark Kogan --- diff --git a/qa/suites/rgw/multifs/0-install.yaml b/qa/suites/rgw/multifs/0-install.yaml index 7e83140e64ac..34c61dd9c6b2 100644 --- a/qa/suites/rgw/multifs/0-install.yaml +++ b/qa/suites/rgw/multifs/0-install.yaml @@ -1,5 +1,8 @@ tasks: - install: + extra_system_packages: + deb: ['cpanminus', 'libxml-simple-perl'] + rpm: ['cpanminus', 'perl-XML-Simple', 'perl-LWP-Protocol-https', 'perl-ExtUtils-Config', 'perl-ExtUtils-Helpers', 'perl-ExtUtils-InstallPaths', 'perl-Module-Build-Tiny'] - ceph: - rgw: [client.0] - tox: [client.0] diff --git a/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml b/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml index d9526c365c17..e5c63374bac3 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml @@ -2,4 +2,4 @@ tasks: - workunit: clients: client.0: - - rgw/s3_bucket_quota.pl + - rgw/s3_bucket_quota-run.sh diff --git a/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml b/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml index ae32e9286615..644b2f2037d5 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml @@ -2,4 +2,4 @@ tasks: - workunit: clients: client.0: - - rgw/s3_multipart_upload.pl + - rgw/s3_multipart_upload-run.sh diff --git a/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml b/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml index 393180e5c172..a0753947d787 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml @@ -2,4 +2,4 @@ tasks: - workunit: clients: client.0: - - rgw/s3_user_quota.pl + - rgw/s3_user_quota-run.sh diff --git a/qa/suites/rgw/thrash/install.yaml b/qa/suites/rgw/thrash/install.yaml index 84a1d70cfba8..637aaf9cb1df 100644 --- a/qa/suites/rgw/thrash/install.yaml +++ b/qa/suites/rgw/thrash/install.yaml @@ -1,5 +1,8 @@ tasks: - install: + extra_system_packages: + deb: ['cpanminus', 'libxml-simple-perl'] + rpm: ['cpanminus', 'perl-XML-Simple', 'perl-LWP-Protocol-https', 'perl-ExtUtils-Config', 'perl-ExtUtils-Helpers', 'perl-ExtUtils-InstallPaths', 'perl-Module-Build-Tiny'] - ceph: - rgw: [client.0] diff --git a/qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml b/qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml index bc441ff32659..f167fc8af6e6 100644 --- a/qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml +++ b/qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml @@ -2,7 +2,7 @@ tasks: - workunit: clients: client.0: - - rgw/s3_bucket_quota.pl + - rgw/s3_bucket_quota-run.sh overrides: ceph: conf: diff --git a/qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml b/qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml index 1b98f2625582..7fdef0898a06 100644 --- a/qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml +++ b/qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml @@ -2,7 +2,7 @@ tasks: - workunit: clients: client.0: - - rgw/s3_multipart_upload.pl + - rgw/s3_multipart_upload-run.sh overrides: ceph: conf: diff --git a/qa/suites/rgw/thrash/workload/rgw_user_quota.yaml b/qa/suites/rgw/thrash/workload/rgw_user_quota.yaml index 75ba3d4749b4..59884cd08231 100644 --- a/qa/suites/rgw/thrash/workload/rgw_user_quota.yaml +++ b/qa/suites/rgw/thrash/workload/rgw_user_quota.yaml @@ -2,7 +2,7 @@ tasks: - workunit: clients: client.0: - - rgw/s3_user_quota.pl + - rgw/s3_user_quota-run.sh overrides: ceph: conf: diff --git a/qa/workunits/rgw/s3_bucket_quota-run.sh b/qa/workunits/rgw/s3_bucket_quota-run.sh new file mode 100755 index 000000000000..b57b802bff6e --- /dev/null +++ b/qa/workunits/rgw/s3_bucket_quota-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -ex +cpanm --sudo Amazon::S3 +exec perl $(dirname $0)/s3_bucket_quota.pl diff --git a/qa/workunits/rgw/s3_multipart_upload-run.sh b/qa/workunits/rgw/s3_multipart_upload-run.sh new file mode 100755 index 000000000000..db89c4c7f2e4 --- /dev/null +++ b/qa/workunits/rgw/s3_multipart_upload-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -ex +cpanm --sudo Amazon::S3 +exec perl $(dirname $0)/s3_multipart_upload.pl diff --git a/qa/workunits/rgw/s3_user_quota-run.sh b/qa/workunits/rgw/s3_user_quota-run.sh new file mode 100755 index 000000000000..ce3abdbe62c5 --- /dev/null +++ b/qa/workunits/rgw/s3_user_quota-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -ex +cpanm --sudo Amazon::S3 +exec perl $(dirname $0)/s3_user_quota.pl diff --git a/qa/workunits/rgw/s3_utilities.pm b/qa/workunits/rgw/s3_utilities.pm index 5a91db9d1fdd..480d571f3ae9 100644 --- a/qa/workunits/rgw/s3_utilities.pm +++ b/qa/workunits/rgw/s3_utilities.pm @@ -32,6 +32,7 @@ sub get_status { if ($status =~ /\d+/ ){ return 0; } + warn "ERROR: $service is not running\n"; return 1; }