(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-o)} {(errexit)})
    (C {(Id.KW_Set set)} {(-o)} {(nounset)})
    (C {(Id.KW_Set set)} {(-o)} {(pipefail)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:KUBE_ROOT)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:80)
                command_list: 
                  (command.CommandList
                    children: [(C {(dirname)} {(DQ (${ Id.VSub_Name BASH_SOURCE))})]
                  )
              ) (/..)
            }
          spids: [79]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(-f)} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/cluster/env.sh))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:106)
            )
          ]
          action: [(C {(source)} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/cluster/env.sh))})]
          spids: [92 108]
        )
      ]
    )
    (C {(source)} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/hack/lib/util.sh))})
    (C {(source)} {(DQ (${ Id.VSub_Name KUBE_ROOT) (/cluster/kube-util.sh))})
    (command.ShFunction
      name: kubectl_retry
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tries)
                  op: assign_op.Equal
                  rhs: {(3)}
                  spids: [154]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:158)
              cond: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {(DQ (${ Id.VSub_Name KUBE_ROOT) (/cluster/kubectl.sh))} 
                          {(DQ ($ Id.VSub_At '$@'))}
                        )
                      ]
                      negated: T
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:172)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tries)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Minus
                                    left: 
                                      (arith_expr.VarRef
                                        token: (Token id:Id.Lit_ArithVarLike val:tries span_id:179)
                                      )
                                    right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                  )
                              )
                            }
                          spids: [177]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_le
                                      left: {(${ Id.VSub_Name tries)}
                                      right: {(0)}
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:199)
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(echo)}
                                {(DQ ("('kubectl ") ($ Id.VSub_At '$@') ("' failed, giving up)"))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:212)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Return val:return span_id:216)
                              arg_word: {(1)}
                            )
                          ]
                          spids: [186 201]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(echo)}
                        {(DQ ('(kubectl failed, will retry ') (${ Id.VSub_Name tries) (' times)'))}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:234)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (C {(sleep)} {(1)})
                  ]
                )
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ALLOWED_NOTREADY_NODES)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:ALLOWED_NOTREADY_NODES span_id:251)
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(0)})
                )
              )
            }
          spids: [248]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CLUSTER_READY_ADDITIONAL_TIME_SECONDS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: 
                    (Token
                      id: Id.VSub_Name
                      val: CLUSTER_READY_ADDITIONAL_TIME_SECONDS
                      span_id: 260
                    )
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(30)})
                )
              )
            }
          spids: [257]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:EXPECTED_NUM_NODES)
          op: assign_op.Equal
          rhs: {(DQ (${ Id.VSub_Name NUM_NODES))}
          spids: [267]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: (Token id:Id.VSub_Name val:KUBERNETES_PROVIDER span_id:281)
                              suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                            )
                          )
                        }
                      right: {(DQ (gce))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:293)
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('Validating gce cluster, MULTIZONE=') 
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:MULTIZONE span_id:303)
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                  )
                )
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: (Token id:Id.VSub_Name val:MULTIZONE span_id:319)
                                      suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                                    )
                                  )
                                }
                              right: {(DQ (true))}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:331)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:EXPECTED_NUM_NODES)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:337)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(gcloud)} {(-q)} {(compute)} {(instances)} {(list)} 
                                            {(--project) (Id.Lit_Equals '=') 
                                              (DQ (${ Id.VSub_Name PROJECT))
                                            } {(--format) (Id.Lit_Equals '=') (Id.Lit_LBracket '[') (no-heading) (Id.Lit_RBracket ']')} 
                                            {(--filter) (Id.Lit_Equals '=') 
                                              (DQ ("name ~ '") (${ Id.VSub_Name NODE_INSTANCE_PREFIX) 
                                                (".*' AND zone:(") 
                                                (command_sub
                                                  left_token: 
                                                    (Token
                                                      id: Id.Left_DollarParen
                                                      val: '$('
                                                      span_id: 372
                                                    )
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (command.Pipeline
                                                          children: [
                                                            (C {(gcloud)} {(-q)} {(compute)} {(zones)} 
                                                              {(list)} {(--project) (Id.Lit_Equals '=') (DQ (${ Id.VSub_Name PROJECT))} 
                                                              {(--filter) (Id.Lit_Equals '=') 
                                                                (Id.Lit_VarLike 'region=') (${ Id.VSub_Name REGION)
                                                              } 
                                                              {(--format) (Id.Lit_Equals '=') 
                                                                (Id.Lit_ArrayLhsOpen 'csv[') (no-heading) (Id.Lit_RBracket ']') 
                                                                (word_part.EscapedLiteral
                                                                  token: 
                                                                    (Token
                                                                      id: Id.Lit_EscapedChar
                                                                      val: '\\('
                                                                      span_id: 403
                                                                    )
                                                                ) (name) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\)' span_id:405))
                                                              }
                                                            )
                                                            (C {(tr)} {(DQ (Id.Lit_Other '\\') (n))} 
                                                              {(DQ (','))}
                                                            )
                                                            (C {(sed)} 
                                                              {(DQ ('s/,') (Id.Lit_Other '$') (//))}
                                                            )
                                                          ]
                                                          negated: F
                                                        )
                                                      ]
                                                    )
                                                ) (')')
                                              )
                                            }
                                          )
                                          (C {(wc)} {(-l)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [336]
                        )
                      ]
                    )
                    (C {(echo)} 
                      {
                        (DQ ('Computing number of nodes, NODE_INSTANCE_PREFIX=') 
                          (${ Id.VSub_Name NODE_INSTANCE_PREFIX) (', REGION=') (${ Id.VSub_Name REGION) (', EXPECTED_NUM_NODES=') (${ Id.VSub_Name EXPECTED_NUM_NODES)
                        )
                      }
                    )
                  ]
                  spids: [313 333]
                )
              ]
            )
          ]
          spids: [275 295]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: (Token id:Id.VSub_Name val:REGISTER_MASTER_KUBELET span_id:470)
                              suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                            )
                          )
                        }
                      right: {(DQ (true))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:482)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: 
                                        (Token
                                          id: Id.VSub_Name
                                          val: KUBERNETES_PROVIDER
                                          span_id: 493
                                        )
                                      suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                                    )
                                  )
                                }
                              right: {(DQ (gce))}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:505)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NUM_MASTERS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:511)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(get-master-replicas-count)})]
                                  )
                              )
                            }
                          spids: [510]
                        )
                      ]
                    )
                  ]
                  spids: [487 507]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NUM_MASTERS)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [519]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EXPECTED_NUM_NODES)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              (arith_expr.VarRef
                                token: 
                                  (Token
                                    id: Id.Lit_ArithVarLike
                                    val: EXPECTED_NUM_NODES
                                    span_id: 528
                                  )
                              )
                            right: 
                              (arith_expr.VarRef
                                token: (Token id:Id.Lit_ArithVarLike val:NUM_MASTERS span_id:530)
                              )
                          )
                      )
                    }
                  spids: [526]
                )
              ]
            )
          ]
          spids: [464 484]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REQUIRED_NUM_NODES)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Minus
                    left: 
                      (arith_expr.VarRef
                        token: (Token id:Id.Lit_ArithVarLike val:EXPECTED_NUM_NODES span_id:539)
                      )
                    right: 
                      (arith_expr.VarRef
                        token: (Token id:Id.Lit_ArithVarLike val:ALLOWED_NOTREADY_NODES span_id:543)
                      )
                  )
              )
            }
          spids: [537]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:return_value)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [550]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:attempt)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [553]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PAUSE_BETWEEN_ITERATIONS_SECONDS)
          op: assign_op.Equal
          rhs: {(15)}
          spids: [559]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:MAX_ATTEMPTS)
          op: assign_op.Equal
          rhs: {(100)}
          spids: [562]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ADDITIONAL_ITERATIONS)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Slash
                    left: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Minus
                        left: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              (arith_expr.VarRef
                                token: 
                                  (Token
                                    id: Id.Lit_ArithVarLike
                                    val: CLUSTER_READY_ADDITIONAL_TIME_SECONDS
                                    span_id: 568
                                  )
                              )
                            right: 
                              (arith_expr.VarRef
                                token: 
                                  (Token
                                    id: Id.Lit_ArithVarLike
                                    val: PAUSE_BETWEEN_ITERATIONS_SECONDS
                                    span_id: 572
                                  )
                              )
                          )
                        right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                      )
                    right: 
                      (arith_expr.VarRef
                        token: 
                          (Token
                            id: Id.Lit_ArithVarLike
                            val: PAUSE_BETWEEN_ITERATIONS_SECONDS
                            span_id: 579
                          )
                      )
                  )
              )
            }
          spids: [565]
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:583)
      cond: [
        (command.Sentence
          child: (C {(true)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:586)
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_gt
                              left: {(${ Id.VSub_Name attempt)}
                              right: {(0)}
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:608)
                    )
                  ]
                  action: [(C {(sleep)} {(15)})]
                  spids: [595 610]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:attempt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              (arith_expr.VarRef
                                token: (Token id:Id.Lit_ArithVarLike val:attempt span_id:623)
                              )
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                          )
                      )
                    }
                  spids: [621]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:node)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:680)
                            command_list: 
                              (command.CommandList
                                children: [(C {(kubectl_retry)} {(get)} {(nodes)})]
                              )
                          )
                        }
                      spids: [679]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:res)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [690]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:res)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [697]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(DQ (${ Id.VSub_Name res))} {(-ne)} {(DQ (0))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:720)
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_gt
                                      left: {(DQ (${ Id.VSub_Name attempt))}
                                      right: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: (Token id:Id.VSub_Name val:last_run span_id:739)
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  op_id: Id.VTest_ColonHyphen
                                                  arg_word: {($ Id.VSub_DollarName '$MAX_ATTEMPTS')}
                                                )
                                            )
                                          )
                                        }
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:746)
                            )
                          ]
                          action: [
                            (C {(echo)} {(-e)} 
                              {
                                (DQ (${ Id.VSub_Name color_red) (' Failed to get nodes.') 
                                  (${ Id.VSub_Name color_norm)
                                )
                              }
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:766)
                              arg_word: {(1)}
                            )
                          ]
                          spids: [725 748]
                        )
                      ]
                      else_action: [
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Continue val:continue span_id:774)
                        )
                      ]
                    )
                  ]
                  spids: [703 722]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:found)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Minus
                            left: 
                              (arith_expr.ArithWord
                                w: 
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:785)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(echo)} {(DQ (${ Id.VSub_Name node))})
                                                (C {(wc)} {(-l)})
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                    )
                                  }
                              )
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                          )
                      )
                    }
                  spids: [783]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ready)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Minus
                            left: 
                              (arith_expr.ArithWord
                                w: 
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:810)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (command.Pipeline
                                              children: [
                                                (C {(echo)} {(DQ (${ Id.VSub_Name node))})
                                                (C {(grep)} {(-v)} {(DQ (NotReady))})
                                                (C {(wc)} {(-l)})
                                              ]
                                              negated: F
                                            )
                                          ]
                                        )
                                    )
                                  }
                              )
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                          )
                      )
                    }
                  spids: [808]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: (arith_expr.ArithWord w:{(DQ (${ Id.VSub_Name found))})
                                  right: 
                                    (arith_expr.ArithWord
                                      w: {(DQ (${ Id.VSub_Name EXPECTED_NUM_NODES))}
                                    )
                                )
                            )
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: (arith_expr.ArithWord w:{(DQ (${ Id.VSub_Name ready))})
                                  right: 
                                    (arith_expr.ArithWord
                                      w: {(DQ (${ Id.VSub_Name EXPECTED_NUM_NODES))}
                                    )
                                )
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:885)
                    )
                  ]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Break val:break span_id:890)
                    )
                  ]
                  spids: [845 887]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Id.Arith_Great
                              left: (arith_expr.ArithWord w:{(DQ (${ Id.VSub_Name found))})
                              right: 
                                (arith_expr.ArithWord
                                  w: {(DQ (${ Id.VSub_Name EXPECTED_NUM_NODES))}
                                )
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:913)
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobNEqual
                                      left: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: 
                                                (Token
                                                  id: Id.VSub_Name
                                                  val: KUBE_USE_EXISTING_MASTER
                                                  span_id: 924
                                                )
                                              suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                                            )
                                          )
                                        }
                                      right: {(DQ (true))}
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:936)
                            )
                          ]
                          action: [
                            (C {(echo)} {(-e)} 
                              {
                                (DQ (${ Id.VSub_Name color_red) ('Found ') (${ Id.VSub_Name found) 
                                  (' nodes, but expected ') (${ Id.VSub_Name EXPECTED_NUM_NODES) ('. Your cluster may not behave correctly.') 
                                  (${ Id.VSub_Name color_norm)
                                )
                              }
                            )
                          ]
                          spids: [918 938]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Break val:break span_id:967)
                    )
                  ]
                  spids: [893 915]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Id.Arith_Great
                              left: (arith_expr.ArithWord w:{(DQ (${ Id.VSub_Name ready))})
                              right: 
                                (arith_expr.ArithWord
                                  w: {(DQ (${ Id.VSub_Name EXPECTED_NUM_NODES))}
                                )
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:989)
                    )
                  ]
                  action: [
                    (C {(echo)} {(-e)} 
                      {
                        (DQ (${ Id.VSub_Name color_red) ('Found ') (${ Id.VSub_Name ready) 
                          (' ready nodes, but expected ') (${ Id.VSub_Name EXPECTED_NUM_NODES) ('. Your cluster may not behave correctly.') 
                          (${ Id.VSub_Name color_norm)
                        )
                      }
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Break val:break span_id:1017)
                    )
                  ]
                  spids: [970 991]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_le
                                  left: {(DQ (${ Id.VSub_Name REQUIRED_NUM_NODES))}
                                  right: {(DQ (${ Id.VSub_Name ready))}
                                )
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:1042)
                        )
                      ]
                      action: [
                        (C {(echo)} {(-e)} 
                          {
                            (DQ (${ Id.VSub_Name color_green) ('Found ') 
                              (${ Id.VSub_Name REQUIRED_NUM_NODES) (' Nodes, allowing additional ') (${ Id.VSub_Name ADDITIONAL_ITERATIONS) 
                              (' iterations for other Nodes to join.') (${ Id.VSub_Name color_norm)
                            )
                          }
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:last_run)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: (Token id:Id.VSub_Name val:last_run span_id:1073)
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VTest_ColonHyphen
                                          arg_word: 
                                            {
                                              (word_part.ArithSub
                                                anode: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Minus
                                                    left: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: 
                                                          (arith_expr.VarRef
                                                            token: 
                                                              (Token
                                                                id: Id.Lit_ArithVarLike
                                                                val: attempt
                                                                span_id: 1076
                                                              )
                                                          )
                                                        right: 
                                                          (arith_expr.VarRef
                                                            token: 
                                                              (Token
                                                                id: Id.Lit_ArithVarLike
                                                                val: ADDITIONAL_ITERATIONS
                                                                span_id: 1080
                                                              )
                                                          )
                                                      )
                                                    right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                                  )
                                              )
                                            }
                                        )
                                    )
                                  )
                                }
                              spids: [1070]
                            )
                          ]
                        )
                      ]
                      spids: [1023 1044]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_gt
                                  left: {(DQ (${ Id.VSub_Name attempt))}
                                  right: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: (Token id:Id.VSub_Name val:last_run span_id:1108)
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VTest_ColonHyphen
                                              arg_word: {($ Id.VSub_DollarName '$MAX_ATTEMPTS')}
                                            )
                                        )
                                      )
                                    }
                                )
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:1115)
                        )
                      ]
                      action: [
                        (C {(echo)} {(-e)} 
                          {
                            (DQ (${ Id.VSub_Name color_yellow) ('Detected ') (${ Id.VSub_Name ready) 
                              (' ready nodes, found ') (${ Id.VSub_Name found) (' nodes out of expected ') (${ Id.VSub_Name EXPECTED_NUM_NODES) 
                              ('. Your cluster may not be fully functional.') (${ Id.VSub_Name color_norm)
                            )
                          }
                        )
                        (C {(kubectl_retry)} {(get)} {(nodes)})
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_gt
                                          left: {(DQ (${ Id.VSub_Name REQUIRED_NUM_NODES))}
                                          right: {(DQ (${ Id.VSub_Name ready))}
                                        )
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:1173)
                                )
                              ]
                              action: [
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:1178)
                                  arg_word: {(1)}
                                )
                              ]
                              spids: [1154 1175]
                            )
                          ]
                          else_action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:return_value)
                                  op: assign_op.Equal
                                  rhs: {(2)}
                                  spids: [1186]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:1190)
                            )
                          ]
                        )
                      ]
                      spids: [1094 1117]
                    )
                  ]
                  else_action: [
                    (C {(echo)} {(-e)} 
                      {
                        (DQ (${ Id.VSub_Name color_yellow) ('Waiting for ') 
                          (${ Id.VSub_Name EXPECTED_NUM_NODES) (' ready nodes. ') (${ Id.VSub_Name ready) (' ready nodes, ') (${ Id.VSub_Name found) 
                          (' registered. Retrying.') (${ Id.VSub_Name color_norm)
                        )
                      }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {(echo)} {(DQ ('Found ') (${ Id.VSub_Name found) (' node(s).'))})
    (C {(kubectl_retry)} {(get)} {(nodes)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:attempt)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [1250]
        )
      ]
    )
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:1253)
      cond: [
        (command.Sentence
          child: (C {(true)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:1256)
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:cs_status)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1282)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(kubectl_retry)} {(get)} {(componentstatuses)} {(-o)} {(template)} 
                                    {(--template) (Id.Lit_Equals '=') 
                                      (SQ 
                                        (Token
                                          id: Id.Lit_Chars
                                          val: 
'{{range .items}}{{with index .conditions 0}}{{.type}}:{{.status}}{{end}}{{"\\n"}}{{end}}'
                                          span_id: 1296
                                        )
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        }
                      spids: [1281]
                    )
                  ]
                )
                (C {(true)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:componentstatuses)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1306)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {(echo)} {(DQ (${ Id.VSub_Name cs_status))})
                                      (C {(grep)} {(-c)} 
                                        {(SQ (Token id:Id.Lit_Chars val:'Healthy:' span_id:1322))}
                                      )
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [1305]
                    )
                  ]
                )
                (C {(true)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:healthy)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1332)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {(echo)} {(DQ (${ Id.VSub_Name cs_status))})
                                      (C {(grep)} {(-c)} 
                                        {(SQ (Token id:Id.Lit_Chars val:'Healthy:True' span_id:1348))}
                                      )
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [1331]
                    )
                  ]
                )
                (C {(true)})
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_Great
                                  left: 
                                    (arith_expr.VarRef
                                      token: 
                                        (Token
                                          id: Id.Lit_ArithVarLike
                                          val: componentstatuses
                                          span_id: 1361
                                        )
                                    )
                                  right: 
                                    (arith_expr.VarRef
                                      token: (Token id:Id.Lit_ArithVarLike val:healthy span_id:1365)
                                    )
                                )
                            )
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: 
                                    (arith_expr.VarRef
                                      token: 
                                        (Token
                                          id: Id.Lit_ArithVarLike
                                          val: componentstatuses
                                          span_id: 1372
                                        )
                                    )
                                  right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)})
                                )
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1379)
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DParen
                                  child: 
                                    (arith_expr.Binary
                                      op_id: Id.Arith_Less
                                      left: 
                                        (arith_expr.VarRef
                                          token: 
                                            (Token
                                              id: Id.Lit_ArithVarLike
                                              val: attempt
                                              span_id: 1387
                                            )
                                        )
                                      right: (arith_expr.ArithWord w:{(Id.Lit_Digits 5)})
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:1394)
                            )
                          ]
                          action: [
                            (C {(echo)} {(-e)} 
                              {
                                (DQ (${ Id.VSub_Name color_yellow) ('Cluster not working yet.') 
                                  (${ Id.VSub_Name color_norm)
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:attempt)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: 
                                              (arith_expr.VarRef
                                                token: 
                                                  (Token
                                                    id: Id.Lit_ArithVarLike
                                                    val: attempt
                                                    span_id: 1416
                                                  )
                                              )
                                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                          )
                                      )
                                    }
                                  spids: [1414]
                                )
                              ]
                            )
                            (C {(sleep)} {(30)})
                          ]
                          spids: [1384 1396]
                        )
                      ]
                      else_action: [
                        (C {(echo)} {(-e)} 
                          {
                            (DQ (' ') (${ Id.VSub_Name color_yellow) ('Validate output:') 
                              (${ Id.VSub_Name color_norm)
                            )
                          }
                        )
                        (C {(kubectl_retry)} {(get)} {(cs)})
                        (C {(echo)} {(-e)} 
                          {
                            (DQ (${ Id.VSub_Name color_red) 
                              (
'Validation returned one or more failed components. Cluster is probably broken.'
                              ) (${ Id.VSub_Name color_norm)
                            )
                          }
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:1469)
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [1358 1381]
                )
              ]
              else_action: [
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Break val:break span_id:1480)
                )
              ]
            )
          ]
        )
    )
    (C {(echo)} {(DQ ('Validate output:'))})
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [(C {(kubectl_retry)} {(get)} {(cs)}) (C {(true)})]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(DQ (${ Id.VSub_Name return_value))} 
                  {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(DQ (0))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1522)
            )
          ]
          action: [
            (C {(echo)} {(-e)} 
              {
                (DQ (${ Id.VSub_Name color_green) ('Cluster validation succeeded') 
                  (${ Id.VSub_Name color_norm)
                )
              }
            )
          ]
          spids: [1504 1524]
        )
      ]
      else_action: [
        (C {(echo)} {(-e)} 
          {
            (DQ (${ Id.VSub_Name color_yellow) 
              (
'Cluster validation encountered some problems, but cluster should be in working order'
              ) (${ Id.VSub_Name color_norm)
            )
          }
        )
      ]
    )
    (command.ControlFlow
      token: (Token id:Id.ControlFlow_Exit val:exit span_id:1561)
      arg_word: {(DQ (${ Id.VSub_Name return_value))}
    )
  ]
)