Skip to content

Commit 54604e0

Browse files
authored
Update operator installation readiness check (#1010)
1 parent c535914 commit 54604e0

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

cli/cmd/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ var _upCmd = &cobra.Command{
153153
exit.Error(err)
154154
}
155155
if exitCode == nil || *exitCode != 0 {
156-
helpStr := "\nDebugging tips (may not apply to this error):"
156+
helpStr := "\nDebugging tips (may or may not apply to this error):"
157157
helpStr += fmt.Sprintf("\n* if your cluster started spinning up but was unable to provision instances, additional error information may be found in the activity history of your cluster's autoscaling groups (select each autoscaling group and click the \"Activity History\" tab): https://console.aws.amazon.com/ec2/autoscaling/home?region=%s#AutoScalingGroups:", *clusterConfig.Region)
158158
helpStr += fmt.Sprintf("\n* if your cluster started spinning up, please ensure that your CloudFormation stacks for this cluster have been fully deleted before trying to spin up this cluster again: https://console.aws.amazon.com/cloudformation/home?region=%s#/stacks?filteringText=-%s-", *clusterConfig.Region, clusterConfig.ClusterName)
159159
fmt.Println(helpStr)
@@ -219,7 +219,7 @@ var _updateCmd = &cobra.Command{
219219
exit.Error(err)
220220
}
221221
if exitCode == nil || *exitCode != 0 {
222-
helpStr := "\nDebugging tips (may not apply to this error):"
222+
helpStr := "\nDebugging tips (may or may not apply to this error):"
223223
helpStr += fmt.Sprintf("\n* if your cluster was unable to provision instances, additional error information may be found in the activity history of your cluster's autoscaling groups (select each autoscaling group and click the \"Activity History\" tab): https://console.aws.amazon.com/ec2/autoscaling/home?region=%s#AutoScalingGroups:", *clusterConfig.Region)
224224
fmt.Println(helpStr)
225225
exit.Error(ErrorClusterUpdate(out + helpStr))

manager/install.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ function main() {
202202
python update_cli_config.py "/.cortex/cli.yaml" "$CORTEX_ENV_NAME" "$operator_endpoint" "$CORTEX_AWS_ACCESS_KEY_ID" "$CORTEX_AWS_SECRET_ACCESS_KEY"
203203
echo ""
204204

205-
echo -e "\ncortex is ready!"
205+
if [ "$arg1" != "--update" ] && [ "$CORTEX_OPERATOR_LOAD_BALANCER_SCHEME" == "internal" ]; then
206+
echo -e "\ncortex is ready! (it may take a few minutes for your private operator load balancer to finish initializing, but you may now set up VPC Peering)"
207+
else
208+
echo -e "\ncortex is ready!"
209+
fi
206210
}
207211

208212
function setup_configmap() {
@@ -269,6 +273,8 @@ function setup_istio() {
269273
function validate_cortex() {
270274
set +e
271275

276+
validation_start_time="$(date +%s)"
277+
272278
echo -n "○ waiting for load balancers "
273279

274280
operator_load_balancer="waiting"
@@ -278,6 +284,13 @@ function validate_cortex() {
278284
operator_endpoint=""
279285

280286
while true; do
287+
# 30 minute timeout
288+
now="$(date +%s)"
289+
if [ "$now" -ge "$(($validation_start_time+1800))" ]; then
290+
echo -e "\n\ntimeout has occurred when validating your cortex cluster"
291+
exit 1
292+
fi
293+
281294
echo -n "."
282295
sleep 3
283296

@@ -315,7 +328,7 @@ function validate_cortex() {
315328

316329
if [ "$CORTEX_OPERATOR_LOAD_BALANCER_SCHEME" == "internet-facing" ]; then
317330
if [ "$operator_endpoint_reachable" != "ready" ]; then
318-
if ! curl $operator_endpoint >/dev/null 2>&1; then
331+
if ! curl --max-time 3 $operator_endpoint >/dev/null 2>&1; then
319332
continue
320333
fi
321334
operator_endpoint_reachable="ready"

0 commit comments

Comments
 (0)