From 70ef9a4fee0f39ff64281246968d2deb175bb4af Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 29 Nov 2019 17:20:14 +0100 Subject: drop *_existing_user_fix macros Commit 109706aa8b26f6f915e1cadae89de8135c3b68bf bumped 'system' users beyond range used by Kolla. So Debian/Ubuntu does not complain that system users created by packages exist already on package install. Change-Id: I9bf4b240839d46088ac668f26cf065dd5e3775c2 --- docker/macros.j2 | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index aedb7b0b7..8a9c42f6b 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -72,33 +72,6 @@ RUN usermod --append --home {{ homedir }} --groups kolla {{ name }} \ && chown -R {{ user.uid }}:{{ user.gid }} {{ homedir }} {% endmacro %} -{% macro debian_fix_existing_user(package, lines) %} -RUN apt-get update \ - && apt-get -y install --no-install-recommends {{ package }} \ - || sed -i '/adduser/,+{{ lines }} d' /var/lib/dpkg/info/{{ package }}.postinst \ - && echo "configuring packages" \ - && dpkg --configure -a \ - && echo "done" \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -{% endmacro %} - -{% macro debian_haproxy_existing_user_fix() %} -{# NOTE(SamYaple): The postinst script breaks if the user 'haproxy' already exists #} - {{ debian_fix_existing_user('haproxy', 1) }} -{% endmacro %} - -{% macro debian_mongodb_existing_user_fix() %} -{# NOTE(hrw): The postinst script breaks if the user 'mongodb' already exists #} -{# TODO(hrw): Version in Debian 'testing' checks does user exists #} - {{ debian_fix_existing_user('mongodb-server', 3) }} -{% endmacro %} - -{% macro debian_opendaylight_existing_user_fix() %} -{# NOTE(egonzalez): The postinst script breaks if the user 'odl' already exists #} - {{ debian_fix_existing_user('opendaylight', 1) }} -{% endmacro %} - {% macro install_fluent_plugins(binary, plugins, chain=False) -%} {% if plugins is defined and plugins|length > 0 -%} {% if not chain -%} RUN {% endif -%} -- cgit v1.2.3