Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f6da98c5
Commit
f6da98c5
authored
Sep 05, 2018
by
tanshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused format log print
parent
be115407
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
photon.go
pkg/cloudprovider/providers/photon/photon.go
+3
-3
nodemanager.go
pkg/cloudprovider/providers/vsphere/nodemanager.go
+1
-2
No files found.
pkg/cloudprovider/providers/photon/photon.go
View file @
f6da98c5
...
...
@@ -228,19 +228,19 @@ func getPhotonClient(pc *PCCloud) (*photon.Client, error) {
defer
file
.
Close
()
scanner
:=
bufio
.
NewScanner
(
file
)
if
!
scanner
.
Scan
()
{
glog
.
Error
f
(
"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
.
Error
f
(
"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
.
Error
f
(
"Photon Cloud Provider: failed to get tokens by password"
)
glog
.
Error
(
"Photon Cloud Provider: failed to get tokens by password"
)
return
nil
,
err
}
...
...
pkg/cloudprovider/providers/vsphere/nodemanager.go
View file @
f6da98c5
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment