(CommandList children: [ (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TMP_ROOT) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: <Left_CommandSub '$('> spids: [69 77] ) (/../..) ) } spids: [67] ) ] spids: [67] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_ROOT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (SimpleCommand words: [{(readlink)} {(-e)} {(${ VSub_Name TMP_ROOT)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [91] ) ] ) (C {(perl)} {(-MCwd)} {(-e)} {(SQ <'print Cwd::abs_path shift'>)} {(${ VSub_Name TMP_ROOT)} ) ] op_id: Op_DPipe ) ] ) left_token: <Left_CommandSub '$('> spids: [82 110] ) } spids: [81] ) ] spids: [81] ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/test/kubemark/skeleton/util.sh))}) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/test/kubemark/cloud-provider-config.sh))}) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/test/kubemark/) (${ VSub_Name CLOUD_PROVIDER) (/util.sh))} ) (C {(source)} { (DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubemark/) (${ VSub_Name CLOUD_PROVIDER) (/config-default.sh) ) } ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubemark/util.sh))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} { (DQ (BracedVarSub token: <VSub_Name ETCD_VERSION> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [186 189] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ETCD_VERSION) op: Equal rhs: {(DQ (avoid-overwrite))} spids: [198] ) ] spids: [198] ) ] spids: [16777215 195] ) ] spids: [16777215 203] ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/hack/lib/init.sh))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (BracedVarSub token: <VSub_Name ETCD_VERSION> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [219 222] ) ) } {(Lit_Other '=') (Lit_Other '=')} {(DQ (avoid-overwrite))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ETCD_VERSION) op:Equal rhs:{(DQ )} spids:[238])] spids: [238] ) ] spids: [16777215 235] ) ] spids: [16777215 242] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBECTL) op: Equal rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubectl.sh))} spids: [245] ) ] spids: [245] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_DIRECTORY) op: Equal rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/test/kubemark))} spids: [253] ) ] spids: [253] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RESOURCE_DIRECTORY) op: Equal rhs: {(DQ (${ VSub_Name KUBEMARK_DIRECTORY) (/resources))} spids: [261] ) ] spids: [261] ) (FuncDef name: create-master-environment-file body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kubemark-master-env.sh))} spids: [285] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('# Generic variables.\n') ('INSTANCE_PREFIX=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name INSTANCE_PREFIX> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [300 303] ) (Right_DoubleQuote '"') ('\n') ('SERVICE_CLUSTER_IP_RANGE=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name SERVICE_CLUSTER_IP_RANGE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [308 311] ) (Right_DoubleQuote '"') ('\n') ('\n') ('# Etcd related variables.\n') ('ETCD_IMAGE=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name ETCD_IMAGE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(3.1.10)}) spids: [318 322] ) (Right_DoubleQuote '"') ('\n') ('ETCD_VERSION=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name ETCD_VERSION> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [327 330] ) (Right_DoubleQuote '"') ('\n') ('\n') ('# Controller-manager related variables.\n') ('CONTROLLER_MANAGER_TEST_ARGS=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name CONTROLLER_MANAGER_TEST_ARGS> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [337 340] ) (Right_DoubleQuote '"') ('\n') ('ALLOCATE_NODE_CIDRS=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name ALLOCATE_NODE_CIDRS> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [345 348] ) (Right_DoubleQuote '"') ('\n') ('CLUSTER_IP_RANGE=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name CLUSTER_IP_RANGE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [353 356] ) (Right_DoubleQuote '"') ('\n') ('TERMINATED_POD_GC_THRESHOLD=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name TERMINATED_POD_GC_THRESHOLD> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [361 364] ) (Right_DoubleQuote '"') ('\n') ('\n') ('# Scheduler related variables.\n') ('SCHEDULER_TEST_ARGS=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name SCHEDULER_TEST_ARGS> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [371 374] ) (Right_DoubleQuote '"') ('\n') ('\n') ('# Apiserver related variables.\n') ('APISERVER_TEST_ARGS=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name APISERVER_TEST_ARGS> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [381 384] ) (Right_DoubleQuote '"') ('\n') ('STORAGE_MEDIA_TYPE=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name STORAGE_MEDIA_TYPE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [389 392] ) (Right_DoubleQuote '"') ('\n') ('STORAGE_BACKEND=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name STORAGE_BACKEND> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(etcd3)}) spids: [397 401] ) (Right_DoubleQuote '"') ('\n') ('ETCD_QUORUM_READ=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name ETCD_QUORUM_READ> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [406 409] ) (Right_DoubleQuote '"') ('\n') ('RUNTIME_CONFIG=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name RUNTIME_CONFIG> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [414 417] ) (Right_DoubleQuote '"') ('\n') ('NUM_NODES=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name NUM_NODES> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [422 425] ) (Right_DoubleQuote '"') ('\n') ('CUSTOM_ADMISSION_PLUGINS=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name CUSTOM_ADMISSION_PLUGINS> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [430 433] ) (Right_DoubleQuote '"') ('\n') ('FEATURE_GATES=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name FEATURE_GATES> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [438 441] ) (Right_DoubleQuote '"') ('\n') ('KUBE_APISERVER_REQUEST_TIMEOUT=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name KUBE_APISERVER_REQUEST_TIMEOUT> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [446 449] ) (Right_DoubleQuote '"') ('\n') ('ENABLE_APISERVER_ADVANCED_AUDIT=') (Right_DoubleQuote '"') (BracedVarSub token: <VSub_Name ENABLE_APISERVER_ADVANCED_AUDIT> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [454 457] ) (Right_DoubleQuote '"') ('\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [294] ) ] ) (C {(echo)} {(DQ ('Created the environment file for master.'))}) ] spids: [280] ) spids: [276 279] ) (FuncDef name: generate-pki-config body: (BraceGroup children: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (util) (Lit_Other ':') (Lit_Other ':') (ensure-temp-dir) } ) (C {(gen-kube-bearertoken)}) (C {(gen-kube-basicauth)}) (C {(create-certs)} {(${ VSub_Name MASTER_IP)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBELET_TOKEN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'if=') (/dev/urandom)} {(Lit_VarLike 'bs=') (128)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [519] ) ] ) (C {(base64)}) (C {(tr)} {(-d)} {(DQ ('=+/'))}) (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'bs=') (32)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [546] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [507 548] ) } spids: [506] ) ] spids: [506] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_PROXY_TOKEN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'if=') (/dev/urandom)} {(Lit_VarLike 'bs=') (128)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [564] ) ] ) (C {(base64)}) (C {(tr)} {(-d)} {(DQ ('=+/'))}) (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'bs=') (32)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [591] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [552 593] ) } spids: [551] ) ] spids: [551] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NODE_PROBLEM_DETECTOR_TOKEN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'if=') (/dev/urandom)} {(Lit_VarLike 'bs=') (128)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [609] ) ] ) (C {(base64)}) (C {(tr)} {(-d)} {(DQ ('=+/'))}) (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'bs=') (32)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [636] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [597 638] ) } spids: [596] ) ] spids: [596] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HEAPSTER_TOKEN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'if=') (/dev/urandom)} {(Lit_VarLike 'bs=') (128)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [654] ) ] ) (C {(base64)}) (C {(tr)} {(-d)} {(DQ ('=+/'))}) (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'bs=') (32)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [681] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [642 683] ) } spids: [641] ) ] spids: [641] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CLUSTER_AUTOSCALER_TOKEN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'if=') (/dev/urandom)} {(Lit_VarLike 'bs=') (128)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [699] ) ] ) (C {(base64)}) (C {(tr)} {(-d)} {(DQ ('=+/'))}) (SimpleCommand words: [ {(dd)} {(Lit_VarLike 'bs=') (32)} {(Lit_VarLike 'count=') (1)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [726] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [687 728] ) } spids: [686] ) ] spids: [686] ) (C {(echo)} {(DQ ('Generated PKI authentication data for kubemark.'))}) ] spids: [481] ) spids: [477 480] ) (FuncDef name: wait-for-master-reachability body: (BraceGroup children: [ (C {(execute-cmd-on-master-with-retries)} {(DQ (':'))} {(10)}) (C {(echo)} {(DQ ('Checked master reachability for remote command execution.'))}) ] spids: [750] ) spids: [746 749] ) (FuncDef name: write-pki-config-to-master body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PKI_SETUP_CMD) op: Equal rhs: { (DQ ('sudo mkdir /home/kubernetes/k8s_auth_data -p && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name CA_CERT_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/ca.crt') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name MASTER_CERT_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/server.cert') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name MASTER_KEY_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/server.key') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name REQUESTHEADER_CA_CERT_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/aggr_ca.crt') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name PROXY_CLIENT_CERT_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/proxy_client.crt') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name PROXY_CLIENT_KEY_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/proxy_client.key') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name KUBECFG_CERT_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/kubecfg.crt') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name KUBECFG_KEY_BASE64) (' | base64 --decode > /home/kubernetes/k8s_auth_data/kubecfg.key') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name KUBE_BEARER_TOKEN) (',admin,admin') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' > /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name KUBELET_TOKEN) (',system:node:node-name,uid:kubelet,system:nodes') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' >> /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name KUBE_PROXY_TOKEN) (',system:kube-proxy,uid:kube_proxy') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' >> /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name HEAPSTER_TOKEN) (',system:heapster,uid:heapster') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' >> /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name CLUSTER_AUTOSCALER_TOKEN) (',system:cluster-autoscaler,uid:cluster-autoscaler') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' >> /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name NODE_PROBLEM_DETECTOR_TOKEN) (',system:node-problem-detector,uid:system:node-problem-detector') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' >> /home/kubernetes/k8s_auth_data/known_tokens.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' && ') (' sudo bash -c ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('echo ') (${ VSub_Name KUBE_PASSWORD) (',admin,admin > /home/kubernetes/k8s_auth_data/basic_auth.csv') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } spids: [781] ) ] spids: [781] ) (C {(execute-cmd-on-master-with-retries)} {(DQ (${ VSub_Name PKI_SETUP_CMD))} {(3)}) (C {(echo)} {(DQ ('Wrote PKI certs, keys, tokens and admin password to master.'))}) ] spids: [778] ) spids: [774 777] ) (FuncDef name: write-local-kubeconfig body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LOCAL_KUBECONFIG) op: Equal rhs: {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kubeconfig.kubemark))} spids: [987] ) ] spids: [987] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name LOCAL_KUBECONFIG))} spids: [998] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: kubecfg\n') (' user:\n') (' client-certificate-data: ') (Right_DoubleQuote '"') (${ VSub_Name KUBECFG_CERT_BASE64) (Right_DoubleQuote '"') ('\n') (' client-key-data: ') (Right_DoubleQuote '"') (${ VSub_Name KUBECFG_KEY_BASE64) (Right_DoubleQuote '"') ('\n') (' username: admin\n') (' password: admin\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' certificate-authority-data: ') (Right_DoubleQuote '"') (${ VSub_Name CA_CERT_BASE64) (Right_DoubleQuote '"') ('\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: kubecfg\n') (' name: kubemark-context\n') ('current-context: kubemark-context\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [1006] ) ] ) (C {(echo)} { (DQ ('Kubeconfig file for kubemark master written to ') (${ VSub_Name LOCAL_KUBECONFIG) (.) ) } ) ] spids: [984] ) spids: [980 983] ) (FuncDef name: copy-resource-files-to-master body: (BraceGroup children: [ (C {(copy-files)} {(DQ (${ VSub_Name SERVER_BINARY_TAR))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kubemark-master-env.sh))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/start-kubemark-master.sh))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kubeconfig.kubemark))} {(DQ (${ VSub_Name KUBEMARK_DIRECTORY) (/configure-kubectl.sh))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/etcd.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/etcd-events.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/kube-apiserver.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/kube-scheduler.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/kube-controller-manager.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/kube-addon-manager.yaml))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/manifests/addons/kubemark-rbac-bindings))} {(DQ ('kubernetes@') (${ VSub_Name MASTER_NAME)) (Lit_Other ':') (/home/kubernetes/)} ) (C {(echo)} { (DQ ( 'Copied server binary, master startup scripts, configs and resource manifests to master.' ) ) } ) ] spids: [1074] ) spids: [1070 1073] ) (FuncDef name: start-master-components body: (BraceGroup children: [ (C {(echo)} {(DQ )}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MASTER_STARTUP_CMD) op: Equal rhs: {(DQ ('sudo bash /home/kubernetes/start-kubemark-master.sh'))} spids: [1223] ) ] spids: [1223] ) (C {(execute-cmd-on-master-with-retries)} {(DQ (${ VSub_Name MASTER_STARTUP_CMD))}) (C {(echo)} {(DQ ('The master has started and is now live.'))}) ] spids: [1214] ) spids: [1210 1213] ) (FuncDef name: create-and-upload-hollow-node-image body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MAKE_DIR) op: Equal rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/images/kubemark))} spids: [1263] ) ] spids: [1263] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_BIN) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (util) (Lit_Other ':') (Lit_Other ':') (find-binary-for-platform) } {(kubemark)} {(linux/amd64)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1274 1286] ) ) } spids: [1272] ) ] spids: [1272] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_z child:{(DQ (${ VSub_Name KUBEMARK_BIN))}) ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(SQ <'Cannot find cmd/kubemark binary'>)}) (C {(exit)} {(1)})] spids: [16777215 1305] ) ] spids: [16777215 1320] ) (C {(echo)} {(DQ ('Copying kubemark binary to ') (${ VSub_Name MAKE_DIR))}) (C {(cp)} {(DQ (${ VSub_Name KUBEMARK_BIN))} {(DQ (${ VSub_Name MAKE_DIR))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CURR_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_Backtick '`'> spids: [1351 1353] ) } spids: [1350] ) ] spids: [1350] ) (C {(cd)} {(DQ (${ VSub_Name MAKE_DIR))}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RETRIES) op:Equal rhs:{(3)} spids:[1365])] spids: [1365] ) (ForEach iter_name: attempt iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(seq)} {(1)} {(${ VSub_Name RETRIES)})]) left_token: <Left_CommandSub '$('> spids: [1375 1383] ) } ] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(make)} {(DQ (${ VSub_Name KUBEMARK_IMAGE_MAKE_TARGET))}] more_env: [ (env_pair name: REGISTRY val: {(DQ (${ VSub_Name CONTAINER_REGISTRY))} spids: [1393] ) (env_pair name: PROJECT val: {(DQ (${ VSub_Name PROJECT))} spids: [1400] ) ] ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_eq left: { (ArithSubPart anode: (ArithVarRef name:attempt) spids: [1423 1426] ) } right: {(DQ (${ VSub_Name RETRIES))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ (${ VSub_Name color_red) ('Make failed. Exiting.') (${ VSub_Name color_norm) ) } ) (C {(exit)} {(1)}) ] spids: [16777215 1439] ) ] spids: [16777215 1460] ) (SimpleCommand words: [ {(echo)} {(-e)} { (DQ (${ VSub_Name color_yellow) ('Make attempt ') (ArithSubPart anode: (ArithWord w:{($ VSub_Name '$attempt')}) spids: [1472 1475] ) (' failed. Retrying.') (${ VSub_Name color_norm) ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1482] ) ] ) (C {(sleep)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Star left: (ArithWord w:{($ VSub_Name '$attempt')}) right: (ArithWord w:{(Lit_Digits 5)}) ) spids: [1489 1496] ) } ) ] spids: [16777215 1416] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1499 1505] ) ] spids: [1386 1508] ) spids: [1374 1384] ) (C {(rm)} {(kubemark)}) (C {(cd)} {($ VSub_Name '$CURR_DIR')}) (C {(echo)} {(DQ ('Created and uploaded the kubemark hollow-node image to docker registry.'))} ) ] spids: [1260] ) spids: [1256 1259] ) (FuncDef name: create-and-upload-hollow-node-image-bazel body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RETRIES) op:Equal rhs:{(3)} spids:[1543])] spids: [1543] ) (ForEach iter_name: attempt iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(seq)} {(1)} {(${ VSub_Name RETRIES)})]) left_token: <Left_CommandSub '$('> spids: [1553 1561] ) } ] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(bazel)} {(run)} {(//cluster/images/kubemark) (Lit_Other ':') (push)} {(--define)} {(Lit_VarLike 'PROJECT=') (DQ (${ VSub_Name PROJECT))} ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_eq left: { (ArithSubPart anode: (ArithVarRef name:attempt) spids: [1596 1599] ) } right: {(DQ (${ VSub_Name RETRIES))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ (${ VSub_Name color_red) ('Image push failed. Exiting.') (${ VSub_Name color_norm) ) } ) (C {(exit)} {(1)}) ] spids: [16777215 1612] ) ] spids: [16777215 1633] ) (SimpleCommand words: [ {(echo)} {(-e)} { (DQ (${ VSub_Name color_yellow) ('Make attempt ') (ArithSubPart anode: (ArithWord w:{($ VSub_Name '$attempt')}) spids: [1645 1648] ) (' failed. Retrying.') (${ VSub_Name color_norm) ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1655] ) ] ) (C {(sleep)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Star left: (ArithWord w:{($ VSub_Name '$attempt')}) right: (ArithWord w:{(Lit_Digits 5)}) ) spids: [1662 1669] ) } ) ] spids: [16777215 1589] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1672 1678] ) ] spids: [1564 1681] ) spids: [1552 1562] ) (C {(echo)} {(DQ ('Created and uploaded the kubemark hollow-node image to docker registry.'))} ) ] spids: [1540] ) spids: [1536 1539] ) (FuncDef name: create-kube-hollow-node-resources body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBELET_KUBECONFIG_CONTENTS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: kubelet\n') (' user:\n') (' client-certificate-data: ') ) (${ VSub_Name KUBELET_CERT_BASE64) (DQ ('\n') (' client-key-data: ')) (${ VSub_Name KUBELET_KEY_BASE64) (DQ ('\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' certificate-authority-data: ') ) (${ VSub_Name CA_CERT_BASE64) (DQ ('\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: kubelet\n') (' name: kubemark-context\n') ('current-context: kubemark-context') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1714 1759] ) } spids: [1713] ) ] spids: [1713] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEPROXY_KUBECONFIG_CONTENTS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: kube-proxy\n') (' user:\n') (' token: ') (${ VSub_Name KUBE_PROXY_TOKEN) ('\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' insecure-skip-tls-verify: true\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: kube-proxy\n') (' name: kubemark-context\n') ('current-context: kubemark-context') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1768 1798] ) } spids: [1767] ) ] spids: [1767] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HEAPSTER_KUBECONFIG_CONTENTS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: heapster\n') (' user:\n') (' token: ') (${ VSub_Name HEAPSTER_TOKEN) ('\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' insecure-skip-tls-verify: true\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: heapster\n') (' name: kubemark-context\n') ('current-context: kubemark-context') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1807 1837] ) } spids: [1806] ) ] spids: [1806] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CLUSTER_AUTOSCALER_KUBECONFIG_CONTENTS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: cluster-autoscaler\n') (' user:\n') (' token: ') (${ VSub_Name CLUSTER_AUTOSCALER_TOKEN) ('\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' insecure-skip-tls-verify: true\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: cluster-autoscaler\n') (' name: kubemark-context\n') ('current-context: kubemark-context') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1846 1876] ) } spids: [1845] ) ] spids: [1845] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NPD_KUBECONFIG_CONTENTS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(echo)} { (DQ ('apiVersion: v1\n') ('kind: Config\n') ('users:\n') ('- name: node-problem-detector\n') (' user:\n') (' token: ') (${ VSub_Name NODE_PROBLEM_DETECTOR_TOKEN) ('\n') ('clusters:\n') ('- name: kubemark\n') (' cluster:\n') (' insecure-skip-tls-verify: true\n') (' server: https://') (${ VSub_Name MASTER_IP) ('\n') ('contexts:\n') ('- context:\n') (' cluster: kubemark\n') (' user: node-problem-detector\n') (' name: kubemark-context\n') ('current-context: kubemark-context') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1885 1915] ) } spids: [1884] ) ] spids: [1884] ) (C {(DQ (${ VSub_Name KUBECTL))} {(create)} {(-f)} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kubemark-ns.json))} ) (C {(DQ (${ VSub_Name KUBECTL))} {(create)} {(configmap)} {(DQ (node-configmap))} {(--namespace) (Lit_Other '=') (DQ (kubemark))} {(--from-literal) (Lit_Other '=') (content.type) (Lit_Other '=') (DQ (${ VSub_Name TEST_CLUSTER_API_CONTENT_TYPE)) } {(--from-file) (Lit_Other '=') (kernel.monitor) (Lit_Other '=') (DQ (${ VSub_Name RESOURCE_DIRECTORY) (/kernel-monitor.json)) } ) (C {(DQ (${ VSub_Name KUBECTL))} {(create)} {(secret)} {(generic)} {(DQ (kubeconfig))} {(--type) (Lit_Other '=') (Opaque)} {(--namespace) (Lit_Other '=') (DQ (kubemark))} {(--from-literal) (Lit_Other '=') (kubelet.kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name KUBELET_KUBECONFIG_CONTENTS)) } {(--from-literal) (Lit_Other '=') (kubeproxy.kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name KUBEPROXY_KUBECONFIG_CONTENTS)) } {(--from-literal) (Lit_Other '=') (heapster.kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name HEAPSTER_KUBECONFIG_CONTENTS)) } {(--from-literal) (Lit_Other '=') (cluster_autoscaler.kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name CLUSTER_AUTOSCALER_KUBECONFIG_CONTENTS)) } {(--from-literal) (Lit_Other '=') (npd.kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name NPD_KUBECONFIG_CONTENTS)) } ) (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons))}) (SimpleCommand words: [ {(sed)} {(DQ ('s/{{MASTER_IP}}/') (${ VSub_Name MASTER_IP) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/heapster_template.json))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/heapster.json))} spids: [2122] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metrics_mem_per_node) op: Equal rhs: {(4)} spids: [2132] ) ] spids: [2132] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metrics_mem) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 200)}) right: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(${ VSub_Name metrics_mem_per_node)}) right: (ArithWord w:{(${ VSub_Name NUM_NODES)}) ) ) spids: [2137 2150] ) } spids: [2136] ) ] spids: [2136] ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{METRICS_MEM}}/') (${ VSub_Name metrics_mem) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/heapster.json))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metrics_cpu_per_node_numerator) op: Equal rhs: {(${ VSub_Name NUM_NODES)} spids: [2177] ) ] spids: [2177] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metrics_cpu_per_node_denominator) op: Equal rhs: {(2)} spids: [2183] ) ] spids: [2183] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metrics_cpu) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 80)}) right: (ArithBinary op_id: Arith_Slash left: (ArithVarRef name:metrics_cpu_per_node_numerator) right: (ArithVarRef name:metrics_cpu_per_node_denominator) ) ) spids: [2188 2199] ) } spids: [2187] ) ] spids: [2187] ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{METRICS_CPU}}/') (${ VSub_Name metrics_cpu) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/heapster.json))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:eventer_mem_per_node) op: Equal rhs: {(500)} spids: [2226] ) ] spids: [2226] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:eventer_mem) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 200)}) right: (ArithWord w:{(Lit_Digits 1024)}) ) right: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(${ VSub_Name eventer_mem_per_node)}) right: (ArithWord w:{(${ VSub_Name NUM_NODES)}) ) ) spids: [2231 2248] ) } spids: [2230] ) ] spids: [2230] ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{EVENTER_MEM}}/') (${ VSub_Name eventer_mem) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/heapster.json))} ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name ENABLE_KUBEMARK_CLUSTER_AUTOSCALER))} right: {(DQ (true))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Setting up Cluster Autoscaler'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_AUTOSCALER_MIG_NAME) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBEMARK_AUTOSCALER_MIG_NAME> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name NODE_INSTANCE_PREFIX) (-group)} ) spids: [2311 2318] ) ) } spids: [2309] ) ] spids: [2309] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_AUTOSCALER_MIN_NODES) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBEMARK_AUTOSCALER_MIN_NODES> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [2324 2328] ) ) } spids: [2322] ) ] spids: [2322] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_AUTOSCALER_MAX_NODES) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBEMARK_AUTOSCALER_MAX_NODES> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(10)}) spids: [2334 2338] ) ) } spids: [2332] ) ] spids: [2332] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NUM_NODES) op: Equal rhs: {(${ VSub_Name KUBEMARK_AUTOSCALER_MAX_NODES)} spids: [2342] ) ] spids: [2342] ) (C {(echo)} {(DQ ('Setting maximum cluster size to ') (${ VSub_Name NUM_NODES) (.))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBEMARK_MIG_CONFIG) op: Equal rhs: { (DQ ('autoscaling.k8s.io/nodegroup: ') (${ VSub_Name KUBEMARK_AUTOSCALER_MIG_NAME) ) } spids: [2359] ) ] spids: [2359] ) (SimpleCommand words: [ {(sed)} {(DQ ('s/{{master_ip}}/') (${ VSub_Name MASTER_IP) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/cluster-autoscaler_template.json))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: { (DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/cluster-autoscaler.json)) } spids: [2385] ) ] ) (C {(sed)} {(-i) (SQ )} {(-e)} { (DQ ('s/{{kubemark_autoscaler_mig_name}}/') (${ VSub_Name KUBEMARK_AUTOSCALER_MIG_NAME) (/g) ) } {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/cluster-autoscaler.json))} ) (C {(sed)} {(-i) (SQ )} {(-e)} { (DQ ('s/{{kubemark_autoscaler_min_nodes}}/') (${ VSub_Name KUBEMARK_AUTOSCALER_MIN_NODES) (/g) ) } {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/cluster-autoscaler.json))} ) (C {(sed)} {(-i) (SQ )} {(-e)} { (DQ ('s/{{kubemark_autoscaler_max_nodes}}/') (${ VSub_Name KUBEMARK_AUTOSCALER_MAX_NODES) (/g) ) } {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons/cluster-autoscaler.json))} ) ] spids: [16777215 2299] ) ] spids: [16777215 2467] ) (C {(DQ (${ VSub_Name KUBECTL))} {(create)} {(-f)} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/addons))} {(--namespace) (Lit_Other '=') (DQ (kubemark))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NUM_REPLICAS) op: Equal rhs: { (BracedVarSub token: <VSub_Name NUM_REPLICAS> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name NUM_NODES)} ) spids: [2505 2511] ) } spids: [2504] ) ] spids: [2504] ) (SimpleCommand words: [ {(sed)} {(DQ ('s/{{numreplicas}}/') (${ VSub_Name NUM_REPLICAS) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node_template.yaml))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} spids: [2531] ) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:proxy_cpu) op:Equal rhs:{(20)} spids:[2541])] spids: [2541] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name NUM_NODES))} {(-gt)} {(1000)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:proxy_cpu) op: Equal rhs: {(50)} spids: [2565] ) ] spids: [2565] ) ] spids: [16777215 2562] ) ] spids: [16777215 2569] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:proxy_mem_per_node) op: Equal rhs: {(50)} spids: [2572] ) ] spids: [2572] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:proxy_mem) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 100)}) right: (ArithWord w:{(Lit_Digits 1024)}) ) right: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(${ VSub_Name proxy_mem_per_node)}) right: (ArithWord w:{(${ VSub_Name NUM_NODES)}) ) ) spids: [2577 2594] ) } spids: [2576] ) ] spids: [2576] ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{HOLLOW_PROXY_CPU}}/') (${ VSub_Name proxy_cpu) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{HOLLOW_PROXY_MEM}}/') (${ VSub_Name proxy_mem) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{registry}}/') (${ VSub_Name CONTAINER_REGISTRY) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{project}}/') (${ VSub_Name PROJECT) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{master_ip}}/') (${ VSub_Name MASTER_IP) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{kubelet_verbosity_level}}/') (${ VSub_Name KUBELET_TEST_LOG_LEVEL) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} { (DQ ('s/{{kubeproxy_verbosity_level}}/') (${ VSub_Name KUBEPROXY_TEST_LOG_LEVEL) (/g)) } {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} {(DQ ('s/{{use_real_proxier}}/') (${ VSub_Name USE_REAL_PROXIER) (/g))} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(sed)} {(-i) (SQ )} {(-e)} { (DQ ("s'{{kubemark_mig_config}}'") (BracedVarSub token: <VSub_Name KUBEMARK_MIG_CONFIG> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [2799 2802] ) ("'g") ) } {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} ) (C {(DQ (${ VSub_Name KUBECTL))} {(create)} {(-f)} {(DQ (${ VSub_Name RESOURCE_DIRECTORY) (/hollow-node.yaml))} {(--namespace) (Lit_Other '=') (DQ (kubemark))} ) (C {(echo)} { (DQ ( 'Created secrets, configMaps, replication-controllers required for hollow-nodes.' ) ) } ) ] spids: [1706] ) spids: [1702 1705] ) (FuncDef name: wait-for-hollow-nodes-to-run-or-timeout body: (BraceGroup children: [ (C {(echo)} {(-n)} {(DQ ('Waiting for all hollow-nodes to become Running'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:start) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})] ) left_token: <Left_CommandSub '$('> spids: [2868 2874] ) } spids: [2867] ) ] spids: [2867] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nodes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(DQ (${ VSub_Name KUBECTL))} {(--kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name LOCAL_KUBECONFIG)) } {(get)} {(node)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [2897] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [2878 2900] ) } spids: [2877] ) ] spids: [2877] ) (C {(true)}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ready) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name nodes))}) (C {(grep)} {(-v)} {(DQ (NotReady))}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [2909 2933] ) } ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [2908 2939] ) } spids: [2907] ) ] spids: [2907] ) (Until cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_ge left: {(DQ (${ VSub_Name ready))} right: {(DQ (${ VSub_Name NUM_REPLICAS))} ) ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (C {(echo)} {(-n)} {(DQ (.))}) (C {(sleep)} {(1)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:now) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})] ) left_token: <Left_CommandSub '$('> spids: [2983 2989] ) } spids: [2982] ) ] spids: [2982] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithVarRef name:now) right: (ArithVarRef name:start) ) spids: [3000 3007] ) } {(-gt)} {(1800)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ )}) (C {(echo)} {(-e)} { (DQ (${ VSub_Name color_red) (' Timeout waiting for all hollow-nodes to become Running. ') (${ VSub_Name color_norm) ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(DQ (${ VSub_Name KUBECTL))} {(--kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name LOCAL_KUBECONFIG)) } {(get)} {(node)} ) terminator: <Op_Amp '&'> ) (Sentence child: (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [3065] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Found only ') (${ VSub_Name ready) (' ready hollow-nodes while waiting for ') (${ VSub_Name NUM_NODES) (.) ) } ) ] spids: [16777215 3070] ) ] else_action: [ (C {(echo)} { (DQ ( 'Got error while trying to list hollow-nodes. Probably API server is down.' ) ) } ) ] spids: [3088 3098] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pods) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(DQ (${ VSub_Name KUBECTL))} {(get)} {(pods)} {(-l)} {(Lit_VarLike 'name=') (hollow-node)} {(--namespace) (Lit_Other '=') (kubemark)} ) ] ) left_token: <Left_CommandSub '$('> spids: [3102 3121] ) } spids: [3101] ) ] spids: [3101] ) (C {(true)}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:running) op: Equal rhs: { (ArithSubPart anode: (ArithWord w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name pods))}) (C {(grep)} {(DQ (Running))}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [3130 3152] ) } ) spids: [3129 3154] ) } spids: [3128] ) ] spids: [3128] ) (C {(echo)} { (DQ (${ VSub_Name running) (" hollow-nodes are reported as 'Running'")) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:not_running) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name pods))}) (C {(grep)} {(-v)} {(DQ (Running))}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [3169 3193] ) } ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [3168 3199] ) } spids: [3167] ) ] spids: [3167] ) (C {(echo)} { (DQ (${ VSub_Name not_running) (" hollow-nodes are reported as NOT 'Running'") ) } ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name pods))}) (C {(grep)} {(-v)} {(DQ (Running))}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [3214 3232] ) } ) (C {(exit)} {(1)}) ] spids: [16777215 3016] ) ] spids: [16777215 3240] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:nodes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(DQ (${ VSub_Name KUBECTL))} {(--kubeconfig) (Lit_Other '=') (DQ (${ VSub_Name LOCAL_KUBECONFIG)) } {(get)} {(node)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [3263] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [3244 3266] ) } spids: [3243] ) ] spids: [3243] ) (C {(true)}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ready) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name nodes))}) (C {(grep)} {(-v)} {(DQ (NotReady))}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [3275 3299] ) } ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [3274 3305] ) } spids: [3273] ) ] spids: [3273] ) ] spids: [2965 3308] ) ) (C {(echo)} {(-e)} {(DQ (${ VSub_Name color_green) (' Done!') (${ VSub_Name color_norm))}) ] spids: [2855] ) spids: [2851 2854] ) (Sentence child:(C {(detect-project)}) terminator:<Op_Amp '&'>) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[3334])] ) (C {(echo)} {(-e)} {(DQ (${ VSub_Name color_yellow) ('STARTING SETUP FOR MASTER') (${ VSub_Name color_norm))} ) (C {(find-release-tars)}) (C {(create-master-environment-file)}) (C {(create-master-instance-with-resources)}) (C {(generate-pki-config)}) (C {(wait-for-master-reachability)}) (C {(write-pki-config-to-master)}) (C {(write-local-kubeconfig)}) (C {(copy-resource-files-to-master)}) (C {(start-master-components)}) (C {(echo)} {(DQ )}) (C {(echo)} {(-e)} { (DQ (${ VSub_Name color_yellow) ('STARTING SETUP FOR HOLLOW-NODES') (${ VSub_Name color_norm)) } ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: { (DQ (BracedVarSub token: <VSub_Name KUBEMARK_BAZEL_BUILD> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [3402 3405] ) ) } right: {(Lit_Other '^') (Lit_Other '[') (yY) (Lit_Other ']') (Lit_Other '$')} ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(create-and-upload-hollow-node-image-bazel)})] spids: [16777215 3419] ) ] else_action: [(C {(create-and-upload-hollow-node-image)})] spids: [3424 3429] ) (C {(create-kube-hollow-node-resources)}) (C {(wait-for-hollow-nodes-to-run-or-timeout)}) (C {(echo)} {(DQ )}) (C {(echo)} {(DQ ('Master IP: ') (${ VSub_Name MASTER_IP))}) (C {(echo)} {(DQ ('Password to kubemark master: ') (${ VSub_Name KUBE_PASSWORD))}) (C {(echo)} {(DQ ('Kubeconfig for kubemark master is written in ') (${ VSub_Name LOCAL_KUBECONFIG))}) ] )