(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub KUBERNETES_PROVIDER test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS gce]}]]} {[DQ [LIT_CHARS gce]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "!!! "][VarSub 1][LIT_CHARS " only works on GCE"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})] [LIT_CHARS /../..]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kube-util.sh]]} ) (FunctionDef usage [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "!!! EXPERIMENTAL !!!"]]} ) (Com {[LIT_CHARS echo]} {[DQ ]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub 0][LIT_CHARS " [-M|-N|-P] -l -o | "]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Upgrades master and nodes by default"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " -M: Upgrade master only"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " -N: Upgrade nodes only"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " -P: Node upgrade prerequisites only (create a new instance template)"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " -o: Use os distro sepcified in KUBE_NODE_OS_DISTRIBUTION for new nodes. Options include 'debian' or 'gci'"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " -l: Use local(dev) binaries"]]} ) (Com {[LIT_CHARS echo]} {[DQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ / (e.g. \"release/stable\",">]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[SQ ]} ) (Com {[LIT_CHARS echo]} {[DQ ]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "(... Fetching current release versions ...)"]]} ) (Com {[LIT_CHARS echo]} {[DQ ]} ) (= scope= flags=0 words=[{[LIT_CHARS release_stable]}] bindings=[]) (= scope= flags=0 words=[{[LIT_CHARS release_latest]}] bindings=[]) (= scope= flags=0 words=[{[LIT_CHARS ci_latest]}] bindings=[]) (= scope= flags=0 words=[] bindings=[('release_stable', {[ComSub (Com {[LIT_CHARS gsutil]} {[LIT_CHARS cat]} {[LIT_CHARS gs] [LIT_OTHER ":"] [LIT_CHARS //kubernetes-release/release/stable.txt]})]})]) (= scope= flags=0 words=[] bindings=[('release_latest', {[ComSub (Com {[LIT_CHARS gsutil]} {[LIT_CHARS cat]} {[LIT_CHARS gs] [LIT_OTHER ":"] [LIT_CHARS //kubernetes-release/release/latest.txt]})]})]) (= scope= flags=0 words=[] bindings=[('ci_latest', {[ComSub (Com {[LIT_CHARS gsutil]} {[LIT_CHARS cat]} {[LIT_CHARS gs] [LIT_OTHER ":"] [LIT_CHARS //kubernetes-release-dev/ci/latest.txt]})]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Right now, versions are as follows:"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " release/stable: "][VarSub 0][LIT_CHARS " "][VarSub release_stable]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " release/latest: "][VarSub 0][LIT_CHARS " "][VarSub release_latest]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " ci/latest: "][VarSub 0][LIT_CHARS " "][VarSub ci_latest]]} ) ) ) (FunctionDef upgrade-master [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Upgrading master to '"][VarSub SERVER_BINARY_TAR_URL][LIT_CHARS "'. Do not interrupt, deleting master instance. =="]]} ) (Com {[LIT_CHARS get-kubeconfig-basicauth]} ) (Com {[LIT_CHARS get-kubeconfig-bearertoken]} ) (Com {[LIT_CHARS detect-master]} ) (Com {[LIT_CHARS parse-master-env]} ) (Com {[LIT_CHARS gcloud]} {[LIT_CHARS compute]} {[LIT_CHARS instances]} {[LIT_CHARS delete]} {[LIT_CHARS --project]} {[DQ [VarSub PROJECT]]} {[LIT_CHARS --quiet]} {[LIT_CHARS --zone]} {[DQ [VarSub ZONE]]} {[DQ [VarSub MASTER_NAME]]} ) (Com {[LIT_CHARS create-master-instance]} {[DQ [VarSub MASTER_NAME][LIT_CHARS -ip]]} ) (Com {[LIT_CHARS wait-for-master]} ) ) ) (FunctionDef wait-for-master [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Waiting for new master to respond to API requests =="]]} ) (= scope= flags=0 words=[{[LIT_CHARS curl_auth_arg]}] bindings=[]) (If (DBracket {B1 UNARY_STRING_n {[VarSub KUBE_BEARER_TOKEN test_op=VS_TEST_COLON_HYPHEN {}]}}) (= scope= flags=0 words=[] bindings=[('curl_auth_arg', {[Array {[LIT_CHARS -H]} {[DQ [LIT_CHARS "Authorization: Bearer "][VarSub KUBE_BEARER_TOKEN]]}]})]) (DBracket {B1 UNARY_STRING_n {[VarSub KUBE_PASSWORD test_op=VS_TEST_COLON_HYPHEN {}]}}) (= scope= flags=0 words=[] bindings=[('curl_auth_arg', {[Array {[LIT_CHARS --user]} {[DQ [VarSub KUBE_USER][LIT_CHARS ":"][VarSub KUBE_PASSWORD]]}]})]) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "can't get auth credentials for the current master"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (While (Com {[LIT_CHARS curl]} {[LIT_CHARS --insecure]} {[DQ [VarSub curl_auth_arg bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[LIT_CHARS --max-time]} {[LIT_CHARS 5]} {[LIT_CHARS --fail]} {[LIT_CHARS --output]} {[LIT_CHARS /dev/null]} {[LIT_CHARS --silent]} {[DQ [LIT_CHARS "https://"][VarSub KUBE_MASTER_IP][LIT_CHARS /healthz]]} ) (List (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS .]]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Done =="]]} ) ) ) (FunctionDef prepare-upgrade [] (List (Com {[LIT_CHARS ensure-temp-dir]} ) (Com {[LIT_CHARS detect-project]} ) (Com {[LIT_CHARS detect-node-names]} ) (Com {[LIT_CHARS write-cluster-name]} ) (Com {[LIT_CHARS tars_from_version]} ) ) ) (FunctionDef get-node-env [] (Com {[LIT_CHARS gcloud]} {[LIT_CHARS compute]} {[LIT_CHARS --project]} {[VarSub PROJECT]} {[LIT_CHARS ssh]} {[LIT_CHARS --zone]} {[VarSub ZONE]} {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}})]} {[LIT_CHARS --command]} {[DQ [LIT_CHARS "curl --fail --silent -H 'Metadata-Flavor: Google' "][LIT_CHARS " 'http://metadata/computeMetadata/v1/instance/attributes/kube-env'"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) ) (FunctionDef get-node-os [] (Com {[LIT_CHARS gcloud]} {[LIT_CHARS compute]} {[LIT_CHARS ssh]} {[DQ [VarSub 1]]} {[LIT_CHARS --project]} {[DQ [VarSub PROJECT]]} {[LIT_CHARS --zone]} {[DQ [VarSub ZONE]]} {[LIT_CHARS --command]} {[DQ [LIT_CHARS "cat /etc/os-release | grep "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "^ID=.*"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " | cut -c 4-"]]} ) ) (FunctionDef upgrade-nodes [] (List (Com {[LIT_CHARS prepare-node-upgrade]} ) (Com {[LIT_CHARS do-node-upgrade]} ) ) ) (FunctionDef setup-base-image [] (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub env_os_distro]]} {[DQ [LIT_CHARS false]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Ensuring that new Node base OS image matched the existing Node base OS image"]]} ) (= scope= flags=0 words=[] bindings=[('NODE_OS_DISTRIBUTION', {[ComSub (Com {[LIT_CHARS get-node-os]} {[DQ [VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}})]]})]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/gce/][VarSub NODE_OS_DISTRIBUTION][LIT_CHARS /node-helper.sh]]} ) (Com {[LIT_CHARS set-node-image]} ) ) ) ) (FunctionDef prepare-node-upgrade [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Preparing node upgrade (to "][VarSub KUBE_VERSION][LIT_CHARS "). =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS setup-base-image]} ) (= scope= flags=0 words=[] bindings=[('SANITIZED_VERSION', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[VarSub KUBE_VERSION]}) (Com {[LIT_CHARS sed]} {[SQ ]}) )]})]) (= scope= flags=0 words=[] bindings=[('scope_flags', {[SQ ]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub NODE_SCOPES]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('scope_flags', {[DQ [LIT_CHARS "--scopes "][VarSub NODE_SCOPES]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('scope_flags', {[DQ [LIT_CHARS --no-scopes]]})]) ) (= scope= flags=0 words=[] bindings=[('node_env', {[ComSub (Com {[LIT_CHARS get-node-env]})]})]) (= scope= flags=0 words=[] bindings=[('KUBELET_TOKEN', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS KUBELET_TOKEN]]})]})]) (= scope= flags=0 words=[] bindings=[('KUBE_PROXY_TOKEN', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS KUBE_PROXY_TOKEN]]})]})]) (= scope= flags=0 words=[] bindings=[('CA_CERT_BASE64', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS CA_CERT]]})]})]) (= scope= flags=0 words=[] bindings=[('EXTRA_DOCKER_OPTS', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS EXTRA_DOCKER_OPTS]]})]})]) (= scope= flags=0 words=[] bindings=[('KUBELET_CERT_BASE64', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS KUBELET_CERT]]})]})]) (= scope= flags=0 words=[] bindings=[('KUBELET_KEY_BASE64', {[ComSub (Com {[LIT_CHARS get-env-val]} {[DQ [VarSub node_env]]} {[DQ [LIT_CHARS KUBELET_KEY]]})]})]) (Com {[LIT_CHARS write-node-env]} ) (= scope= flags=0 words=[] bindings=[('template_name', {[ComSub (Com {[LIT_CHARS get-template-name-from-version]} {[VarSub SANITIZED_VERSION]})]})]) (Com {[LIT_CHARS create-node-instance-template]} {[DQ [VarSub template_name]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Instance template name: "][VarSub template_name]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Finished preparing node upgrade (to "][VarSub KUBE_VERSION][LIT_CHARS "). =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (FunctionDef do-node-upgrade [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Upgrading nodes to "][VarSub KUBE_VERSION][LIT_CHARS ". =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (= scope= flags=0 words=[] bindings=[('template_name', {[ComSub (Com {[LIT_CHARS get-template-name-from-version]} {[VarSub SANITIZED_VERSION]})]})]) (= scope= flags=0 words=[] bindings=[('old_templates', {[Array ]})]) (= scope= flags=0 words=[] bindings=[('updates', {[Array ]})]) (For group [{[VarSub INSTANCE_GROUPS bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]}]) (List (= scope= flags=0 words=[] bindings=[('old_templates+', {[Array {[ComSub (AndOr OP_OR_IF (Com {[LIT_CHARS gcloud]} {[LIT_CHARS compute]} {[LIT_CHARS instance-groups]} {[LIT_CHARS managed]} {[LIT_CHARS list]} {[LIT_CHARS --project] [LIT_DBRACKET_LIKE "="] [DQ [VarSub PROJECT]]} {[LIT_CHARS --zones] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ZONE]]} {[LIT_CHARS --regexp] [LIT_DBRACKET_LIKE "="] [DQ [VarSub group]]} {[LIT_CHARS --format] [LIT_DBRACKET_LIKE "="] [SQ ]}) (Com {[LIT_CHARS true]}) )]}]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Calling rolling-update for "][VarSub group][LIT_CHARS ". =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('update', {[ComSub (Com redirects=[(DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2)]{[LIT_CHARS gcloud]} {[LIT_CHARS alpha]} {[LIT_CHARS compute]} {[LIT_CHARS rolling-updates]} {[LIT_CHARS --project] [LIT_DBRACKET_LIKE "="] [DQ [VarSub PROJECT]]} {[LIT_CHARS --zone] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ZONE]]} {[LIT_CHARS start]} {[LIT_CHARS --group] [LIT_DBRACKET_LIKE "="] [DQ [VarSub group]]} {[LIT_CHARS --template] [LIT_DBRACKET_LIKE "="] [DQ [VarSub template_name]]} {[LIT_CHARS --instance-startup-timeout] [LIT_DBRACKET_LIKE "="] [LIT_CHARS 300s]} {[LIT_CHARS --max-num-concurrent-instances] [LIT_DBRACKET_LIKE "="] [LIT_CHARS 1]} {[LIT_CHARS --max-num-failed-instances] [LIT_DBRACKET_LIKE "="] [LIT_CHARS 0]} {[LIT_CHARS --min-instance-update-time] [LIT_DBRACKET_LIKE "="] [LIT_CHARS 0s]})]})]) (AndOr OP_OR_IF (= scope= flags=0 words=[] bindings=[('update_rc', {[VarSub ?]})]) (= scope= flags=0 words=[] bindings=[('update_rc', {[VarSub ?]})]) ) ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub update_rc]]} {[LIT_CHARS 0]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== FAILED to start rolling-update: =="]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub update]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " This may be due to a preexisting rolling-update;"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " see https://github.com/kubernetes/kubernetes/issues/33113 for details."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " All rolling-updates in project "][VarSub PROJECT][LIT_CHARS " zone "][VarSub ZONE][LIT_CHARS ":"]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS gcloud]} {[LIT_CHARS alpha]} {[LIT_CHARS compute]} {[LIT_CHARS rolling-updates]} {[LIT_CHARS --project] [LIT_DBRACKET_LIKE "="] [DQ [VarSub PROJECT]]} {[LIT_CHARS --zone] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ZONE]]} {[LIT_CHARS list]} ) (Com {[LIT_CHARS true]} ) ) (Com {[LIT_CHARS return]} {[VarSub update_rc]} ) ) ) (= scope= flags=0 words=[] bindings=[('id', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub update]]}) (Com {[LIT_CHARS grep]} {[DQ [LIT_CHARS Started]]}) (Com {[LIT_CHARS cut]} {[LIT_CHARS -d]} {[SQ ]} {[LIT_CHARS -f]} {[LIT_CHARS 11]}) (Com {[LIT_CHARS cut]} {[LIT_CHARS -d]} {[SQ ]} {[LIT_CHARS -f]} {[LIT_CHARS 1]}) )]})]) (= scope= flags=0 words=[] bindings=[('updates+', {[Array {[DQ [VarSub id]]}]})]) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Waiting for Upgrading nodes to be finished. =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (For update [{[VarSub updates bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]}]) (While (Com {[LIT_CHARS true]} ) (List (= scope= flags=0 words=[] bindings=[('result', {[ComSub (AndOr OP_OR_IF (Com {[LIT_CHARS gcloud]} {[LIT_CHARS alpha]} {[LIT_CHARS compute]} {[LIT_CHARS rolling-updates]} {[LIT_CHARS --project] [LIT_DBRACKET_LIKE "="] [DQ [VarSub PROJECT]]} {[LIT_CHARS --zone] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ZONE]]} {[LIT_CHARS describe]} {[VarSub update]} {[LIT_CHARS --format] [LIT_DBRACKET_LIKE "="] [SQ ]}) (Com {[LIT_CHARS true]}) )]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[VarSub result]} {[LIT_DBRACKET_LIKE "="]} {[DQ [LIT_CHARS ROLLED_OUT]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Rolling update "][VarSub update][LIT_CHARS " is "][VarSub result][LIT_CHARS " state and finished."]]} ) (Com {[LIT_CHARS break]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Rolling update "][VarSub update][LIT_CHARS " is still in "][VarSub result][LIT_CHARS " state."]]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 10]} ) ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Deleting old templates in "][VarSub PROJECT][LIT_CHARS ". =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (For tmpl [{[VarSub old_templates bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS gcloud]} {[LIT_CHARS compute]} {[LIT_CHARS instance-templates]} {[LIT_CHARS delete]} {[LIT_CHARS --quiet]} {[LIT_CHARS --project] [LIT_DBRACKET_LIKE "="] [DQ [VarSub PROJECT]]} {[DQ [VarSub tmpl]]} ) (Com {[LIT_CHARS true]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Finished upgrading nodes to "][VarSub KUBE_VERSION][LIT_CHARS ". =="]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (= scope= flags=0 words=[] bindings=[('master_upgrade', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('node_upgrade', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('node_prereqs', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('local_binaries', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('env_os_distro', {[LIT_CHARS false]})]) (While (Com {[LIT_CHARS getopts]} {[DQ [LIT_CHARS ":MNPlho"]]} {[LIT_CHARS opt]} ) (Case to_match={[VarSub opt]}, pat_word_list=[[{[LIT_CHARS M]}], [{[LIT_CHARS N]}], [{[LIT_CHARS P]}], [{[LIT_CHARS l]}], [{[LIT_CHARS o]}], [{[LIT_CHARS h]}], [{[\ LIT_ESCAPED_CHAR "\\?"]}]] (= scope= flags=0 words=[] bindings=[('node_upgrade', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('master_upgrade', {[LIT_CHARS false]})]) (= scope= flags=0 words=[] bindings=[('node_prereqs', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('local_binaries', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('env_os_distro', {[LIT_CHARS true]})]) (List (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Invalid option: -"][VarSub OPTARG]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (Com {[LIT_CHARS shift]} {[ArithSub {A2 AS_OP_MINUS {A Atom NODE_ARITH_WORD {[VarSub OPTIND]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}]} ) (If (AndOr OP_AND_IF (DBracket {B2 BINARY_INT_LT {[VarSub #]} {[LIT_CHARS 1]}}) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub local_binaries]]} {[DQ [LIT_CHARS false]]}}) ) (List (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (If (AndOr OP_AND_IF (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub master_upgrade]]} {[DQ [LIT_CHARS false]]}}) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub node_upgrade]]} {[DQ [LIT_CHARS false]]}}) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Can't specify both -M and -N"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub local_binaries]]} {[DQ [LIT_CHARS false]]}}) (Com {[LIT_CHARS set_binary_version]} {[VarSub 1]} ) ) (Com {[LIT_CHARS prepare-upgrade]} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub node_prereqs]]} {[DQ [LIT_CHARS true]]}}) (List (Com {[LIT_CHARS prepare-node-upgrade]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub master_upgrade]]} {[DQ [LIT_CHARS true]]}}) (Com {[LIT_CHARS upgrade-master]} ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub node_upgrade]]} {[DQ [LIT_CHARS true]]}}) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub local_binaries]]} {[DQ [LIT_CHARS true]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Upgrading nodes to local binaries is not yet supported."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) (ElseTrue) (Com {[LIT_CHARS upgrade-nodes]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "== Validating cluster post-upgrade =="]]} ) (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/validate-cluster.sh]]} ) )