diff options
| author | Eduardo Gonzalez <dabarren@gmail.com> | 2017-06-26 12:00:54 +0100 |
|---|---|---|
| committer | Eduardo Gonzalez <dabarren@gmail.com> | 2017-06-27 09:44:35 +0100 |
| commit | 80805318232c2dfecbbf86cc2bb9e3e95e264a98 (patch) | |
| tree | 1c4ba884a51cf7fa2874ee99658222b0ed6cf878 /docker/macros.j2 | |
| parent | 48c4d923c6053c72ff4b4399eca882b15e148062 (diff) | |
| download | kolla-80805318232c2dfecbbf86cc2bb9e3e95e264a98.tar.gz kolla-80805318232c2dfecbbf86cc2bb9e3e95e264a98.zip | |
Add opendaylight install fix
Opendaylight package fails to install with existing
odl user.
This change adds a macro to fix the package install. Similar
to haproxy install fix.
Change-Id: Ie646769fe12b8f3f4c758b678b23c2d98c2e8027
Closes-Bug: #1700502
Diffstat (limited to 'docker/macros.j2')
| -rw-r--r-- | docker/macros.j2 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 index 3be0ef5e1..9120b5142 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -49,6 +49,15 @@ RUN apt-get -y install --no-install-recommends haproxy \ && apt-get clean {% endmacro %} +{% macro debian_opendaylight_existing_user_fix() %} +{# NOTE(egonzalez): The postinst script breaks if the user 'odl' already exists #} +RUN apt-get update \ + && apt-get -y install --no-install-recommends opendaylight \ + || sed -i '/^\s*adduser/,+1 d' /var/lib/dpkg/info/opendaylight.postinst \ + && apt-get -y install -f \ + && apt-get clean +{% endmacro %} + {% macro install_kubectl() %} {% if base_arch == 'x86_64' %} ENV KUBE_ARCH=amd64 |
