api_address value not compatible with docker client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Fix Released
|
Undecided
|
Ricardo Rocha |
Bug Description
Trying to pass the api_address value from a swarm bay to DOCKER_HOST fails.
# magnum bay-show cci-swarm-
| api_address | https:/
# export | grep DOCKER
declare -x DOCKER_
declare -x DOCKER_HOST="https:/
declare -x DOCKER_
# docker info
Invalid bind address format: https:/
Changing it to tcp (even with TLS enabled) works:
# export DOCKER_
# docker info
Containers: 4
Running: 3
Paused: 0
...
Probably the reason we don't see this in the tests is that the python docker client supports https properly, so this code works as expected:
import docker
from docker import client
from docker import tls
if __name__ == "__main__":
client = client.Client(
))
print(
The good news is that simply changing https to tcp does the trick, and the DOCKER_TLS_VERIFY (in cli) and the client.Client(tls=) option do the trick on enable/disable TLS.
description: | updated |
Fix proposed to branch: master /review. openstack. org/344835
Review: https:/