mirror of
https://github.com/docker/compose.git
synced 2025-07-21 04:34:38 +02:00
fix detection of swarm mode
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
4dcda432cf
commit
cfe1a860ff
@ -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…
x
Reference in New Issue
Block a user