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 <mkogan@redhat.com>
(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 <aemerson@redhat.com>
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:
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:
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:
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:
- workunit:
clients:
client.0:
- - rgw/s3_multipart_upload.pl
+ - rgw/s3_multipart_upload-run.sh
overrides:
ceph:
conf:
- workunit:
clients:
client.0:
- - rgw/s3_user_quota.pl
+ - rgw/s3_user_quota-run.sh
overrides:
ceph:
conf:
--- /dev/null
+#!/bin/bash
+set -ex
+cpanm --sudo Amazon::S3
+exec perl $(dirname $0)/s3_bucket_quota.pl
--- /dev/null
+#!/bin/bash
+set -ex
+cpanm --sudo Amazon::S3
+exec perl $(dirname $0)/s3_multipart_upload.pl
--- /dev/null
+#!/bin/bash
+set -ex
+cpanm --sudo Amazon::S3
+exec perl $(dirname $0)/s3_user_quota.pl
if ($status =~ /\d+/ ){
return 0;
}
+ warn "ERROR: $service is not running\n";
return 1;
}