Skip to content

Commit f41f230

Browse files
(MAINT) debug ssh more again
1 parent 4252d21 commit f41f230

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

.github/workflows/test-install-matrix.yaml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,46 @@ jobs:
125125
- name: Wait for SSH to be ready
126126
run: |
127127
echo ::group::wait_for_ssh
128+
# Look for SSH keys created by litmus
129+
if [ -f ./id_rsa ]; then
130+
SSH_KEY="./id_rsa"
131+
elif [ -f ./.vagrant/machines/*/virtualbox/private_key ]; then
132+
SSH_KEY="./.vagrant/machines/*/virtualbox/private_key"
133+
elif [ -f ./spec/fixtures/id_rsa ]; then
134+
SSH_KEY="./spec/fixtures/id_rsa"
135+
else
136+
echo "No SSH key found, trying password authentication"
137+
SSH_KEY=""
138+
fi
139+
140+
echo "Using SSH key: $SSH_KEY"
141+
128142
# Wait for SSH to be available on all containers via Bolt
129143
for i in {1..12}; do
130144
echo "Attempt $i: Testing Bolt SSH connectivity..."
131-
if bundle exec bolt command run 'echo "Bolt SSH test successful"' \
132-
--inventoryfile ./inventory.yaml \
133-
--targets all \
134-
--connect-timeout 10 \
135-
--no-host-key-check \
136-
--transport ssh; then
145+
146+
# Build bolt command with appropriate auth
147+
if [ -n "$SSH_KEY" ]; then
148+
bolt_cmd="bundle exec bolt command run 'echo Bolt SSH test successful' \
149+
--inventoryfile ./inventory.yaml \
150+
--targets all \
151+
--connect-timeout 30 \
152+
--no-host-key-check \
153+
--private-key $SSH_KEY \
154+
--user root"
155+
else
156+
bolt_cmd="bundle exec bolt command run 'echo Bolt SSH test successful' \
157+
--inventoryfile ./inventory.yaml \
158+
--targets all \
159+
--connect-timeout 30 \
160+
--no-host-key-check"
161+
fi
162+
163+
if eval $bolt_cmd; then
137164
echo "All containers are accessible via Bolt SSH!"
138165
break
139166
fi
167+
140168
if [ $i -eq 12 ]; then
141169
echo "Containers failed to become accessible after 12 attempts"
142170
echo "Final inventory check:"
@@ -146,7 +174,7 @@ jobs:
146174
echo "Waiting 10 seconds before retry..."
147175
sleep 10
148176
done
149-
echo ::endgroup::
177+
echo ::endgroup::
150178
- name: Install PE on test cluster
151179
timeout-minutes: 120
152180
run: |

0 commit comments

Comments
 (0)