mirror of https://github.com/k3s-io/k3s
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.pull/6/head
commit
6c059cb9a1
|
@ -338,8 +338,11 @@ func vSphereLogin(ctx context.Context, vs *VSphere) error {
|
||||||
m := session.NewManager(vs.client.Client)
|
m := session.NewManager(vs.client.Client)
|
||||||
// retrieve client's current session
|
// retrieve client's current session
|
||||||
u, err := m.UserSession(ctx)
|
u, err := m.UserSession(ctx)
|
||||||
if err == nil && u == nil {
|
if err != nil {
|
||||||
// current session is valid
|
glog.Errorf("Error while obtaining user session. err: %q", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if u != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue