From a163bc8f1ba969fe6a8f5de6eb9c592e54add325 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatt Date: Thu, 11 Jan 2024 16:21:48 +0530 Subject: [PATCH] Fixed CI Issues Signed-off-by: Utkarsh Bhatt --- .github/workflows/q2q-candidate-upgrade.yml | 2 +- .github/workflows/q2r-candidate-upgrade.yaml | 2 +- .github/workflows/tests.yml | 13 ++++++++----- scripts/appS3.py | 10 ++++++++-- tests/scripts/actionutils.sh | 6 ++++-- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/q2q-candidate-upgrade.yml b/.github/workflows/q2q-candidate-upgrade.yml index 3f49df94..f4454fac 100644 --- a/.github/workflows/q2q-candidate-upgrade.yml +++ b/.github/workflows/q2q-candidate-upgrade.yml @@ -63,4 +63,4 @@ jobs: run: ~/actionutils.sh headexec wait_for_osds 3 - name: Exercise RGW again - run: ~/actionutils.sh testrgw_on_lxd node-wrk0 + run: ~/actionutils.sh testrgw_on_headnode diff --git a/.github/workflows/q2r-candidate-upgrade.yaml b/.github/workflows/q2r-candidate-upgrade.yaml index 0c88192f..99f85476 100644 --- a/.github/workflows/q2r-candidate-upgrade.yaml +++ b/.github/workflows/q2r-candidate-upgrade.yaml @@ -63,4 +63,4 @@ jobs: run: ~/actionutils.sh headexec wait_for_osds 3 - name: Exercise RGW again - run: ~/actionutils.sh testrgw_on_lxd node-wrk0 + run: ~/actionutils.sh testrgw_on_headnode diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 466bbb03..acc269b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -303,6 +303,13 @@ jobs: - name: Enable services on wrk1 run: ~/actionutils.sh headexec enable_services node-wrk1 + - name: Enable RGW + run: ~/actionutils.sh headexec enable_rgw + + - name: Exercise RGW again + run: | + ~/actionutils.sh testrgw_on_headnode + - name: Test remove node wrk3 run: | set -uex @@ -434,11 +441,7 @@ jobs: - name: Wait until 3 OSDs are up run: ~/actionutils.sh headexec wait_for_osds 3 - - name: Install boto3 on head node. - run: | - ~/actionutils.sh headexec install_boto3 - - name: Exercise RGW again run: | - ~/actionutils.sh testrgw_on_lxd node-wrk0 + ~/actionutils.sh testrgw_on_headnode diff --git a/scripts/appS3.py b/scripts/appS3.py index e43a0c6b..e298d993 100644 --- a/scripts/appS3.py +++ b/scripts/appS3.py @@ -38,10 +38,16 @@ def app_handle(args): (object_name, object_size) ) # Print object IO summary: - print("Object #{}: {}/{} -> Size: {}MB".format(i, bucket_name, object_name, object_size)) + print( + "Object #{}: {}/{} -> Size: {}MB" + .format(i, bucket_name, object_name, object_size) + ) # Print Summary - print("IO Summary: Object Count {}, Total Size {}MB".format(args.obj_num, sum(size for _, size in objects))) + print( + "IO Summary: Object Count {}, Total Size {}MB" + .format(args.obj_num, sum(size for _, size in objects)) + ) # Cleanup (if asked for) if not args.no_delete: diff --git a/tests/scripts/actionutils.sh b/tests/scripts/actionutils.sh index 401576d7..c5e1270a 100755 --- a/tests/scripts/actionutils.sh +++ b/tests/scripts/actionutils.sh @@ -337,11 +337,13 @@ function testrgw() { rm keys.json } -function testrgw_on_lxd() { +function testrgw_on_headnode() { set -eux local container="${1?missing}" + local nw=$(get_lxd_network public) + gw=$(echo "$nw" | cut -d/ -f1) lxc exec $container -- sh -c "microceph client s3 create testUser --json" > keys.json - sudo python3 ./scripts/appS3.py http://localhost:80 keys.json --obj-num 2 + sudo python3 ./scripts/appS3.py http://${gw}0:80 keys.json --obj-num 2 # cleanup lxc exec $container -- sh -c "microceph client s3 delete testUser"