From ec88ca2c86ad1d4758967ce80cecd34b0fc8dc1d Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 4 Sep 2018 09:29:35 +0100 Subject: [PATCH] Add openSUSE Leap 15 jobs We make the following changes in order to support openSUSE Leap 15.0 - Updates the bindep.txt file to match the SUSE family. - The netstat binary has been moved to net-tools-deprecated package. - We fix a bug when checking the status to extra dependencies. The variable is an array, but the code was only checking the first entry of the array. - Replace spaces with '_' on ansible_distribution since openSUSE Leap 15.0 is being reported as 'openSUSE Leap' by Ansible. Change-Id: I800331e29e0d47a3121229cd66a5814277e34b84 --- bindep.txt | 4 +- .../required_defaults_openSUSE_Leap_15.0.yml | 48 +++++++++++++++++++ .../bifrost-ironic-install/tasks/main.yml | 6 +-- scripts/collect-test-info.sh | 2 + scripts/install-deps.sh | 6 ++- zuul.d/legacy-bifrost-jobs.yaml | 15 ++++++ zuul.d/project.yaml | 6 +++ 7 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 playbooks/roles/bifrost-ironic-install/defaults/required_defaults_openSUSE_Leap_15.0.yml diff --git a/bindep.txt b/bindep.txt index 9e5a2b0ed..22fd97916 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,7 +1,7 @@ epel-release [platform:centos platform:rhel] gcc git -libffi-devel [platform:redhat] +libffi-devel [platform:redhat platform:suse !platform:opensuseproject-42] libffi-devel-gcc5 [platform:opensuseproject-42] libffi-dev [platform:dpkg] libopenssl-devel [platform:suse] @@ -10,7 +10,7 @@ libssl-dev [platform:dpkg] lsb-release [platform:suse platform:dpkg] redhat-lsb [platform:redhat] make -mariadb [platform:opensuseproject-42] +mariadb [platform:suse] mariadb-server [platform:redhat] mysql-server [platform:dpkg] net-tools diff --git a/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_openSUSE_Leap_15.0.yml b/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_openSUSE_Leap_15.0.yml new file mode 100644 index 000000000..3c49f3f65 --- /dev/null +++ b/playbooks/roles/bifrost-ironic-install/defaults/required_defaults_openSUSE_Leap_15.0.yml @@ -0,0 +1,48 @@ +--- +init_template: systemd_template.j2 +init_dest_dir: /usr/lib/systemd/system/ +init_ext: .service +# NOTE (cinerama): The iPXE binaries are not currently packaged for SuSE, +# so we download them and install them to /usr/local/share/ipxe. If the +# files are packaged, download_ipxe can be removed and ipxe_dir set to +# the location of the packaged files. +download_ipxe: true +ipxe_dir: /usr/local/share/ipxe +ipxe_full_binary: ipxe.pxe +ironic_rootwrap_dir: /usr/bin/ +nginx_user: nginx +mysql_service_name: mysql +tftp_service_name: tftp +required_packages: + - python-selinux + - mariadb-server + - dnsmasq + - rabbitmq-server + - python-devel + - python-iniparse + - libffi-devel + - libxslt-devel + - openssl-devel + - libxml2-devel + - qemu-ipxe + - tftp + - xinetd + - parted + - ipmitool + - psmisc + - nginx + - wget + - mkisofs + - kpartx + - qemu-tools + - python3-openwsman + - policycoreutils-python + - debootstrap + - iptables + - tar + - curl + - socat + - python-pip + - gcc + - python-PyMySQL +iscsi_client_package: "open-iscsi" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/main.yml b/playbooks/roles/bifrost-ironic-install/tasks/main.yml index f728310c8..2b21f6327 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/main.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/main.yml @@ -41,14 +41,14 @@ - name: Include OS distribution-specific defaults include_vars: "{{ item }}" with_first_found: - - "../defaults/required_defaults_{{ ansible_distribution }}.yml" + - "../defaults/required_defaults_{{ ansible_distribution | regex_replace(' ', '_') }}.yml" - "../defaults/dummy-defaults.yml" - name: Include OS version-specific defaults include_vars: "{{ item }}" with_first_found: - - "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_release }}.yml" - - "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml" + - "../defaults/required_defaults_{{ ansible_distribution | regex_replace(' ', '_') }}_{{ ansible_distribution_release }}.yml" + - "../defaults/required_defaults_{{ ansible_distribution | regex_replace(' ', '_') }}_{{ ansible_distribution_version }}.yml" - "../defaults/dummy-defaults.yml" - name: "Install Ironic deps" diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index c0bf4579a..01055629e 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -34,6 +34,8 @@ if $(ip link &>/dev/null); then ip -s link &> ${LOG_LOCATION}/interface_counters.log fi if $(journalctl --version &>/dev/null); then + cp -a /var/log/* ${LOG_LOCATION}/. + sudo journalctl -u libvirtd &> ${LOG_LOCATION}/libvirtd.log sudo journalctl -u ironic-api &> ${LOG_LOCATION}/ironic-api.log sudo journalctl -u ironic-conductor &> ${LOG_LOCATION}/ironic-conductor.log sudo journalctl -u ironic-inspector &> ${LOG_LOCATION}/ironic-inspector.log diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index b8e7f6555..7143393f8 100644 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -21,7 +21,7 @@ CHECK_CMD_PKGS=( source /etc/os-release || source /usr/lib/os-release case ${ID,,} in - *suse) + *suse*) OS_FAMILY="Suse" INSTALLER_CMD="sudo -H -E zypper install -y --no-recommends" CHECK_CMD="zypper search --match-exact --installed" @@ -38,6 +38,8 @@ case ${ID,,} in [wget]=wget ) EXTRA_PKG_DEPS=( python-xml ) + # netstat moved to net-tools-deprecated in Leap 15 + [[ ${VERSION%%.*} -lt 42 ]] && EXTRA_PKG_DEPS+=( net-tools-deprecated ) sudo zypper -n ref # NOTE (cinerama): we can't install python without removing this package # if it exists @@ -125,7 +127,7 @@ for pkg in ${CHECK_CMD_PKGS[@]}; do done if [ -n "${EXTRA_PKG_DEPS-}" ]; then - for pkg in ${EXTRA_PKG_DEPS}; do + for pkg in ${EXTRA_PKG_DEPS[@]}; do if ! $(${CHECK_CMD} ${pkg} &>/dev/null); then ${INSTALLER_CMD} ${pkg} fi diff --git a/zuul.d/legacy-bifrost-jobs.yaml b/zuul.d/legacy-bifrost-jobs.yaml index 8c3d5b513..81b20627a 100644 --- a/zuul.d/legacy-bifrost-jobs.yaml +++ b/zuul.d/legacy-bifrost-jobs.yaml @@ -49,6 +49,11 @@ parent: bifrost-integration-dhcp nodeset: opensuse-423 +- job: + name: bifrost-integration-dhcp-opensuse-150 + parent: bifrost-integration-dhcp + nodeset: opensuse-150 + - job: name: bifrost-integration-dibipa-debian parent: bifrost-integration @@ -71,6 +76,11 @@ parent: bifrost-integration-dibipa-debian nodeset: opensuse-423 +- job: + name: bifrost-integration-dibipa-debian-opensuse-150 + parent: bifrost-integration-dibipa-debian + nodeset: opensuse-150 + - job: name: bifrost-integration-tinyipa parent: bifrost-base @@ -99,3 +109,8 @@ name: bifrost-integration-tinyipa-opensuse-423 parent: bifrost-integration-tinyipa nodeset: opensuse-423 + +- job: + name: bifrost-integration-tinyipa-opensuse-150 + parent: bifrost-integration-tinyipa + nodeset: opensuse-150 diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 2b991d78d..d68c9ba6f 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -9,11 +9,14 @@ - bifrost-integration-tinyipa-ubuntu-xenial - bifrost-integration-tinyipa-keystone-ubuntu-xenial - bifrost-integration-tinyipa-opensuse-423 + - bifrost-integration-tinyipa-opensuse-150 # Non-voting jobs - bifrost-integration-dhcp-ubuntu-xenial: voting: false - bifrost-integration-dhcp-opensuse-423: voting: false + - bifrost-integration-dhcp-opensuse-150: + voting: false - bifrost-integration-dhcp-centos-7: voting: false - bifrost-integration-dibipa-debian-centos-7: @@ -22,6 +25,8 @@ voting: false - bifrost-integration-dibipa-debian-opensuse-423: voting: false + - bifrost-integration-dibipa-debian-opensuse-150: + voting: false - bifrost-integration-tinyipa-centos-7: voting: false - openstack-tox-lower-constraints @@ -30,4 +35,5 @@ - bifrost-integration-tinyipa-ubuntu-xenial - bifrost-integration-tinyipa-keystone-ubuntu-xenial - bifrost-integration-tinyipa-opensuse-423 + - bifrost-integration-tinyipa-opensuse-150 - openstack-tox-lower-constraints