File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -152,17 +152,21 @@ runs:
152152 set -euo pipefail
153153 set -x
154154
155- # Check if the MicroShift container is running
156- if ! sudo podman ps --format "{{.Names}}" | grep -q '^microshift-okd$' ; then
157- echo "WARNING: MicroShift container is not running - cannot collect sos report"
158- exit 0
159- fi
155+ sudo podman ps --all
160156
161- # Collect sos report from the MicroShift container
162- sudo podman exec -i microshift-okd microshift-sos-report
163- for f in $(sudo podman exec -i microshift-okd bash -c 'ls -1 /tmp/sosreport-*'); do
164- sudo podman cp microshift-okd:${f} /mnt/tmp/
165- sudo chmod 644 "/mnt/tmp/$(basename "${f}")"
157+ for i in $(seq 2 ${{ inputs.node-count }}); do
158+ # Check if the MicroShift container is running
159+ if ! sudo podman ps --format "{{.Names}}" | grep -q "^microshift-okd-${i}$" ; then
160+ echo "WARNING: MicroShift container number ${i} is not running - cannot collect sos report"
161+ exit 0
162+ fi
163+
164+ # Collect sos report from the MicroShift container
165+ sudo podman exec -i "microshift-okd-${i}" microshift-sos-report
166+ for f in $(sudo podman exec -i "microshift-okd-${i}" bash -c 'ls -1 /tmp/sosreport-*'); do
167+ sudo podman cp "microshift-okd-${i}":${f} /mnt/tmp/
168+ sudo chmod 644 "/mnt/tmp/$(basename "${f}")"
169+ done
166170 done
167171
168172 - name : Upload sos report to the GitHub Actions artifact
You can’t perform that action at this time.
0 commit comments