]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: fix perl tests missing Amazon::S3 module 64279/head
authorMark Kogan <mkogan@redhat.com>
Wed, 25 Jun 2025 12:21:49 +0000 (12:21 +0000)
committerMark Kogan <mkogan@ibm.com>
Tue, 1 Jul 2025 10:53:33 +0000 (10:53 +0000)
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)

12 files changed:
qa/suites/rgw/multifs/0-install.yaml
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
qa/suites/rgw/thrash/install.yaml
qa/suites/rgw/thrash/workload/rgw_bucket_quota.yaml
qa/suites/rgw/thrash/workload/rgw_multipart_upload.yaml
qa/suites/rgw/thrash/workload/rgw_user_quota.yaml
qa/workunits/rgw/s3_bucket_quota-run.sh [new file with mode: 0755]
qa/workunits/rgw/s3_multipart_upload-run.sh [new file with mode: 0755]
qa/workunits/rgw/s3_user_quota-run.sh [new file with mode: 0755]
qa/workunits/rgw/s3_utilities.pm

index 7e83140e64acea8ce1fad202d1f80e1f8e7a6c34..34c61dd9c6b24dc3492c95eedcbcbabc2546c67f 100644 (file)
@@ -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]
index d9526c365c17d6e1e4d1efc60d2827d1b5e15c14..e5c63374bac31216b7edec09449d940027696d3b 100644 (file)
@@ -2,4 +2,4 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/s3_bucket_quota.pl
+        - rgw/s3_bucket_quota-run.sh
index ae32e9286615dffb3df3b49b68840e0f44ea2fc8..644b2f2037d5f9cd4b3c66608bbcab296d489fdb 100644 (file)
@@ -2,4 +2,4 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/s3_multipart_upload.pl
+        - rgw/s3_multipart_upload-run.sh
index 393180e5c1729cfa9b7b091a5370d6657eecfb76..a0753947d7872c6ca44464f74c77d9cd269c312f 100644 (file)
@@ -2,4 +2,4 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/s3_user_quota.pl
+        - rgw/s3_user_quota-run.sh
index 84a1d70cfba86cb16dce6e71e2904b6fb55ca9ca..637aaf9cb1df0d34ac239457dbd7a73045006aa2 100644 (file)
@@ -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]
 
index bc441ff326591d2a48a6d416f3ea6e08a0358c47..f167fc8af6e6980681e24f34827e0798c580aed3 100644 (file)
@@ -2,7 +2,7 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/s3_bucket_quota.pl
+        - rgw/s3_bucket_quota-run.sh
 overrides:
   ceph:
     conf:
index 1b98f26255828a7cedf98e88318f9992a6298d09..7fdef0898a06ee9840308c102654442141b255d6 100644 (file)
@@ -2,7 +2,7 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/s3_multipart_upload.pl
+        - rgw/s3_multipart_upload-run.sh
 overrides:
   ceph:
     conf:
index 75ba3d4749b4ae0e65f9d5b56370f4b9adb3e4bc..59884cd08231561cec2d9589240bc03a293da696 100644 (file)
@@ -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 (executable)
index 0000000..b57b802
--- /dev/null
@@ -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 (executable)
index 0000000..db89c4c
--- /dev/null
@@ -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 (executable)
index 0000000..ce3abdb
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -ex
+cpanm --sudo Amazon::S3
+exec perl $(dirname $0)/s3_user_quota.pl
index 5a91db9d1fdd30b3f4884da12b4d10ede64ee16a..480d571f3ae986bba6a78e32c29b43341195d075 100644 (file)
@@ -32,6 +32,7 @@ sub get_status {
     if ($status =~ /\d+/ ){
         return 0;
     }
+    warn "ERROR: $service is not running\n";
     return 1;
 }