Improve control flow

This commit is contained in:
Derek Smith 2023-03-18 11:06:36 -04:00
parent e8499ab6f7
commit dcf9e37407
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
4 changed files with 7 additions and 2 deletions

View File

@ -382,7 +382,6 @@ EOL
# check if the OVN network exists in this project.
if ! lxc network list | grep -q "ss-ovn"; then
lxc network create ss-ovn --type=ovn network=lxdbr1 ipv6.address=none
# ipv4.nat=false
fi
export MAC_ADDRESS_TO_PROVISION=

View File

@ -42,6 +42,7 @@ if ! lxc list --format csv | grep -q "$LXD_VM_NAME"; then
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
lxc start "$LXD_VM_NAME"
sleep 10
bash -c "./wait_for_lxc_ip.sh --lxd-name=$LXD_VM_NAME"
fi

View File

@ -42,3 +42,8 @@ while true; do
printf '.'
fi
done
# wait for cloud-init to complet before returning.
while lxc exec "$LXC_INSTANCE_NAME" -- [ ! -f /var/lib/cloud/instance/boot-finished ]; do
sleep 1
done