IBM / cloud-pak-deployer

Configuration-based installation of OpenShift and Cloud Pak for Data/Integration/Watson AIOps on various private and public cloud infrastructure providers. Deployment attempts to achieve the end-state defined in the configuration. If something fails along the way, you only need to restart the process to continue the deployment.
https://ibm.github.io/cloud-pak-deployer/
Apache License 2.0
130 stars 65 forks source link

CP4D 4.8.5 introduces issue when building deployer image #659

Closed fketelaars closed 3 months ago

fketelaars commented 3 months ago

Describe the bug When building deployer with CP4D 4.8.5, the following error is thrown:

[3/3] STEP 4/15: RUN yum install -y yum-utils &&     yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo &&     yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&     yum install -y tar sudo unzip wget jq skopeo httpd-tools git hostname bind-utils iproute procps-ng &&     pip3 install jmespath pyyaml argparse python-benedict pyvmomi psutil &&     alternatives --set python /usr/bin/python3 &&     yum install -y vault &&     yum install -y nginx &&     curl -O https://download.java.net/java/GA/jdk9/9/binaries/openjdk-9_linux-x64_bin.tar.gz &&     tar -xvf openjdk-9_linux-x64_bin.tar.gz -C /usr &&     ln -fs /usr/jdk-9/bin/java /usr/bin/java &&     ln -fs /usr/jdk-9/bin/keytool /usr/bin/keytool &&     rm -f openjdk-9_linux-x64_bin.tar.gz &&     curl -O https://get.helm.sh/helm-v3.6.0-linux-amd64.tar.gz &&     tar -zxvf helm-v3.6.0-linux-amd64.tar.gz linux-amd64/helm &&     mv linux-amd64/helm helm &&     rm -f helm-v3.6.0-linux-amd64.tar.gz &&     chmod u+x helm &&     mv helm /usr/bin/ &&     yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Red Hat Universal Base Image 9 (RPMs) - BaseOS  1.1 MB/s | 515 kB     00:00
Red Hat Universal Base Image 9 (RPMs) - AppStre 5.5 MB/s | 1.8 MB     00:00
Red Hat Universal Base Image 9 (RPMs) - CodeRea 763 kB/s | 192 kB     00:00
Dependencies resolved.
================================================================================
 Package              Arch       Version            Repository             Size
================================================================================
Installing:
 yum-utils            noarch     4.3.0-11.el9_3     ubi-9-baseos-rpms      45 k
Installing dependencies:
 dnf-plugins-core     noarch     4.3.0-11.el9_3     ubi-9-baseos-rpms      42 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 87 k
Installed size: 45 k
Downloading Packages:
(1/2): dnf-plugins-core-4.3.0-11.el9_3.noarch.r 260 kB/s |  42 kB     00:00
(2/2): yum-utils-4.3.0-11.el9_3.noarch.rpm      215 kB/s |  45 kB     00:00
--------------------------------------------------------------------------------
Total                                           406 kB/s |  87 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : dnf-plugins-core-4.3.0-11.el9_3.noarch                 1/2
  Installing       : yum-utils-4.3.0-11.el9_3.noarch                        2/2
  Running scriptlet: yum-utils-4.3.0-11.el9_3.noarch                        2/2
  Verifying        : dnf-plugins-core-4.3.0-11.el9_3.noarch                 1/2
  Verifying        : yum-utils-4.3.0-11.el9_3.noarch                        2/2
Installed products updated.

Installed:
  dnf-plugins-core-4.3.0-11.el9_3.noarch     yum-utils-4.3.0-11.el9_3.noarch

Complete!
Traceback (most recent call last):
  File "/usr/bin/yum-config-manager", line 76, in <module>
    from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'
Error: building at STEP "RUN yum install -y yum-utils &&     yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo &&     yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&     yum install -y tar sudo unzip wget jq skopeo httpd-tools git hostname bind-utils iproute procps-ng &&     pip3 install jmespath pyyaml argparse python-benedict pyvmomi psutil &&     alternatives --set python /usr/bin/python3 &&     yum install -y vault &&     yum install -y nginx &&     curl -O https://download.java.net/java/GA/jdk9/9/binaries/openjdk-9_linux-x64_bin.tar.gz &&     tar -xvf openjdk-9_linux-x64_bin.tar.gz -C /usr &&     ln -fs /usr/jdk-9/bin/java /usr/bin/java &&     ln -fs /usr/jdk-9/bin/keytool /usr/bin/keytool &&     rm -f openjdk-9_linux-x64_bin.tar.gz &&     curl -O https://get.helm.sh/helm-v3.6.0-linux-amd64.tar.gz &&     tar -zxvf helm-v3.6.0-linux-amd64.tar.gz linux-amd64/helm &&     mv linux-amd64/helm helm &&     rm -f helm-v3.6.0-linux-amd64.tar.gz &&     chmod u+x helm &&     mv helm /usr/bin/ &&     yum clean all": while running runtime: exit status 1

The error seems to be related to yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo (yet to be confirmed).

Solution In the "Power" enablement of deployer, yum-config-manager is no longer used. Check if the error remains with this change.

Alan111S commented 3 months ago

Hi @fketelaars , my install of 4.8.5 is blocked due to this issue - can you give me any idea of when you'll have a chance to look at it ?

luigimolinaro commented 2 months ago

I have hit this bug and i have a fix for that, i'll take care