diff --git a/pkg/compose/compose.go b/pkg/compose/compose.go index 1fc6597a5..4d00fdbcf 100644 --- a/pkg/compose/compose.go +++ b/pkg/compose/compose.go @@ -277,8 +277,11 @@ func (s *composeService) isSWarmEnabled(ctx context.Context) (bool, error) { if err != nil { swarmEnabled.err = err } - if info.Swarm.LocalNodeState == swarm.LocalNodeStateInactive { - swarmEnabled.val = info.Swarm.LocalNodeState == swarm.LocalNodeStateInactive + switch info.Swarm.LocalNodeState { + case swarm.LocalNodeStateInactive, swarm.LocalNodeStateLocked: + swarmEnabled.val = false + default: + swarmEnabled.val = true } }) return swarmEnabled.val, swarmEnabled.err