Skip to content

Commit 2fa0577

Browse files
committed
test: log in to the nested guest as cirros
The CirrOS image does not allow root SSH, so map the guest network to cirros and move the migration marker into that user's home. Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
1 parent 3d4b9cc commit 2fa0577

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

‎.github/actions/test/integration/setup/action.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ runs:
1111
mkdir -p ~/.ssh
1212
chmod 700 ~/.ssh
1313
cat > ~/.ssh/config <<'EOF'
14-
Host 192.168.122.* 192.168.222.*
14+
Host 192.168.122.*
1515
IdentityFile /opt/ssh_host_ed25519_key
1616
IdentitiesOnly yes
1717
StrictHostKeyChecking no
@@ -20,6 +20,16 @@ runs:
2020
ServerAliveInterval 15
2121
ServerAliveCountMax 4
2222
User root
23+
24+
Host 192.168.222.*
25+
IdentityFile /opt/ssh_host_ed25519_key
26+
IdentitiesOnly yes
27+
StrictHostKeyChecking no
28+
UserKnownHostsFile /dev/null
29+
ConnectTimeout 10
30+
ServerAliveInterval 15
31+
ServerAliveCountMax 4
32+
User cirros
2333
EOF
2434
chmod 600 ~/.ssh/config
2535

‎.github/actions/test/integration/test/cloudhypervisor/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ runs:
4646
# Show SSH errors on last 3 attempts for debugging
4747
if ssh "\$IP" 'exit'; then
4848
echo "VM is up at IP: \$IP"
49-
ssh "\$IP" 'echo "Hello, World!" > /opt/hello.txt'
49+
ssh "\$IP" 'echo "Hello, World!" > /home/cirros/hello.txt'
5050
break
5151
fi
5252
elif ssh "\$IP" 'exit' 2>/dev/null; then
5353
echo "VM is up at IP: \$IP"
5454
# create a dummy file for verification later
55-
ssh "\$IP" 'echo "Hello, World!" > /opt/hello.txt'
55+
ssh "\$IP" 'echo "Hello, World!" > /home/cirros/hello.txt'
5656
break
5757
fi
5858
if (( i == MAX_ITER )); then
@@ -113,7 +113,7 @@ runs:
113113
if ssh "\$IP" 'exit' 2>/dev/null; then
114114
echo "VM is up at IP: \$IP"
115115
# verify the migration by checking the dummy file
116-
if ssh "\$IP" 'test -f /opt/hello.txt'; then
116+
if ssh "\$IP" 'test -f /home/cirros/hello.txt'; then
117117
echo "Dummy file exists on VM, migration successful."
118118
break
119119
else

‎.github/actions/test/integration/test/qemu/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ runs:
4444
# Show SSH errors on last 3 attempts for debugging
4545
if ssh "\$IP" 'exit'; then
4646
echo "VM is up at IP: \$IP"
47-
ssh "\$IP" 'echo "Hello, World!" > /opt/hello.txt'
47+
ssh "\$IP" 'echo "Hello, World!" > /home/cirros/hello.txt'
4848
break
4949
fi
5050
elif ssh "\$IP" 'exit' 2>/dev/null; then
5151
echo "VM is up at IP: \$IP"
5252
# create a dummy file for verification later
53-
ssh "\$IP" 'echo "Hello, World!" > /opt/hello.txt'
53+
ssh "\$IP" 'echo "Hello, World!" > /home/cirros/hello.txt'
5454
break
5555
fi
5656
if (( i == MAX_ITER )); then
@@ -111,7 +111,7 @@ runs:
111111
if ssh "\$IP" 'exit' 2>/dev/null; then
112112
echo "VM is up at IP: \$IP"
113113
# verify the migration by checking the dummy file
114-
if ssh "\$IP" 'test -f /opt/hello.txt'; then
114+
if ssh "\$IP" 'test -f /home/cirros/hello.txt'; then
115115
echo "Dummy file exists on VM, migration successful."
116116
break
117117
else

0 commit comments

Comments
 (0)