mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 20:42:26 +00:00
Merge pull request #68264 from tanshanshan/fmt-0905
remove unused format log print
This commit is contained in:
commit
a372a9fcd6
@ -228,19 +228,19 @@ func getPhotonClient(pc *PCCloud) (*photon.Client, error) {
|
|||||||
defer file.Close()
|
defer file.Close()
|
||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
if !scanner.Scan() {
|
if !scanner.Scan() {
|
||||||
glog.Errorf("Photon Cloud Provider: Empty username inside /etc/kubernetes/pc_login_info.")
|
glog.Error("Photon Cloud Provider: Empty username inside /etc/kubernetes/pc_login_info.")
|
||||||
return nil, fmt.Errorf("Failed to create authentication enabled client with invalid username")
|
return nil, fmt.Errorf("Failed to create authentication enabled client with invalid username")
|
||||||
}
|
}
|
||||||
username := scanner.Text()
|
username := scanner.Text()
|
||||||
if !scanner.Scan() {
|
if !scanner.Scan() {
|
||||||
glog.Errorf("Photon Cloud Provider: Empty password set inside /etc/kubernetes/pc_login_info.")
|
glog.Error("Photon Cloud Provider: Empty password set inside /etc/kubernetes/pc_login_info.")
|
||||||
return nil, fmt.Errorf("Failed to create authentication enabled client with invalid password")
|
return nil, fmt.Errorf("Failed to create authentication enabled client with invalid password")
|
||||||
}
|
}
|
||||||
password := scanner.Text()
|
password := scanner.Text()
|
||||||
|
|
||||||
token_options, err := pc.photonClient.Auth.GetTokensByPassword(username, password)
|
token_options, err := pc.photonClient.Auth.GetTokensByPassword(username, password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Photon Cloud Provider: failed to get tokens by password")
|
glog.Error("Photon Cloud Provider: failed to get tokens by password")
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,8 +383,7 @@ func (nm *NodeManager) vcConnect(ctx context.Context, vsphereInstance *VSphereIn
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(4).Infof("Invalid credentials. Cannot connect to server %q. "+
|
glog.V(4).Infof("Invalid credentials. Cannot connect to server %q. Fetching credentials from secrets.", vsphereInstance.conn.Hostname)
|
||||||
"Fetching credentials from secrets.", vsphereInstance.conn.Hostname)
|
|
||||||
|
|
||||||
// Get latest credentials from SecretCredentialManager
|
// Get latest credentials from SecretCredentialManager
|
||||||
credentials, err := credentialManager.GetCredential(vsphereInstance.conn.Hostname)
|
credentials, err := credentialManager.GetCredential(vsphereInstance.conn.Hostname)
|
||||||
|
Loading…
Reference in New Issue
Block a user