Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-41] Swarm detection for latest docker version
In the newest versions of docker, swarm is included and the server version field of docker info does not return any "swarm" addition. To detect a swarm active machine,I'm proposing to check swarm.cluster.ID this field is empty for non swarm and contains a string of hexa when swarm is configured The change affects src/agent/docker/dockr_swarm.py and consist of capturing the swarm.cluster.ID and to take that into account as an alternative swarm detection mechanism server_swarm_cluster = client.info()['Swarm']['Cluster']['ID'] if server_version.startswith('swarm') or server_swarm_cluster != '': To test, cello was activated with some additional logging.debug (removed from the release file) in the setup_container_host to show the creating was happening on swarm machine. Testing was performed on Ubuntu server and on Centos (with fix CE-49) Issue: CE-41 Change-Id: I01c627cdfd142d771a25cd427ef29fe1c9347dc3 Signed-off-by: Daniel Vielvoye <[email protected]>
- Loading branch information