mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-04 03:09:39 +00:00
Don't verify the node password if the local host is not running an agent
Signed-off-by: Oleg Matskiv <oleg.matskiv@gmail.com>
(cherry picked from commit e3b237fc35)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
b1453351e0
commit
e60f7ecc19
@@ -488,6 +488,11 @@ func passwordBootstrap(ctx context.Context, config *Config) nodePassBootstrapper
|
||||
}
|
||||
|
||||
func verifyLocalPassword(ctx context.Context, config *Config, mu *sync.Mutex, deferredNodes map[string]bool, node *nodeInfo) (string, int, error) {
|
||||
// do not attempt to verify the node password if the local host is not running an agent and does not have a node resource.
|
||||
if config.DisableAgent {
|
||||
return node.Name, http.StatusOK, nil
|
||||
}
|
||||
|
||||
// use same password file location that the agent creates
|
||||
nodePasswordRoot := "/"
|
||||
if config.ControlConfig.Rootless {
|
||||
|
||||
Reference in New Issue
Block a user