diff --git a/client/stack/stack.go b/client/stack/stack.go index fc582af47..8577f1140 100644 --- a/client/stack/stack.go +++ b/client/stack/stack.go @@ -93,32 +93,6 @@ func GetAllDeployedServices(contextName string) StackStatus { return StackStatus{services, nil} } -func checkDaemonIsSwarmManager(contextName string) error { - cl, err := abraClient.NewClientWithContext(contextName) - if err != nil { - return err - } - info, err := cl.Info(context.Background()) - if err != nil { - return err - } - if !info.Swarm.ControlAvailable { - return errors.New("this server is not a swarm manager. Did you run \"abra server init\"?") - } - return nil -} - -func checkDaemonIsSwarmManagerViaClient(ctx context.Context, cl *dockerclient.Client) error { - info, err := cl.Info(ctx) - if err != nil { - return err - } - if !info.Swarm.ControlAvailable { - return errors.New("this node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again") - } - return nil -} - // validateStackName checks if the provided string is a valid stack name (namespace). // It currently only does a rudimentary check if the string is empty, or consists // of only whitespace and quoting characters. @@ -185,10 +159,6 @@ func validateResolveImageFlag(opts *Deploy) error { } func deployCompose(ctx context.Context, cl *dockerclient.Client, opts Deploy, config *composetypes.Config) error { - if err := checkDaemonIsSwarmManagerViaClient(ctx, cl); err != nil { - return err - } - namespace := convert.NewNamespace(opts.Namespace) if opts.Prune {