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:
Oleg Matskiv
2024-01-29 21:26:25 +01:00
committed by Brad Davidson
parent b1453351e0
commit e60f7ecc19

View File

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