Merge pull request #60801 from jingax10/gce_util_branch

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Suppress error message from grep when checking whether a subnet has a secondary range or not.

**What this PR does / why we need it**:

Get rid of stdrr caused by grep command when running cluster/kube-up.sh for GCE.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

N/A

**Special notes for your reviewer**:

No behavior change.

**Release note**:

```release-note
"NONE"
```
pull/8/head
Kubernetes Submit Queue 2018-03-25 02:40:33 -07:00 committed by GitHub
commit e3af2374a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1750,7 +1750,7 @@ function create-subnetworks() {
--secondary-range "services-default=${SERVICE_CLUSTER_IP_RANGE}"
echo "Created subnetwork ${IP_ALIAS_SUBNETWORK}"
else
if ! echo ${subnet} | grep --quiet secondaryIpRanges ${subnet}; then
if ! echo ${subnet} | grep --quiet secondaryIpRanges; then
echo "${color_red}Subnet ${IP_ALIAS_SUBNETWORK} does not have a secondary range${color_norm}"
exit 1
fi