Skip to content

Commit

Permalink
Fixed Script Lint Issues
Browse files Browse the repository at this point in the history
Signed-off-by: Utkarsh Bhatt <[email protected]>
  • Loading branch information
UtkarshBhatthere committed Jan 11, 2024
1 parent 89fe07b commit 10cb50d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/q2q-candidate-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/q2r-candidate-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
10 changes: 8 additions & 2 deletions scripts/appS3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions tests/scripts/actionutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 10cb50d

Please sign in to comment.