Skip to content

Commit 1f39c34

Browse files
authored
Change the network address assignment after the cluster creation (#3982)
* Change the network address assignment after the cluster creation
1 parent 1a4464b commit 1f39c34

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

vztest.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,23 @@ EOF
223223

224224
function wait_for_installs() {
225225
if [ "$ADMIN_CLUSTER" != "false" ] ; then
226-
$KA wait --timeout=60m --for=condition=InstallComplete verrazzano/admin
226+
done=1
227+
elapsed_time=0
228+
while [ $done -ne 0 ] && [ $elapsed_time -lt $VZ_INSTALL_TIMEOUT ]
229+
do
230+
install_status=$($KA wait --timeout=3m --for=condition=InstallComplete verrazzano/admin)
231+
echo $install_status
232+
if echo "$install_status" | grep -q 'condition met'; then
233+
echo "verrazzano installation complete"
234+
echo "It took $elapsed_time minutes to complete verrazzano installation"
235+
done=0
236+
else
237+
elapsed_time=$((elapsed_time + 3))
238+
echo "verrazzano installtion is not complete"
239+
fi
240+
$KA get all -A
241+
$KA get events -A --sort-by=.lastTimestamp
242+
done
227243
fi
228244
if [ "$MANAGED_CLUSTER" != "false" ] ; then
229245
$K1 wait --timeout=60m --for=condition=InstallComplete verrazzano/managed1
@@ -419,19 +435,19 @@ if [ "$REGISTER_ONLY" != "true" ]; then
419435
delete_cluster admin
420436
delete_cluster managed1
421437

422-
SUBNET=$(${WLSIMG_BUILDER:-docker} inspect kind | jq '.[0].IPAM.Config[0].Subnet' -r | sed 's|/.*||g')
423-
ADMIN_ADDR_RANGE="${SUBNET%.*}.230-${SUBNET%.*}.250"
424-
MANAGED1_ADDR_RANGE="${SUBNET%.*}.210-${SUBNET%.*}.229"
425-
426438
if [ "$ADMIN_CLUSTER" != "false" ] ; then
427439
echo
428440
create_cluster admin
441+
SUBNET=$(${WLSIMG_BUILDER:-docker} inspect kind | jq '.[0].IPAM.Config[0].Subnet' -r | sed 's|/.*||g')
442+
ADMIN_ADDR_RANGE="${SUBNET%.*}.230-${SUBNET%.*}.250"
429443
install_metallb $ADMIN_ADDR_RANGE "$KA"
430444
install_verrazzano_admin
431445
fi
432446
if [ "$MANAGED_CLUSTER" != "false" ] ; then
433447
echo
434448
create_cluster managed1
449+
SUBNET=$(${WLSIMG_BUILDER:-docker} inspect kind | jq '.[0].IPAM.Config[0].Subnet' -r | sed 's|/.*||g')
450+
MANAGED1_ADDR_RANGE="${SUBNET%.*}.210-${SUBNET%.*}.229"
435451
install_metallb $MANAGED1_ADDR_RANGE "$K1"
436452
install_verrazzano_managed
437453
fi

0 commit comments

Comments
 (0)