From 853e3f73b223b03d7ea9b00d89fb1d99c021eb43 Mon Sep 17 00:00:00 2001 From: smoshiur1237 Date: Thu, 4 Mar 2021 17:18:12 +0200 Subject: [PATCH] Fix: IPA image building with OpenSuse. At this moment the IPA image building with OpenSuse is broken and missing compatible packages for installation. Also, setuptools upgrade, svc mapping and package mapping are necessary for openSuse specific task. This PR will solve those issues to build IPA image with OpenSuse base image. There is another PR opened in diskimage-builder, which is adds small change for opensuse specific settings. Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/778723 Change-Id: I0a99d6313a38260973c1f725e2daed8d930da6c1 --- .../60-ironic-python-agent-ramdisk-install | 5 +++++ dib/ironic-python-agent-ramdisk/pkg-map | 11 +++++++++++ dib/ironic-python-agent-ramdisk/svc-map | 3 ++- zuul.d/ironic-python-agent-builder-jobs.yaml | 9 +++++++++ zuul.d/project.yaml | 2 ++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install index 5011f3a..5804c31 100755 --- a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install +++ b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install @@ -48,6 +48,11 @@ if [ $HAS_PIP == "False" ]; then $VENVDIR/bin/pip install "pip==$REQUIRED_PIP_STR" fi +# Upgrade setuptools package for openSuse +if [ "$DISTRO_NAME" == "opensuse" ]; then + $VENVDIR/bin/pip install -U setuptools +fi + # install IPA inside the virtual environment $VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS $IPADIR ln -s $VENVDIR/bin/ironic-python-agent /usr/local/bin/ diff --git a/dib/ironic-python-agent-ramdisk/pkg-map b/dib/ironic-python-agent-ramdisk/pkg-map index c95dfd8..984ef6b 100644 --- a/dib/ironic-python-agent-ramdisk/pkg-map +++ b/dib/ironic-python-agent-ramdisk/pkg-map @@ -32,6 +32,17 @@ "debian": { "python": "python3", "python-dev": "python3-dev" + }, + "suse": { + "qemu-utils": "qemu", + "python": "python3", + "genisoimage": "mkisofs", + "gdisk": "gptfdisk", + "libffi-dev": "libffi-devel", + "libssl-dev": "libopenssl-devel", + "python-dev": "python3-devel", + "git": "", + "man-db": "" } }, "default": { diff --git a/dib/ironic-python-agent-ramdisk/svc-map b/dib/ironic-python-agent-ramdisk/svc-map index d9c79e1..6a4fb9a 100644 --- a/dib/ironic-python-agent-ramdisk/svc-map +++ b/dib/ironic-python-agent-ramdisk/svc-map @@ -1,4 +1,5 @@ ironic-python-agent: default: openstack-ironic-python-agent redhat: openstack-ironic-python-agent - debian: ironic-python-agent \ No newline at end of file + debian: ironic-python-agent + opensuse: ironic-python-agent diff --git a/zuul.d/ironic-python-agent-builder-jobs.yaml b/zuul.d/ironic-python-agent-builder-jobs.yaml index 7d67cbb..f7007e4 100644 --- a/zuul.d/ironic-python-agent-builder-jobs.yaml +++ b/zuul.d/ironic-python-agent-builder-jobs.yaml @@ -120,6 +120,15 @@ image_type: 'dib' image_distro: 'fedora' +- job: + name: ironic-python-agent-check-image-dib-opensuse + parent: ironic-python-agent-check-image-base + required-projects: + - openstack/diskimage-builder + vars: + image_type: 'dib' + image_distro: 'opensuse' + - job: name: ironic-python-agent-check-image-dib-debian parent: ironic-python-agent-check-image-base diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 871097c..d4a9fb5 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -22,6 +22,8 @@ voting: false - ironic-python-agent-check-image-dib-ubuntu: voting: false + - ironic-python-agent-check-image-dib-opensuse: + voting: false - ipa-tempest-wholedisk-bios-ipmi-direct-dib-src: voting: false - ipa-tempest-bios-ipmi-iscsi-src: