Skip to content

Commit

Permalink
Add "ceph nvme-gw create" command and ceph logs artifact
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Mar 1, 2024
1 parent b01d7ee commit 72eac4d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,9 @@ jobs:
docker load < bdevperf.tar
- name: Start HA with two gateways
timeout-minutes: 3
run: |
docker-compose up -d --scale nvmeof=2 nvmeof
./tests/ha/start_up.sh
- name: Wait for gateways to be listening
timeout-minutes: 3
Expand Down Expand Up @@ -636,6 +637,17 @@ jobs:
name: core_demo
path: /tmp/coredump/core.*

- name: Copy ceph logs
if: success() || failure()
run: docker cp ceph:/ceph/out /tmp/out

- name: Upload ceph logs
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ceph_out
path: /tmp/out/*

- name: Display logs
if: success() || failure()
run: make logs OPTS=''
Expand Down
22 changes: 22 additions & 0 deletions tests/ha/start_up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set -ex
docker-compose up -d --scale nvmeof=2 nvmeof

echo "Wait for ceph container to become healthy"
while true; do
container_status=$(docker inspect --format='{{.State.Health.Status}}' ceph)
if [[ $container_status == "healthy" ]]; then
# success
break
else
# Wait for a specific time before checking again
sleep 1
echo -n .
fi
done
docker ps

# Send nvme-gw create for both gateways
for i in $(seq 2); do
GW_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | awk '$2 ~ /nvmeof/ && $2 ~ /'$i'/ {print $1}')
docker-compose exec ceph ceph nvme-gw create $GW_NAME rbd ''
done

0 comments on commit 72eac4d

Please sign in to comment.