#!/bin/bash # Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. global KUBE_ROOT := "$[dirname $(BASH_SOURCE)]/../.." source "$(KUBE_ROOT)/hack/lib/init.sh" global focus := $(FOCUS:-"") global skip := $(SKIP-"\[Flaky\]|\[Slow\]|\[Serial\]") # The number of tests that can run in parallel depends on what tests # are running and on the size of the node. Too many, and tests will # fail due to resource contention. 8 is a reasonable default for a # n1-standard-1 node. # Currently, parallelism only affects when REMOTE=true. For local test, # ginkgo default parallelism (cores - 1) is used. global parallelism := $(PARALLELISM:-8) global artifacts := $(ARTIFACTS:-"/tmp/_artifacts/`date +%y%m%dT%H%M%S`") global remote := $(REMOTE:-"false") global runtime := $(RUNTIME:-"docker") global container_runtime_endpoint := $(CONTAINER_RUNTIME_ENDPOINT:-"") global image_service_endpoint := $(IMAGE_SERVICE_ENDPOINT:-"") global run_until_failure := $(RUN_UNTIL_FAILURE:-"false") global test_args := $(TEST_ARGS:-"") global system_spec_name := $(SYSTEM_SPEC_NAME:-) # Parse the flags to pass to ginkgo global ginkgoflags := ''"" if [[ $parallelism > 1 ]] { global ginkgoflags := ""$ginkgoflags -nodes=$parallelism "" } if [[ $focus != "" ]] { global ginkgoflags := ""$ginkgoflags -focus=\"$focus\" "" } if [[ $skip != "" ]] { global ginkgoflags := ""$ginkgoflags -skip=\"$skip\" "" } if [[ $run_until_failure != "" ]] { global ginkgoflags := ""$ginkgoflags -untilItFails=$run_until_failure "" } # Setup the directory to copy test artifacts (logs, junit.xml, etc) from remote host to local host if test ! -d $(artifacts) { echo "Creating artifacts directory at $(artifacts)" mkdir -p $(artifacts) } echo "Test artifacts will be written to $(artifacts)" if test $remote = true { # The following options are only valid in remote run. global images := $(IMAGES:-"") global hosts := $(HOSTS:-"") global image_project := $(IMAGE_PROJECT:-"kubernetes-node-e2e-images") global metadata := $(INSTANCE_METADATA:-"") global list_images := $(LIST_IMAGES:-false) if [[ $list_images == "true" ]] { gcloud compute images list --project="$(image_project)" | grep "e2e-node" exit 0 } global gubernator := $(GUBERNATOR:-"false") global image_config_file := $(IMAGE_CONFIG_FILE:-"") if [[ $hosts == "" && $images == "" && $image_config_file == "" ]] { global image_project := $(IMAGE_PROJECT:-"cos-cloud") global gci_image := $[gcloud compute images list --project $image_project \ --no-standard-images --filter="name ~ 'cos-beta.*'" --format="table[no-heading](name)] global images := $gci_image global metadata := ""user-data<$(KUBE_ROOT)/test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"" } global instance_prefix := $(INSTANCE_PREFIX:-"test") global cleanup := $(CLEANUP:-"true") global delete_instances := $(DELETE_INSTANCES:-"false") # Get the compute zone global zone := $[gcloud info --format='value(config.properties.compute.zone)] if [[ $zone == "" ]] { echo "Could not find gcloud compute/zone when running: \`gcloud info --format='value(config.properties.compute.zone)'\`" exit 1 } # Get the compute project global project := $[gcloud info --format='value(config.project)] if [[ $project == "" ]] { echo "Could not find gcloud project when running: \`gcloud info --format='value(config.project)'\`" exit 1 } # Check if any of the images specified already have running instances. If so reuse those instances # by moving the IMAGE to a HOST if [[ $images != "" ]] { env IFS=',' read -ra IM <<< $images global images := ''"" for i in [$(IM[@])] { if [[ $(gcloud compute instances list "${instance_prefix}-$i" | grep $i) ]] { if [[ $hosts != "" ]] { global hosts := ""$hosts,"" } echo "Reusing host $(instance_prefix)-$i" global hosts := ""$(hosts)$(instance_prefix)-$(i)"" } else { if [[ $images != "" ]] { global images := ""$images,"" } global images := ""$images$i"" } } } # Output the configuration we will try to run echo "Running tests remotely using" echo "Project: $project" echo "Image Project: $image_project" echo "Compute/Zone: $zone" echo "Images: $images" echo "Hosts: $hosts" echo "Ginkgo Flags: $ginkgoflags" echo "Instance Metadata: $metadata" echo "Image Config File: $image_config_file" # Invoke the runner go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 --ssh-env="gce" \ --zone="$zone" --project="$project" --gubernator="$gubernator" \ --hosts="$hosts" --images="$images" --cleanup="$cleanup" \ --results-dir="$artifacts" --ginkgo-flags="$ginkgoflags" \ --image-project="$image_project" --instance-name-prefix="$instance_prefix" \ --delete-instances="$delete_instances" --test_args="$test_args" --instance-metadata="$metadata" \ --image-config-file="$image_config_file" --system-spec-name="$system_spec_name" \ !2 > !1 | tee -i "$(artifacts)/build-log.txt" exit $Status } else { # Refresh sudo credentials for local run if ! ping -c 1 -q metadata.google.internal &> /dev/null; { echo "Updating sudo credentials" sudo -v || exit 1 } # Do not use any network plugin by default. User could override the flags with # test_args. global test_args := "'--kubelet-flags="--network-plugin= --cni-bin-dir=" '$test_args" # Runtime flags global test_args := "'--kubelet-flags="--container-runtime='$runtime'" '$test_args" if [[ $runtime == "remote" ]] { if [[ ! -z $container_runtime_endpoint ]] { global test_args := "'--kubelet-flags="--container-runtime-endpoint='$container_runtime_endpoint'" '$test_args" } if [[ ! -z $image_service_endpoint ]] { global test_args := "'--kubelet-flags="--image-service-endpoint='$image_service_endpoint'" '$test_args" } } # Test using the host the script was run on # Provided for backwards compatibility go run test/e2e_node/runner/local/run_local.go \ --system-spec-name="$system_spec_name" --ginkgo-flags="$ginkgoflags" \ --test-flags="--container-runtime=$(runtime) \ --container-runtime-endpoint=$(container_runtime_endpoint) \ --image-service-endpoint=$(image_service_endpoint) \ --alsologtostderr --v 4 --report-dir=$(artifacts) --node-name $[hostname] \ $test_args" --build-dependencies=true !2 > !1 | tee -i "$(artifacts)/build-log.txt" exit $Status } (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_ROOT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: spids: [45 53] ) (/../..) } spids: [44] ) ] spids: [44] ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/hack/lib/init.sh))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:focus) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [67 72] ) } spids: [66] ) ] spids: [66] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:skip) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_Hyphen arg_word: { (DQ (EscapedLiteralPart token:) (Flaky) (EscapedLiteralPart token:) ("|") (EscapedLiteralPart token:) (Slow) (EscapedLiteralPart token:) ("|") (EscapedLiteralPart token:) (Serial) (EscapedLiteralPart token:) ) } ) spids: [75 91] ) } spids: [74] ) ] spids: [74] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:parallelism) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(8)}) spids: [112 116] ) } spids: [111] ) ] spids: [111] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:artifacts) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (DQ (/tmp/_artifacts/) (CommandSubPart command_list: (CommandList children: [ (C {(date)} {(Lit_Other "+") (Lit_Other "%") (y) (Lit_Other "%") (m) (Lit_Other "%") (dT) (Lit_Other "%") (H) (Lit_Other "%") (M) (Lit_Other "%") (S) } ) ] ) left_token: spids: [124 140] ) ) } ) spids: [119 142] ) } spids: [118] ) ] spids: [118] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:remote) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (false))}) spids: [145 151] ) } spids: [144] ) ] spids: [144] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:runtime) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (docker))}) spids: [154 160] ) } spids: [153] ) ] spids: [153] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:container_runtime_endpoint) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [163 168] ) } spids: [162] ) ] spids: [162] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:image_service_endpoint) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [171 176] ) } spids: [170] ) ] spids: [170] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:run_until_failure) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (false))}) spids: [179 185] ) } spids: [178] ) ] spids: [178] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_args) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [188 193] ) } spids: [187] ) ] spids: [187] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:system_spec_name) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [196 199] ) } spids: [195] ) ] spids: [195] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ginkgoflags) op:Equal rhs:{(DQ )} spids:[205])] spids: [205] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:Redir_Great left:{($ VSub_Name "$parallelism")} right:{(1)}) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ginkgoflags) op: Equal rhs: { (DQ ($ VSub_Name "$ginkgoflags") (" -nodes=") ($ VSub_Name "$parallelism") (" ")) } spids: [225] ) ] spids: [225] ) ] spids: [-1 222] ) ] spids: [-1 233] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{($ VSub_Name "$focus")} right:{(DQ )}) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ginkgoflags) op: Equal rhs: { (DQ ($ VSub_Name "$ginkgoflags") (" -focus=") (EscapedLiteralPart token:) ($ VSub_Name "$focus") (EscapedLiteralPart token:) (" ") ) } spids: [253] ) ] spids: [253] ) ] spids: [-1 250] ) ] spids: [-1 263] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{($ VSub_Name "$skip")} right:{(DQ )}) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ginkgoflags) op: Equal rhs: { (DQ ($ VSub_Name "$ginkgoflags") (" -skip=") (EscapedLiteralPart token:) ($ VSub_Name "$skip") (EscapedLiteralPart token:) (" ") ) } spids: [283] ) ] spids: [283] ) ] spids: [-1 280] ) ] spids: [-1 293] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {($ VSub_Name "$run_until_failure")} right: {(DQ )} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ginkgoflags) op: Equal rhs: { (DQ ($ VSub_Name "$ginkgoflags") (" -untilItFails=") ($ VSub_Name "$run_until_failure") (" ") ) } spids: [313] ) ] spids: [313] ) ] spids: [-1 310] ) ] spids: [-1 321] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ (${ VSub_Name artifacts))} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(echo)} {(DQ ("Creating artifacts directory at ") (${ VSub_Name artifacts))}) (C {(mkdir)} {(-p)} {(${ VSub_Name artifacts)}) ] spids: [-1 344] ) ] spids: [-1 365] ) (C {(echo)} {(DQ ("Test artifacts will be written to ") (${ VSub_Name artifacts))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$remote")} {(Lit_Other "=")} {(true)} {(Lit_Other "]")} ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:images) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [399 404] ) } spids: [398] ) ] spids: [398] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hosts) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [408 413] ) } spids: [407] ) ] spids: [407] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:image_project) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(DQ (kubernetes-node-e2e-images))} ) spids: [417 423] ) } spids: [416] ) ] spids: [416] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metadata) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [427 432] ) } spids: [426] ) ] spids: [426] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:list_images) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(false)}) spids: [436 440] ) } spids: [435] ) ] spids: [435] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$list_images")} right: {(DQ (true))} ) ) terminator: ) ] action: [ (Pipeline children: [ (C {(gcloud)} {(compute)} {(images)} {(list)} {(--project) (Lit_Other "=") (DQ (${ VSub_Name image_project))} ) (C {(grep)} {(DQ (e2e-node))}) ] negated: False ) (C {(exit)} {(0)}) ] spids: [-1 458] ) ] spids: [-1 491] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:gubernator) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (false))}) spids: [495 501] ) } spids: [494] ) ] spids: [494] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:image_config_file) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )}) spids: [505 510] ) } spids: [504] ) ] spids: [504] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$hosts")} right: {(DQ )} ) right: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$images")} right: {(DQ )} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$image_config_file")} right: {(DQ )} ) ) ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:image_project) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(DQ (cos-cloud))} ) spids: [549 555] ) } spids: [548] ) ] spids: [548] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:gci_image) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(gcloud)} {(compute)} {(images)} {(list)} {(--project)} {($ VSub_Name "$image_project")} {(--no-standard-images)} {(--filter) (Lit_Other "=") (DQ ("name ~ 'cos-beta.*'"))} {(--format) (Lit_Other "=") (DQ ("table[no-heading](name)"))} ) ] ) left_token: spids: [559 587] ) } spids: [558] ) ] spids: [558] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:images) op: Equal rhs: {($ VSub_Name "$gci_image")} spids: [590] ) ] spids: [590] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:metadata) op: Equal rhs: { (DQ ("user-data<") (${ VSub_Name KUBE_ROOT) ( "/test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled" ) ) } spids: [594] ) ] spids: [594] ) ] spids: [-1 545] ) ] spids: [-1 604] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:instance_prefix) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (test))}) spids: [608 614] ) } spids: [607] ) ] spids: [607] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cleanup) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (true))}) spids: [618 624] ) } spids: [617] ) ] spids: [617] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:delete_instances) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (false))}) spids: [628 634] ) } spids: [627] ) ] spids: [627] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:zone) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(gcloud)} {(info)} {(--format) (Lit_Other "=") (SQ <"value(config.properties.compute.zone)">) } ) ] ) left_token: spids: [643 653] ) } spids: [642] ) ] spids: [642] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobDEqual left:{($ VSub_Name "$zone")} right:{(DQ )}) ) terminator: ) ] action: [ (C {(echo)} { (DQ ("Could not find gcloud compute/zone when running: ") (EscapedLiteralPart token:) ("gcloud info --format='value(config.properties.compute.zone)'") (EscapedLiteralPart token:) ) } ) (C {(exit)} {(1)}) ] spids: [-1 670] ) ] spids: [-1 688] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:project) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(gcloud)} {(info)} {(--format) (Lit_Other "=") (SQ <"value(config.project)">)} ) ] ) left_token: spids: [697 707] ) } spids: [696] ) ] spids: [696] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$project")} right: {(DQ )} ) ) terminator: ) ] action: [ (C {(echo)} { (DQ ("Could not find gcloud project when running: ") (EscapedLiteralPart token:) ("gcloud info --format='value(config.project)'") (EscapedLiteralPart token:) ) } ) (C {(exit)} {(1)}) ] spids: [-1 724] ) ] spids: [-1 742] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{($ VSub_Name "$images")} right:{(DQ )}) ) terminator: ) ] action: [ (SimpleCommand words: [{(read)} {(-ra)} {(IM)}] redirects: [ (Redir op_id: Redir_TLess fd: -1 arg_word: {(DQ ($ VSub_Name "$images"))} spids: [782] ) ] more_env: [(env_pair name:IFS val:{(SQ <",">)} spids:[771])] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:images) op: Equal rhs: {(DQ )} spids: [789] ) ] spids: [789] ) (ForEach iter_name: i iter_words: [ { (DQ (BracedVarSub token: bracket_op: (WholeArray op_id:Lit_At) spids: [801 806] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (WordTest w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(gcloud)} {(compute)} {(instances)} {(list)} {(DQ (${ VSub_Name instance_prefix) (-) ($ VSub_Name "$i"))} ) (C {(grep)} {($ VSub_Name "$i")}) ] negated: False ) ] ) left_token: spids: [817 839] ) } ) ) terminator: ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {($ VSub_Name "$hosts")} right: {(DQ )} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hosts) op: Equal rhs: {(DQ ($ VSub_Name "$hosts") (","))} spids: [864] ) ] spids: [864] ) ] spids: [-1 861] ) ] spids: [-1 871] ) (C {(echo)} { (DQ ("Reusing host ") (${ VSub_Name instance_prefix) (-) ($ VSub_Name "$i") ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:hosts) op: Equal rhs: { (DQ (${ VSub_Name hosts) (${ VSub_Name instance_prefix) (-) (${ VSub_Name i) ) } spids: [886] ) ] spids: [886] ) ] spids: [-1 844] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {($ VSub_Name "$images")} right: {(DQ )} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:images) op: Equal rhs: {(DQ ($ VSub_Name "$images") (","))} spids: [921] ) ] spids: [921] ) ] spids: [-1 918] ) ] spids: [-1 928] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:images) op: Equal rhs: {(DQ ($ VSub_Name "$images") ($ VSub_Name "$i"))} spids: [931] ) ] spids: [931] ) ] spids: [901 938] ) ] spids: [810 941] ) spids: [799 808] ) ] spids: [-1 768] ) ] spids: [-1 944] ) (C {(echo)} {(DQ ("Running tests remotely using"))}) (C {(echo)} {(DQ ("Project: ") ($ VSub_Name "$project"))}) (C {(echo)} {(DQ ("Image Project: ") ($ VSub_Name "$image_project"))}) (C {(echo)} {(DQ ("Compute/Zone: ") ($ VSub_Name "$zone"))}) (C {(echo)} {(DQ ("Images: ") ($ VSub_Name "$images"))}) (C {(echo)} {(DQ ("Hosts: ") ($ VSub_Name "$hosts"))}) (C {(echo)} {(DQ ("Ginkgo Flags: ") ($ VSub_Name "$ginkgoflags"))}) (C {(echo)} {(DQ ("Instance Metadata: ") ($ VSub_Name "$metadata"))}) (C {(echo)} {(DQ ("Image Config File: ") ($ VSub_Name "$image_config_file"))}) (Pipeline children: [ (SimpleCommand words: [ {(go)} {(run)} {(test/e2e_node/runner/remote/run_remote.go)} {(--logtostderr)} {(--vmodule) (Lit_Other "=") (Lit_Other "*") (Lit_Other "=") (4)} {(--ssh-env) (Lit_Other "=") (DQ (gce))} {(--zone) (Lit_Other "=") (DQ ($ VSub_Name "$zone"))} {(--project) (Lit_Other "=") (DQ ($ VSub_Name "$project"))} {(--gubernator) (Lit_Other "=") (DQ ($ VSub_Name "$gubernator"))} {(--hosts) (Lit_Other "=") (DQ ($ VSub_Name "$hosts"))} {(--images) (Lit_Other "=") (DQ ($ VSub_Name "$images"))} {(--cleanup) (Lit_Other "=") (DQ ($ VSub_Name "$cleanup"))} {(--results-dir) (Lit_Other "=") (DQ ($ VSub_Name "$artifacts"))} {(--ginkgo-flags) (Lit_Other "=") (DQ ($ VSub_Name "$ginkgoflags"))} {(--image-project) (Lit_Other "=") (DQ ($ VSub_Name "$image_project"))} {(--instance-name-prefix) (Lit_Other "=") (DQ ($ VSub_Name "$instance_prefix"))} {(--delete-instances) (Lit_Other "=") (DQ ($ VSub_Name "$delete_instances"))} {(--test_args) (Lit_Other "=") (DQ ($ VSub_Name "$test_args"))} {(--instance-metadata) (Lit_Other "=") (DQ ($ VSub_Name "$metadata"))} {(--image-config-file) (Lit_Other "=") (DQ ($ VSub_Name "$image_config_file"))} {(--system-spec-name) (Lit_Other "=") (DQ ($ VSub_Name "$system_spec_name"))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[1151])] ) (C {(tee)} {(-i)} {(DQ (${ VSub_Name artifacts) (/build-log.txt))}) ] negated: False ) (C {(exit)} {($ VSub_QMark "$?")}) ] spids: [-1 391] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(ping)} {(-c)} {(1)} {(-q)} {(metadata.google.internal)})] negated: True ) terminator: ) (Sentence child: (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[1195])] ) terminator: ) ] action: [ (C {(echo)} {(DQ ("Updating sudo credentials"))}) (AndOr children: [(C {(sudo)} {(-v)}) (C {(exit)} {(1)})] op_id: Op_DPipe ) ] spids: [-1 1200] ) ] spids: [-1 1221] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_args) op: Equal rhs: {(SQ <"--kubelet-flags=\"--network-plugin= --cni-bin-dir=\" ">) ($ VSub_Name "$test_args") } spids: [1233] ) ] spids: [1233] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_args) op: Equal rhs: {(SQ <"--kubelet-flags=\"--container-runtime=">) ($ VSub_Name "$runtime") (SQ <"\" ">) ($ VSub_Name "$test_args") } spids: [1245] ) ] spids: [1245] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$runtime")} right: {(DQ (remote))} ) ) terminator: ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_z child: {($ VSub_Name "$container_runtime_endpoint")} ) ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_args) op: Equal rhs: {(SQ <"--kubelet-flags=\"--container-runtime-endpoint=">) ($ VSub_Name "$container_runtime_endpoint") (SQ <"\" ">) ($ VSub_Name "$test_args") } spids: [1292] ) ] spids: [1292] ) ] spids: [-1 1289] ) ] spids: [-1 1303] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_z child: {($ VSub_Name "$image_service_endpoint")} ) ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_args) op: Equal rhs: {(SQ <"--kubelet-flags=\"--image-service-endpoint=">) ($ VSub_Name "$image_service_endpoint") (SQ <"\" ">) ($ VSub_Name "$test_args") } spids: [1323] ) ] spids: [1323] ) ] spids: [-1 1320] ) ] spids: [-1 1334] ) ] spids: [-1 1272] ) ] spids: [-1 1337] ) (Pipeline children: [ (SimpleCommand words: [ {(go)} {(run)} {(test/e2e_node/runner/local/run_local.go)} {(--system-spec-name) (Lit_Other "=") (DQ ($ VSub_Name "$system_spec_name"))} {(--ginkgo-flags) (Lit_Other "=") (DQ ($ VSub_Name "$ginkgoflags"))} {(--test-flags) (Lit_Other "=") (DQ ("--container-runtime=") (${ VSub_Name runtime) (" ") (" --container-runtime-endpoint=") (${ VSub_Name container_runtime_endpoint) (" ") (" --image-service-endpoint=") (${ VSub_Name image_service_endpoint) (" ") (" --alsologtostderr --v 4 --report-dir=") (${ VSub_Name artifacts) (" --node-name ") (CommandSubPart command_list: (CommandList children:[(C {(hostname)})]) left_token: spids: [1397 1399] ) (" ") (" ") ($ VSub_Name "$test_args") ) } {(--build-dependencies) (Lit_Other "=") (true)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[1410])] ) (C {(tee)} {(-i)} {(DQ (${ VSub_Name artifacts) (/build-log.txt))}) ] negated: False ) (C {(exit)} {($ VSub_QMark "$?")}) ] spids: [1173 1431] ) ] )