Don't verify the node password if the local host is not running an agent

Signed-off-by: Oleg Matskiv <oleg.matskiv@gmail.com>
This commit is contained in:
Oleg Matskiv 2024-01-29 21:26:25 +01:00 committed by Brad Davidson
parent 701e7e45ce
commit e3b237fc35

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 {