From af249723861e54fd0ce4062ccd03fc7f2bed2b4f Mon Sep 17 00:00:00 2001 From: Irena Rindos Date: Wed, 11 Jan 2023 09:07:31 -0500 Subject: [PATCH] warn if controller and worker name are the same (#2773) --- internal/cmd/commands/server/server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cmd/commands/server/server.go b/internal/cmd/commands/server/server.go index 36cd6df870..a088c89933 100644 --- a/internal/cmd/commands/server/server.go +++ b/internal/cmd/commands/server/server.go @@ -208,6 +208,12 @@ func (c *Command) Run(args []string) int { return base.CommandUserError } } + if c.Config.Controller != nil { + if c.Config.Worker.Name == c.Config.Controller.Name { + c.UI.Error("Controller and worker cannot be configured with the same name.") + return base.CommandUserError + } + } } if c.Config.DefaultMaxRequestDuration != 0 {