Skip to content

Commit

Permalink
CI: add tests/ha/ceph_status.sh
Browse files Browse the repository at this point in the history
Verify nvmeof service in ceph status output.

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
  • Loading branch information
VallariAg committed Sep 9, 2024
1 parent abf9ba9 commit d5e408b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test: ["sanity", "state_transitions", "state_transitions_both_gws", "state_transitions_loop", "state_transitions_rand_loop", "late_registration", "late_registration_loop", "4gws", "4gws_loop", "4gws_create_delete", "4gws_create_delete_loop", "namespaces", "namespaces_loop", "mtls", "notify"]
test: ["sanity", "state_transitions", "state_transitions_both_gws", "state_transitions_loop", "state_transitions_rand_loop", "late_registration", "late_registration_loop", "4gws", "4gws_loop", "4gws_create_delete", "4gws_create_delete_loop", "namespaces", "namespaces_loop", "mtls", "notify", "ceph_status"]
runs-on: ubuntu-latest
env:
HUGEPAGES: 1024 # 4 spdk instances
Expand Down
22 changes: 22 additions & 0 deletions tests/ha/ceph_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set -xe

POOL="${RBD_POOL:-rbd}"
CEPH_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | grep -v nvme | grep ceph | awk '{print $1}')
GW1_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | awk '$2 ~ /nvmeof/ && $2 ~ /1/ {print $1}')

docker compose exec -T ceph ceph service dump
docker compose exec -T ceph ceph status

echo "ℹ️ Step 1: verify 2 gateways"

docker compose exec -T ceph ceph status | grep "nvmeof: 2 gateways active"

echo "ℹ️ Step 2: stop a gateway"

docker stop $GW1_NAME
wait
sleep 5

echo "ℹ️ Step 3: verify 1 gateway"

docker compose exec -T ceph ceph status | grep "nvmeof: 1 gateway active"

0 comments on commit d5e408b

Please sign in to comment.