Merge pull request #55817 from danehans/issue_55816

Automatic merge from submit-queue (batch tested with PRs 55757, 55741, 55817, 55834, 51530). 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>.

Fixes Issue 55816: Removes unneeded IPPart error

**What this PR does / why we need it**:
Previously proxy was incorrectly logging an error message for the IPPart function. The PR fixes this logging behavior to only log `invalid IP part` for invalid IP:Port combinations.

**Which issue(s) this PR fixes**:
Fixes # https://github.com/kubernetes/kubernetes/issues/55816

**Special notes for your reviewer**:
None

**Release note**:
```
none
```
This commit is contained in:
Kubernetes Submit Queue 2017-11-18 16:38:30 -08:00 committed by GitHub
commit c00500ee31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,9 @@ func IPPart(s string) string {
}
// Check if host string is a valid IP address
if ip := net.ParseIP(host); ip != nil {
return ip.String()
} else {
glog.Errorf("invalid IP part '%s'", host)
return host
}
return ""
}