Skip to content

Commit 22ab08e

Browse files
committed
Adjust formatting and remove motd
1 parent 8f3580b commit 22ab08e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/actions/aufn-test/run.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ set -euo pipefail
33

44
# AU_FROM_SEED="false"
55
# OS_IMAGE="Rocky9"
6-
# TAINT_REBUILD="false"
6+
TAINT_REBUILD="true"
77

88
echo "Starting AUFN test action with:"
99
echo "AU_FROM_SEED: $AU_FROM_SEED"
1010
echo "OS Image: $OS_IMAGE"
11+
echo "TAINT_REBUILD: $TAINT_REBUILD"
12+
echo
1113

1214
if [[ "$OS_IMAGE" == "Ubuntu" ]]; then
1315
export LAB_IMAGE_USER="ubuntu"
@@ -20,19 +22,20 @@ fi
2022

2123
function check_lab_vm_connections() {
2224
echo "Checking VM connections..."
23-
cat ssh_list.txt
2425
while IFS= read -r line; do
2526
ip=$(echo "$line" | awk '{print $3}')
2627
name=$(echo "$line" | awk '{print $2}')
2728
password=$(echo "$line" | awk '{print $5}')
2829

29-
echo "Connecting to $name ($password) at $ip ..."
30+
echo
31+
echo "Connecting to $name at $ip ..."
3032
sshpass -p "$password" ssh -o StrictHostKeyChecking=no \
3133
"lab@${ip}" 'echo "Connected to $(hostname)"'
3234
done < ssh_list.txt
3335
}
3436

3537
function validate_lab_vms() {
38+
echo
3639
echo "Validating Lab VMs setup..."
3740
index=0
3841
rm -f failed-labs.txt
@@ -42,16 +45,18 @@ function validate_lab_vms() {
4245
name=$(echo "$line" | awk '{print $2}')
4346
password=$(echo "$line" | awk '{print $5}')
4447

48+
echo
4549
echo "Validating $name at $ip..."
4650

47-
sshpass -p "$password" ssh -o StrictHostKeyChecking=no \
51+
sshpass -p "$password" ssh -o StrictHostKeyChecking=no\
4852
"lab@${ip}" <<'EOF'
4953
output=$(sudo virsh list --all)
5054
echo "$output"
5155
if ! echo "$output" | grep -q 'seed.*running'; then echo "'seed' not running"; fi
5256
if ! echo "$output" | grep -q 'compute0.*shut off'; then echo "'compute0' not shut off"; fi
5357
if ! echo "$output" | grep -q 'controller0.*shut off'; then echo "'controller0' not shut off"; fi
5458
59+
echo
5560
echo "$(ssh stack@192.168.33.5 'sudo docker ps')"
5661
if ! ssh stack@192.168.33.5 'sudo docker ps' | grep -q bifrost_deploy; then echo "Bifrost container isn't deployed"; fi
5762
if ! tail -n 10 a-seed-from-nothing.out | grep -q 'PLAY RECAP.*failed=0'; then echo "There was an error in running 'a-seed-from-nothing'"; fi
@@ -77,6 +82,7 @@ EOF
7782
index=$((index + 1))
7883
set -euo pipefail
7984
done < ssh_list.txt
85+
echo >> failed-labs.txt
8086
}
8187

8288
function taint_and_reapply() {
@@ -88,7 +94,7 @@ function taint_and_reapply() {
8894
echo "Tainting failed VMs..."
8995
while IFS= read -r line; do
9096
idx=$(echo "$line" | tr -d '\r')
91-
echo "Tainting VM at index $idx"
97+
echo "Tainting aufn-lab $idx VM"
9298
terraform taint openstack_compute_instance_v2.lab[$idx]
9399
done < failed-labs.txt
94100
echo "Rebuilding tainted Lab VMs..."

.github/workflows/deploy-aufn.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ jobs:
167167
run: |
168168
terraform output -raw labs > ssh_list.txt
169169
sed -i 's/"//g' ssh_list.txt
170+
echo >> ssh_list.txt
170171
171172
- name: Echo Lab VMs info
172173
run: |

0 commit comments

Comments
 (0)