diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 2c360a83b99..724288dd0c2 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -3505,12 +3505,12 @@ function test-setup() { --target-tags "${NODE_TAG}" \ --allow tcp:80,tcp:8080 \ --network "${NETWORK}" \ - "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null || true + "${NODE_TAG}-http-alt" 2> /dev/null || true # As there is no simple way to wait longer for this operation we need to manually # wait some additional time (20 minutes altogether). - while ! gcloud compute firewall-rules describe --project "${NETWORK_PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" 2> /dev/null; do + while ! gcloud compute firewall-rules describe --project "${NETWORK_PROJECT}" "${NODE_TAG}-http-alt" 2> /dev/null; do if [[ $(($start + 1200)) -lt `date +%s` ]]; then - echo -e "${color_red}Failed to create firewall ${NODE_TAG}-${INSTANCE_PREFIX}-http-alt in ${NETWORK_PROJECT}" >&2 + echo -e "${color_red}Failed to create firewall ${NODE_TAG}-http-alt in ${NETWORK_PROJECT}" >&2 exit 1 fi sleep 5 @@ -3524,12 +3524,12 @@ function test-setup() { --target-tags "${NODE_TAG}" \ --allow tcp:30000-32767,udp:30000-32767 \ --network "${NETWORK}" \ - "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null || true + "${NODE_TAG}-nodeports" 2> /dev/null || true # As there is no simple way to wait longer for this operation we need to manually # wait some additional time (20 minutes altogether). - while ! gcloud compute firewall-rules describe --project "${NETWORK_PROJECT}" "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" 2> /dev/null; do + while ! gcloud compute firewall-rules describe --project "${NETWORK_PROJECT}" "${NODE_TAG}-nodeports" 2> /dev/null; do if [[ $(($start + 1200)) -lt `date +%s` ]]; then - echo -e "${color_red}Failed to create firewall ${NODE_TAG}-${INSTANCE_PREFIX}-nodeports in ${PROJECT}" >&2 + echo -e "${color_red}Failed to create firewall ${NODE_TAG}-nodeports in ${PROJECT}" >&2 exit 1 fi sleep 5 @@ -3542,8 +3542,8 @@ function test-teardown() { detect-project echo "Shutting down test cluster in background." delete-firewall-rules \ - "${NODE_TAG}-${INSTANCE_PREFIX}-http-alt" \ - "${NODE_TAG}-${INSTANCE_PREFIX}-nodeports" + "${NODE_TAG}-http-alt" \ + "${NODE_TAG}-nodeports" if [[ ${MULTIZONE:-} == "true" && -n ${E2E_ZONES:-} ]]; then local zones=( ${E2E_ZONES} ) # tear them down in reverse order, finally tearing down the master too. diff --git a/test/e2e/framework/providers/gce/firewall.go b/test/e2e/framework/providers/gce/firewall.go index 25df218f0f8..34fe9a06324 100644 --- a/test/e2e/framework/providers/gce/firewall.go +++ b/test/e2e/framework/providers/gce/firewall.go @@ -217,7 +217,7 @@ func GetE2eFirewalls(masterName, masterTag, nodeTag, network, clusterIPRange str }, }) fws = append(fws, &compute.Firewall{ - Name: nodeTag + "-" + instancePrefix + "-http-alt", + Name: nodeTag + "-http-alt", SourceRanges: []string{"0.0.0.0/0"}, TargetTags: []string{nodeTag}, Allowed: []*compute.FirewallAllowed{ @@ -232,7 +232,7 @@ func GetE2eFirewalls(masterName, masterTag, nodeTag, network, clusterIPRange str }, }) fws = append(fws, &compute.Firewall{ - Name: nodeTag + "-" + instancePrefix + "-nodeports", + Name: nodeTag + "-nodeports", SourceRanges: []string{"0.0.0.0/0"}, TargetTags: []string{nodeTag}, Allowed: []*compute.FirewallAllowed{