From 6319bc6f559ab5c49a7ad701b606b58af62337b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Mon, 10 Aug 2020 21:14:07 +0200 Subject: [PATCH] Remove weird deps This is a follow-up on "Refactor httpd install to base image" [1]. It seems a copy-paste algorithm was used to craft Dockerfiles for some httpd-enabled services which resulted in an abundance of ldappool packages getting installed, even in the 'source' case. This seems to have also kept ldappool at a lower version because it did not get updated via pip later. This patch deals with that and also moves ldap deps for Keystone to their proper place in 'source' case (extras). Note Keystone client gets installed in openstack-base. Cinder does not need to include Keystone either. [1] https://review.opendev.org/744037 Change-Id: I017d7a6a5d2b1ae6c04556dcf172453a36de5be7 --- docker/aodh/aodh-base/Dockerfile.j2 | 3 --- docker/cinder/cinder-api/Dockerfile.j2 | 1 - docker/gnocchi/gnocchi-base/Dockerfile.j2 | 4 ---- docker/keystone/keystone-base/Dockerfile.j2 | 9 +++++---- docker/masakari/masakari-base/Dockerfile.j2 | 2 -- docker/openstack-base/Dockerfile.j2 | 1 - docker/panko/panko-base/Dockerfile.j2 | 3 --- docker/qinling/qinling-base/Dockerfile.j2 | 2 -- docker/vitrage/vitrage-api/Dockerfile.j2 | 2 -- docker/vitrage/vitrage-base/Dockerfile.j2 | 2 -- docker/zaqar/zaqar-base/Dockerfile.j2 | 4 ---- docker/zun/zun-base/Dockerfile.j2 | 2 -- 12 files changed, 5 insertions(+), 30 deletions(-) diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index 238c39fd83..b4d3eb3a00 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -16,7 +16,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set aodh_base_packages = [ 'openstack-aodh-api', 'openstack-aodh-common', - 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} @@ -27,7 +26,6 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% set aodh_base_packages = [ 'aodh-common', 'python3-aodh', - 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} @@ -38,7 +36,6 @@ RUN mkdir -p /var/www/cgi-bin/aodh \ {% elif install_type == 'source' %} {% set aodh_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index 57f4407b08..a342d7636d 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -10,7 +10,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set cinder_api_packages = [ - 'python3-keystone' ] %} {% elif base_package_type == 'deb' %} {% set cinder_api_packages = [ diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index e20aefddf0..af2a47c53f 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -22,7 +22,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'gnocchi-common', 'python3-boto3', 'python3-cradox', - 'python3-ldappool', ] %} {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} @@ -33,7 +32,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'librados-dev', 'python3-boto3', 'python3-dev', - 'python3-ldappool', 'python3-pip', 'python3-rados', 'python3-setuptools', @@ -52,7 +50,6 @@ RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages {% set gnocchi_base_packages = [ 'librados2-devel', - 'python3-ldappool' ] %} # on x86-64 pip grabs precompiled numpy/scipy - on aarch64/ppc64le @@ -71,7 +68,6 @@ RUN mkdir -p /var/www/cgi-bin/gnocchi {% set gnocchi_base_packages = [ 'librados-dev', - 'python3-ldappool' ] %} # on x86-64 pip grabs precompiled numpy/scipy - on aarch64/ppc64le diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index f3b4c2d0ba..2176db3e1e 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -15,7 +15,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'mod_auth_mellon', 'mod_auth_openidc', 'openstack-keystone', - 'python3-keystoneclient', 'python3-ldappool' ] %} @@ -44,9 +43,10 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ + 'cyrus-sasl-devel', 'mod_auth_mellon', 'mod_auth_openidc', - 'python3-ldappool' + 'openldap-devel', ] %} RUN dnf module enable mod_auth_openidc -y @@ -56,7 +56,8 @@ RUN dnf module enable mod_auth_openidc -y {% set keystone_base_packages = [ 'libapache2-mod-auth-mellon', 'libapache2-mod-auth-openidc', - 'python3-ldappool' + 'libldap2-dev', + 'libsasl2-dev', ] %} {{ macros.install_packages(keystone_base_packages | customizable("packages")) }} {% endif %} @@ -65,7 +66,7 @@ RUN dnf module enable mod_auth_openidc -y ADD keystone-base-archive /keystone-base-source {% set keystone_base_pip_packages = [ - '/keystone' + '/keystone[ldap]', ] %} RUN ln -s keystone-base-source/* keystone \ diff --git a/docker/masakari/masakari-base/Dockerfile.j2 b/docker/masakari/masakari-base/Dockerfile.j2 index 1c99eb3006..fe73a260cd 100644 --- a/docker/masakari/masakari-base/Dockerfile.j2 +++ b/docker/masakari/masakari-base/Dockerfile.j2 @@ -19,7 +19,6 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set masakari_base_packages = [ - 'python3-ldappool', ] %} {{ macros.install_packages(masakari_base_packages | customizable("packages")) }} @@ -27,7 +26,6 @@ RUN mkdir -p /var/www/cgi-bin/masakari {% elif base_package_type == 'deb' %} {% set masakari_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(masakari_base_packages | customizable("packages")) }} diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 247576b2b6..03d85a3a78 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -160,7 +160,6 @@ ENV DEBIAN_FRONTEND noninteractive 'make', 'mariadb-devel', 'mod_ssl', - 'openldap-devel', 'openssl', 'openssl-devel', 'pcre-devel', diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 index 72023fcc19..23af2af02e 100644 --- a/docker/panko/panko-base/Dockerfile.j2 +++ b/docker/panko/panko-base/Dockerfile.j2 @@ -14,7 +14,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set panko_base_packages = [ 'openstack-panko-common', - 'python3-ldappool' ] %} {% elif base_package_type == 'deb' %} {% set panko_base_packages = [ @@ -26,13 +25,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set panko_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(panko_base_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} {% set panko_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(panko_base_packages | customizable("packages")) }} diff --git a/docker/qinling/qinling-base/Dockerfile.j2 b/docker/qinling/qinling-base/Dockerfile.j2 index 5faa4e9143..800e9d5f2c 100644 --- a/docker/qinling/qinling-base/Dockerfile.j2 +++ b/docker/qinling/qinling-base/Dockerfile.j2 @@ -19,13 +19,11 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set qinling_base_packages = [ - 'python3-ldappool' ] %} {% elif base_package_type == 'deb' %} {% set qinling_base_packages = [ - 'python3-ldappool' ] %} {% endif %} diff --git a/docker/vitrage/vitrage-api/Dockerfile.j2 b/docker/vitrage/vitrage-api/Dockerfile.j2 index a4f1a78bad..e579f05fa5 100644 --- a/docker/vitrage/vitrage-api/Dockerfile.j2 +++ b/docker/vitrage/vitrage-api/Dockerfile.j2 @@ -13,7 +13,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set vitrage_api_packages = [ 'openstack-vitrage-api', - 'python3-ldappool' ] %} {{ macros.install_packages(vitrage_api_packages | customizable("packages")) }} @@ -22,7 +21,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_distro == 'debian' %} {% set vitrage_api_packages = [ - 'python3-ldappool', 'vitrage-api' ] %} diff --git a/docker/vitrage/vitrage-base/Dockerfile.j2 b/docker/vitrage/vitrage-base/Dockerfile.j2 index 0fb62b3daa..c61ad35173 100644 --- a/docker/vitrage/vitrage-base/Dockerfile.j2 +++ b/docker/vitrage/vitrage-base/Dockerfile.j2 @@ -45,7 +45,6 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set vitrage_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(vitrage_base_packages | customizable("packages")) }} @@ -53,7 +52,6 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif base_package_type == 'deb' %} {% set vitrage_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(vitrage_base_packages | customizable("packages")) }} diff --git a/docker/zaqar/zaqar-base/Dockerfile.j2 b/docker/zaqar/zaqar-base/Dockerfile.j2 index d12f386dea..6ee37065a9 100644 --- a/docker/zaqar/zaqar-base/Dockerfile.j2 +++ b/docker/zaqar/zaqar-base/Dockerfile.j2 @@ -14,7 +14,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ 'openstack-zaqar', - 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ @@ -25,7 +24,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif base_package_type == 'deb' %} {% set zaqar_base_packages = [ 'zaqar-common', - 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ @@ -38,14 +36,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} {% set zaqar_base_packages = [ - 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2 index 50e0bbe4d1..a0d425855d 100644 --- a/docker/zun/zun-base/Dockerfile.j2 +++ b/docker/zun/zun-base/Dockerfile.j2 @@ -20,7 +20,6 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% set zun_base_packages = [ 'numactl', - 'python3-ldappool' ] %} {{ macros.install_packages(zun_base_packages | customizable("packages")) }} @@ -30,7 +29,6 @@ RUN mkdir -p /var/www/cgi-bin/zun {% set zun_base_packages = [ 'numactl', - 'python3-ldappool' ] %} {{ macros.install_packages(zun_base_packages | customizable("packages")) }}