mirror of https://github.com/docker/compose.git
Merge pull request #10591 from ndeloof/fix_detect_swarm_enabled
fix detection of swarm mode
This commit is contained in:
commit
70953b18c0
|
@ -277,8 +277,11 @@ func (s *composeService) isSWarmEnabled(ctx context.Context) (bool, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
swarmEnabled.err = err
|
swarmEnabled.err = err
|
||||||
}
|
}
|
||||||
if info.Swarm.LocalNodeState == swarm.LocalNodeStateInactive {
|
switch info.Swarm.LocalNodeState {
|
||||||
swarmEnabled.val = info.Swarm.LocalNodeState == swarm.LocalNodeStateInactive
|
case swarm.LocalNodeStateInactive, swarm.LocalNodeStateLocked:
|
||||||
|
swarmEnabled.val = false
|
||||||
|
default:
|
||||||
|
swarmEnabled.val = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return swarmEnabled.val, swarmEnabled.err
|
return swarmEnabled.val, swarmEnabled.err
|
||||||
|
|
Loading…
Reference in New Issue