Set docker api version to auto
Change-Id: I25d957a2368fa4e52b5fa9253d7ea5ec4046d830
Closes-Bug: #1521949
(cherry picked from commit dc2ad7d134
)
This commit is contained in:
parent
b020bd41ab
commit
19621ff977
|
@ -47,6 +47,11 @@ class KollaDirNotFoundException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
def docker_client():
|
||||
docker_kwargs = docker.utils.kwargs_from_env()
|
||||
return docker.Client(version='auto', **docker_kwargs)
|
||||
|
||||
|
||||
class WorkerThread(Thread):
|
||||
|
||||
def __init__(self, queue, config):
|
||||
|
@ -54,7 +59,7 @@ class WorkerThread(Thread):
|
|||
self.nocache = config['no_cache']
|
||||
self.forcerm = not config['keep']
|
||||
self.retries = config['retries']
|
||||
self.dc = docker.Client(**docker.utils.kwargs_from_env())
|
||||
self.dc = docker_client()
|
||||
super(WorkerThread, self).__init__()
|
||||
|
||||
def end_task(self, image):
|
||||
|
@ -554,7 +559,7 @@ class KollaWorker(object):
|
|||
|
||||
|
||||
def push_image(image):
|
||||
dc = docker.Client(**docker.utils.kwargs_from_env())
|
||||
dc = docker_client()
|
||||
image['push_logs'] = str()
|
||||
|
||||
for response in dc.push(image['fullname'],
|
||||
|
|
|
@ -70,7 +70,7 @@ function setup_ansible {
|
|||
RAW_INVENTORY=/tmp/kolla/raw_inventory
|
||||
mkdir /tmp/kolla
|
||||
|
||||
sudo -H pip install "ansible<2" docker-py
|
||||
sudo -H pip install "ansible<2" "docker-py>=1.4.0,<1.6.0"
|
||||
|
||||
setup_inventory
|
||||
|
||||
|
|
Loading…
Reference in New Issue