Merge pull request #68264 from tanshanshan/fmt-0905

remove unused format log print
This commit is contained in:
k8s-ci-robot 2018-10-03 08:09:54 -07:00 committed by GitHub
commit a372a9fcd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -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
} }

View File

@ -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)