Skip to content

Commit

Permalink
main exit test: wait for gateway name to appear
Browse files Browse the repository at this point in the history
example error: https://github.com/ceph/ceph-nvmeof/actions/runs/11553143252/job/32154126711?pr=918

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
  • Loading branch information
Alexander Indenbaum committed Oct 28, 2024
1 parent adbf7f4 commit 2aa12ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/ha/main_exit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ background_task() {
docker compose top

echo ℹ️ Send nvme-gw create for all gateways
GW_NAME=''
GW_GROUP=''
i=1 # a single gw index
GW_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | grep -v discovery | awk '$2 ~ /nvmeof/ && $2 ~ /'$i'/ {print $1}')
while [ ! -n "$GW_NAME" ]; do
sleep 1
GW_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | grep -v discovery | awk '$2 ~ /nvmeof/ && $2 ~ /'$i'/ {print $1}')
done
echo 📫 nvme-gw create gateway: \'$GW_NAME\' pool: \'$POOL\', group: \'$GW_GROUP\'
docker compose exec -T ceph ceph nvme-gw create $GW_NAME $POOL "$GW_GROUP"
docker compose exec -T ceph ceph nvme-gw show $POOL "$GW_GROUP"

echo ℹ️ Wait for gateway to be ready
while true; do
Expand Down

0 comments on commit 2aa12ba

Please sign in to comment.