mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Updated kube-proxy error strings to not use capitals/punctuation
This commit is contained in:
parent
d8369fd391
commit
3bb5914548
@ -129,7 +129,7 @@ func isSysFSWritable() (bool, error) {
|
|||||||
return false, errReadOnlySysFS
|
return false, errReadOnlySysFS
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, errors.New("No sysfs mounted")
|
return false, errors.New("no sysfs mounted")
|
||||||
}
|
}
|
||||||
|
|
||||||
func readIntStringFile(filename string) (int, error) {
|
func readIntStringFile(filename string) (int, error) {
|
||||||
|
@ -489,7 +489,7 @@ func (s *ProxyServer) Run() error {
|
|||||||
encounteredError = iptables.CleanupLeftovers(s.IptInterface) || encounteredError
|
encounteredError = iptables.CleanupLeftovers(s.IptInterface) || encounteredError
|
||||||
encounteredError = ipvs.CleanupLeftovers(s.IpvsInterface, s.IptInterface, s.IpsetInterface, s.CleanupIPVS) || encounteredError
|
encounteredError = ipvs.CleanupLeftovers(s.IpvsInterface, s.IptInterface, s.IpsetInterface, s.CleanupIPVS) || encounteredError
|
||||||
if encounteredError {
|
if encounteredError {
|
||||||
return errors.New("encountered an error while tearing down rules.")
|
return errors.New("encountered an error while tearing down rules")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ func Test_getProxyMode(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{ // flag says iptables, error detecting version
|
{ // flag says iptables, error detecting version
|
||||||
flag: "iptables",
|
flag: "iptables",
|
||||||
iptablesError: fmt.Errorf("oops!"),
|
iptablesError: fmt.Errorf("flag says iptables, error detecting version"),
|
||||||
expected: proxyModeUserspace,
|
expected: proxyModeUserspace,
|
||||||
},
|
},
|
||||||
{ // flag says iptables, version too low
|
{ // flag says iptables, version too low
|
||||||
@ -67,7 +67,7 @@ func Test_getProxyMode(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{ // detect, error
|
{ // detect, error
|
||||||
flag: "",
|
flag: "",
|
||||||
iptablesError: fmt.Errorf("oops!"),
|
iptablesError: fmt.Errorf("oops"),
|
||||||
expected: proxyModeUserspace,
|
expected: proxyModeUserspace,
|
||||||
},
|
},
|
||||||
{ // detect, version too low
|
{ // detect, version too low
|
||||||
|
Loading…
Reference in New Issue
Block a user