mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #36169 from hpcloud/vsphere_bad_conditional
Automatic merge from submit-queue Bad conditional in vSphereLogin function ```release-note Fixes NotAuthenticated errors that appear in the kubelet and kube-controller-manager due to never logging in to vSphere ``` With this conditional being == instead of !=, a login would never actually be attempted by this provider, and disk attachments would fail with a NotAuthenticated error from vSphere.
This commit is contained in:
commit
6c059cb9a1
@ -338,8 +338,11 @@ func vSphereLogin(ctx context.Context, vs *VSphere) error {
|
||||
m := session.NewManager(vs.client.Client)
|
||||
// retrieve client's current session
|
||||
u, err := m.UserSession(ctx)
|
||||
if err == nil && u == nil {
|
||||
// current session is valid
|
||||
if err != nil {
|
||||
glog.Errorf("Error while obtaining user session. err: %q", err)
|
||||
return err
|
||||
}
|
||||
if u != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user