mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-22 18:37:15 +00:00
Merge pull request #101303 from wangyx1992/capatial-log-proxy
cleanup: fix errors in wrapped format and log capitalization in proxy
This commit is contained in:
@@ -83,7 +83,7 @@ func (hns hnsV1) getEndpointByIpAddress(ip string, networkName string) (*endpoin
|
||||
|
||||
endpoints, err := hcsshim.HNSListEndpointRequest()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
|
||||
return nil, fmt.Errorf("failed to list endpoints: %w", err)
|
||||
}
|
||||
for _, endpoint := range endpoints {
|
||||
equal := false
|
||||
@@ -139,7 +139,7 @@ func (hns hnsV1) createEndpoint(ep *endpointsInfo, networkName string) (*endpoin
|
||||
} else {
|
||||
createdEndpoint, err = hnsNetwork.CreateEndpoint(hnsEndpoint)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Local endpoint creation failed: %v", err)
|
||||
return nil, fmt.Errorf("local endpoint creation failed: %w", err)
|
||||
}
|
||||
}
|
||||
return &endpointsInfo{
|
||||
|
@@ -49,7 +49,7 @@ func (hns hnsV2) getNetworkByName(name string) (*hnsNetworkInfo, error) {
|
||||
policySettings := hcn.RemoteSubnetRoutePolicySetting{}
|
||||
err = json.Unmarshal(policy.Settings, &policySettings)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to unmarshal Remote Subnet policy settings")
|
||||
return nil, fmt.Errorf("failed to unmarshal Remote Subnet policy settings")
|
||||
}
|
||||
rs := &remoteSubnetInfo{
|
||||
destinationPrefix: policySettings.DestinationPrefix,
|
||||
@@ -90,7 +90,7 @@ func (hns hnsV2) getEndpointByIpAddress(ip string, networkName string) (*endpoin
|
||||
|
||||
endpoints, err := hcn.ListEndpoints()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
|
||||
return nil, fmt.Errorf("failed to list endpoints: %w", err)
|
||||
}
|
||||
for _, endpoint := range endpoints {
|
||||
equal := false
|
||||
|
@@ -664,7 +664,7 @@ func NewProxier(
|
||||
time.Sleep(10 * time.Second)
|
||||
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not find HNS network %s", hnsNetworkName)
|
||||
return nil, fmt.Errorf("could not find HNS network %s", hnsNetworkName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,7 +714,7 @@ func NewProxier(
|
||||
}
|
||||
}
|
||||
if len(hostMac) == 0 {
|
||||
return nil, fmt.Errorf("Could not find host mac address for %s", nodeIP)
|
||||
return nil, fmt.Errorf("could not find host mac address for %s", nodeIP)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user