You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ci-operator/step-registry/hypershift/mce/ibmz/create/zvsicompute/hypershift-mce-ibmz-create-zvsicompute-commands.sh
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,23 @@ fi
72
72
73
73
# Create VPC
74
74
echo"Creating a VPC in the resource group $infra_name-rg"
75
-
ibmcloud is vpc-create $infra_name-vpc --resource-group-name $infra_name-rg
75
+
count=0
76
+
max_retries=6
77
+
sleeptime=30
78
+
while [ $count-lt$max_retries ];do
79
+
count=$(( count +1))
80
+
echo"Try $count/6: Waiting for VPC to be successfully created ..."
81
+
ibmcloud is vpc-create $infra_name-vpc --resource-group-name $infra_name-rg
82
+
create_status=$?
83
+
if [ $create_status-eq 0 ];then
84
+
echo"VPC $infra_name-vpc is created successfully"
85
+
break
86
+
else
87
+
echo"Failed to create VPC after $count/6 retry, the error code is $create_status"
88
+
sleep $sleeptime
89
+
fi
90
+
done
91
+
76
92
set +e
77
93
vpc_status=$(ibmcloud is vpc $infra_name-vpc | awk '/Status/{print $2}')
0 commit comments