From 5b64da9f319162c9d17e2894d8f5b0658d661e75 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 4 Jun 2020 12:05:12 +0100 Subject: [PATCH] Fix multiple issues 1. Fix monasca-grafana by pinning more Ruby gems childprocess 3.0.0 and ffi 1.13.0 depend on Ruby 2.3. 2. Bump bifrost to 6.0.4 Bifrost had a fix to stop using the master branch of DIB which dropped support for Python 2. 3. Drop docker-client from OracleLinux sensu-client image The package fails to install due to a missing dependency on subscription-manager. Closes-Bug: #1882070 (cherry picked from commit 3784d32d9ceacf0dad8057092752f1ae7be37ed3) 3. CI: Install python deps, mark oraclelinux rsyslog as skipped setuptools is missing from infra image - so it needs to be installed. Copy cat of a kolla-ansible change: https://review.opendev.org/#/c/735808/ Disables rsyslog build on oraclelinux (both source and binary) and tripleoclient (binary). 4. Stops installing ansible (this is the build part, kolla-ansible has its own repo and jobs). 5. Use stable/rocky branch for bifrost Pulls in a fix for diskimage-builder on python 2. Depends-On: https://review.opendev.org/738343 Depends-On: https://review.opendev.org/740953 Change-Id: I6068abcbc0e73eeab77b0aa99983a95adc6defd3 (cherry picked from commit d12137ce64fab7e8436aa1c2e32e3bc6ed47c1a1) --- docker/monasca/monasca-grafana/Dockerfile.j2 | 3 +- docker/sensu/sensu-client/Dockerfile.j2 | 7 ++- kolla/common/config.py | 2 +- kolla/image/build.py | 3 ++ tests/playbooks/pre.yml | 54 ++++++++++++++++++-- tools/gate_run.sh | 2 +- 6 files changed, 63 insertions(+), 8 deletions(-) diff --git a/docker/monasca/monasca-grafana/Dockerfile.j2 b/docker/monasca/monasca-grafana/Dockerfile.j2 index cde054dc58..6045c09d90 100644 --- a/docker/monasca/monasca-grafana/Dockerfile.j2 +++ b/docker/monasca/monasca-grafana/Dockerfile.j2 @@ -53,7 +53,8 @@ ARG monasca_grafana_url=https://github.com/monasca/grafana/archive/$monasca_graf # NOTE(yoctozepto): Update npm to 6.x version to avoid issues with metadata parsing. # NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH. # This is forced for all distros to avoid conflicts with native packages. -RUN gem install rake:"~>12" fpm \ +# NOTE(mgoddard): childprocess 3.0.0 and ffi 1.13.0 depend on Ruby 2.3. +RUN gem install rake:"~>12" ffi:"<1.13.0" childprocess:"<2.0.0" fpm \ && curl -sSL -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \ && mkdir -p ${monasca_grafana_build_path} \ && tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \ diff --git a/docker/sensu/sensu-client/Dockerfile.j2 b/docker/sensu/sensu-client/Dockerfile.j2 index 23087b2f0c..ed04a37e52 100644 --- a/docker/sensu/sensu-client/Dockerfile.j2 +++ b/docker/sensu/sensu-client/Dockerfile.j2 @@ -9,7 +9,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set sensu_client_packages = [ 'ceph-common', 'cyrus-sasl-devel', - 'docker-client', 'gcc-c++', 'make', 'mariadb', @@ -18,6 +17,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python-pymongo', 'ruby-devel' ] %} + {% if base_distro != 'oraclelinux' %} + # NOTE(mgoddard): Installing docker-client fails on OracleLinux. + {% set sensu_client_packages = sensu_client_packages + [ + 'docker-client', + ] %} + {% endif %} {% elif base_distro in ['debian', 'ubuntu'] %} {% set sensu_client_packages = [ 'build-essential', diff --git a/kolla/common/config.py b/kolla/common/config.py index c95bb08e0b..66bc47551e 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -299,7 +299,7 @@ SOURCES = { 'bifrost-base': { 'type': 'url', 'location': ('$tarballs_base/bifrost/' - 'bifrost-5.1.5.tar.gz')}, + 'bifrost-stable-rocky.tar.gz')}, 'blazar-base': { 'type': 'url', 'location': ('$tarballs_base/blazar/' diff --git a/kolla/image/build.py b/kolla/image/build.py index 98b42f2296..fa15708de7 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -185,14 +185,17 @@ SKIPPED_IMAGES = { "monasca-thresh", "nova-mksproxy", "ovsdpdk", + "rsyslog", "searchlight-base", "solum-base", + "tripleoclient", "vmtp", "zun-base" ], 'oraclelinux+source': [ "bifrost-base", "ovsdpdk", + "rsyslog", "searchlight-base", # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed # https://bugs.launchpad.net/tripleo/+bug/1744215 diff --git a/tests/playbooks/pre.yml b/tests/playbooks/pre.yml index 5e3ad08292..6c47e21fab 100644 --- a/tests/playbooks/pre.yml +++ b/tests/playbooks/pre.yml @@ -6,12 +6,58 @@ apt: name=dbus when: ansible_os_family == 'Debian' - - name: Install ansible - pip: - name: ansible + - block: + + - name: Ensure yum-utils is installed + # NOTE(mgoddard): The CentOS image used in CI has epel-release installed, + # but the configure-mirrors role used by Zuul disables epel. Since we + # install epel-release and expect epel to be enabled, enable it here. + package: + name: yum-utils + state: present + + - name: Enable the EPEL repository + command: yum-config-manager --enable epel + + become: true when: - - inventory_hostname == "primary" + - ansible_os_family == "RedHat" + + - name: Install Python2 modules + become: true + package: + name: + - python-pip + - python-setuptools + - python-wheel + - python-virtualenv + + # NOTE(hrw): On RedHat systems it is part of python3-virtualenv + - name: Install virtualenv on Debian systems + package: + name: + - virtualenv + become: true + when: + ansible_os_family == "Debian" + + - name: Upgrade pip to latest version + # NOTE(mnasiadka): pip 8.x delivered with EPEL has problems installing + # zipp and configparser + become: true + command: "pip2 install --upgrade pip" + + - name: Remove wheels extra-index from pip.conf + become: true + lineinfile: + path: /etc/pip.conf + regexp: '^extra-index-url' + state: absent - name: Ensure tox is installed pip: name: tox + virtualenv: "{{ ansible_user_dir }}/tox-venv" + virtualenv_python: python2.7 + virtualenv_site_packages: yes + become: true diff --git a/tools/gate_run.sh b/tools/gate_run.sh index 07f5e35743..0c5b603d3a 100755 --- a/tools/gate_run.sh +++ b/tools/gate_run.sh @@ -9,7 +9,7 @@ if [[ -z $IN_PROJECT_JOBS ]]; then fi tools/setup_gate.sh -tox -e $ACTION-$BASE_DISTRO-$INSTALL_TYPE +~/tox-venv/bin/tox -e $ACTION-$BASE_DISTRO-$INSTALL_TYPE if [[ -n $PACK_REGISTRY ]] && [[ $ACTION == "build" ]]; then pack_registry