From e1bf8780b5cf98b727fc71ce645b66b4a3d739c1 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 30 May 2018 13:49:36 -0700 Subject: [PATCH] validation errors --- command/agent/retry_join.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/command/agent/retry_join.go b/command/agent/retry_join.go index e49412d8c..d2deee514 100644 --- a/command/agent/retry_join.go +++ b/command/agent/retry_join.go @@ -61,20 +61,20 @@ func (r *retryJoiner) Validate(config *Config) error { // fields and the server_join stanza are not both set if config.Server != nil && config.Server.ServerJoin != nil { if len(config.Server.RetryJoin) != 0 { - return fmt.Errorf("server_join and retry_join cannot both be defined; try defining only server_join") + return fmt.Errorf("server_join and retry_join cannot both be defined; prefer setting the server_join stanza") } if len(config.Server.StartJoin) != 0 { - return fmt.Errorf("server_join and start_join cannot both be defined; try defining only server_join") + return fmt.Errorf("server_join and start_join cannot both be defined; prefer setting the server_join stanza") } if config.Server.RetryMaxAttempts != 0 { - return fmt.Errorf("server_join and retry_max cannot both be defined; try defining only server_join") + return fmt.Errorf("server_join and retry_max cannot both be defined; prefer setting the server_join stanza") } if config.Server.RetryInterval != "30s" { - return fmt.Errorf("server_join and retry_interval cannot both be defined; prefer setting the server_join parameter") + return fmt.Errorf("server_join and retry_interval cannot both be defined; prefer setting the server_join stanza") } if len(config.Server.ServerJoin.RetryJoin) != 0 && len(config.Server.ServerJoin.StartJoin) != 0 { - return fmt.Errorf("server_join and start_join cannot both be defined in the same stanza") + return fmt.Errorf("retry_join and start_join cannot both be defined") } }