From c9aae21d5f5f67167c1ba042054aa73254d7e1c2 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Wed, 25 Jun 2025 12:21:49 +0000 Subject: [PATCH] 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 (cherry picked from commit 7faa23f160c9f4b40d25fe27f2345dbf999b0c84) Conflicts: qa/suites/rgw/multifs/0-install.yaml - Doesn't exist in this branch, or support for it, so duplicated in individual tests. qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml - Has overrides no longer needed in main Fixes: https://tracker.ceph.com/issues/71873 Signed-off-by: Adam C. Emerson --- qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml | 5 ++++- qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml | 5 ++++- qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml | 5 ++++- qa/suites/rgw/thrash/install.yaml | 3 +++ qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml | 2 +- qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml | 2 +- qa/suites/rgw/thrash/workload/rgw_user_quota.yaml | 2 +- qa/workunits/rgw/s3_bucket_quota-run.sh | 4 ++++ qa/workunits/rgw/s3_multipart_upload-run.sh | 4 ++++ qa/workunits/rgw/s3_user_quota-run.sh | 4 ++++ qa/workunits/rgw/s3_utilities.pm | 1 + 11 files changed, 31 insertions(+), 6 deletions(-) create mode 100755 qa/workunits/rgw/s3_bucket_quota-run.sh create mode 100755 qa/workunits/rgw/s3_multipart_upload-run.sh create mode 100755 qa/workunits/rgw/s3_user_quota-run.sh diff --git a/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml b/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml index e07c8b5ccfe85..a791d9b76a870 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_bucket_quota.yaml @@ -1,11 +1,14 @@ 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] - workunit: clients: client.0: - - rgw/s3_bucket_quota.pl + - rgw/s3_bucket_quota-run.sh overrides: ceph: conf: diff --git a/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml b/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml index bac4f4016264e..e8499dcf40f1b 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_multipart_upload.yaml @@ -1,11 +1,14 @@ 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] - workunit: clients: client.0: - - rgw/s3_multipart_upload.pl + - rgw/s3_multipart_upload-run.sh overrides: ceph: conf: diff --git a/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml b/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml index 92c63d2e85019..1e204b2df92e0 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_user_quota.yaml @@ -1,11 +1,14 @@ 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] - workunit: clients: client.0: - - rgw/s3_user_quota.pl + - rgw/s3_user_quota-run.sh overrides: ceph: conf: diff --git a/qa/suites/rgw/thrash/install.yaml b/qa/suites/rgw/thrash/install.yaml index 84a1d70cfba86..637aaf9cb1df0 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 bc441ff326591..f167fc8af6e69 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 1b98f26255828..7fdef0898a06e 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 75ba3d4749b4a..59884cd082315 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 0000000000000..b57b802bff6e5 --- /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 0000000000000..db89c4c7f2e47 --- /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 0000000000000..ce3abdbe62c56 --- /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 3c3fae900e835..2622c1e3b9a9c 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; } -- 2.39.5