Browse Source

Merge pull request #4065 from shin-/refine-swarm-warning

Do not print Swarm mode warning when connecting to a UCP server
Aanand Prasad 9 years ago
parent
commit
d586328812
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compose/project.py

+ 4 - 0
compose/project.py

@@ -538,6 +538,10 @@ def get_volumes_from(project, service_dict):
 def warn_for_swarm_mode(client):
 def warn_for_swarm_mode(client):
     info = client.info()
     info = client.info()
     if info.get('Swarm', {}).get('LocalNodeState') == 'active':
     if info.get('Swarm', {}).get('LocalNodeState') == 'active':
+        if info.get('ServerVersion', '').startswith('ucp'):
+            # UCP does multi-node scheduling with traditional Compose files.
+            return
+
         log.warn(
         log.warn(
             "The Docker Engine you're using is running in swarm mode.\n\n"
             "The Docker Engine you're using is running in swarm mode.\n\n"
             "Compose does not use swarm mode to deploy services to multiple nodes in a swarm. "
             "Compose does not use swarm mode to deploy services to multiple nodes in a swarm. "