Unverified Commit a372a9fc authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #68264 from tanshanshan/fmt-0905

remove unused format log print
parents c1ad6e96 f6da98c5
......@@ -228,19 +228,19 @@ func getPhotonClient(pc *PCCloud) (*photon.Client, error) {
defer file.Close()
scanner := bufio.NewScanner(file)
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")
}
username := scanner.Text()
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")
}
password := scanner.Text()
token_options, err := pc.photonClient.Auth.GetTokensByPassword(username, password)
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
}
......
......@@ -383,8 +383,7 @@ func (nm *NodeManager) vcConnect(ctx context.Context, vsphereInstance *VSphereIn
return err
}
glog.V(4).Infof("Invalid credentials. Cannot connect to server %q. "+
"Fetching credentials from secrets.", vsphereInstance.conn.Hostname)
glog.V(4).Infof("Invalid credentials. Cannot connect to server %q. Fetching credentials from secrets.", vsphereInstance.conn.Hostname)
// Get latest credentials from SecretCredentialManager
credentials, err := credentialManager.GetCredential(vsphereInstance.conn.Hostname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment