diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 5c3aa5a28b..93c9c5cce8 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -135,6 +135,7 @@ RUN yum install -y \ python \ python-jinja2 \ python-kazoo \ + python-six \ && yum clean all {% endif %} @@ -172,6 +173,7 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD python \ python-jinja2 \ python-kazoo \ + python-six \ curl \ && apt-get clean \ && sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \ diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index b567e385d9..de28c68886 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -19,10 +19,10 @@ import os from pwd import getpwnam import shutil import sys -import urlparse from kazoo import client as kz_client from kazoo import exceptions as kz_exceptions +from six.moves.urllib import parse # TODO(rhallisey): add docstring. @@ -85,7 +85,7 @@ def zk_connection(url): zk_hosts = os.environ.get("KOLLA_ZK_HOSTS") if zk_hosts is None: - components = urlparse.urlparse(url) + components = parse.urlparse(url) zk_hosts = components.netloc zk = kz_client.KazooClient(hosts=zk_hosts) zk.start() @@ -97,7 +97,7 @@ def zk_connection(url): def zk_path_exists(zk, path): try: - components = urlparse.urlparse(path) + components = parse.urlparse(path) zk.get(components.path) return True except kz_exceptions.NoNodeError: @@ -141,7 +141,7 @@ def copy_files(data): if is_zk_transport(source): with zk_connection(source) as zk: - components = urlparse.urlparse(source) + components = parse.urlparse(source) return zk_copy_tree(zk, components.path, dest) if os.path.isdir(source): diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 79a6e2894c..3a7e876045 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -100,7 +100,8 @@ RUN ln -s openstack-base-source/* /requirements \ python-zaqarclient \ python-openstackclient \ MySQL-python \ - python-memcached + python-memcached \ + six ENV PATH /var/lib/kolla/venv/bin:$PATH {% endif %}