missing groups or modules: mariadb:10.5 , virt:rhel, , virt:av and redis:5 on RHEL-9 container build

Bug #1956449 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned

Bug Description

While running container build on RHEL-9, we hit the following errors by building base containers

```
time="2021-12-24T05:37:26-05:00" level=debug msg="Running [\"crun\" \"create\" \"--bundle\" \"/var/tmp/buildah444047453\" \"--pid-file\" \"/var/tmp/buildah444047453/pid\" \"buildah-buildah444047453\"]"
time="2021-12-24T05:37:26-05:00" level=debug msg="Running [\"crun\" \"start\" \"buildah-buildah444047453\"]"
time="2021-12-24T05:37:26-05:00" level=debug msg="closing stdin"
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

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

Last metadata expiration check: 0:00:04 ago on Fri Dec 24 10:37:22 2021.
Unable to resolve argument virt:rhel
Error: Problems in request:
missing groups or modules: virt:rhel
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

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

Last metadata expiration check: 0:00:05 ago on Fri Dec 24 10:37:22 2021.
Error: Problems in request:
missing groups or modules: virt:av
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

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

Last metadata expiration check: 0:00:05 ago on Fri Dec 24 10:37:22 2021.
Error: Problems in request:
missing groups or modules: redis:5
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

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

Last metadata expiration check: 0:00:06 ago on Fri Dec 24 10:37:22 2021.
Error: Problems in request:
missing groups or modules: mariadb:10.5
time="2021-12-24T05:37:28-05:00" level=debug msg="\"/var/tmp/buildah444047453/mnt/buildah-bind-target-11\" is apparently not really mounted, skipping"
time="2021-12-24T05:37:28-05:00" level=debug msg="\"/var/tmp/buildah444047453/mnt/buildah-bind-target-5\" is apparently not really mounted, skipping"
time="2021-12-24T05:37:28-05:00" level=debug msg="\"/var/tmp/buildah444047453/mnt/buildah-bind-target-4\" is apparently not really mounted, skipping"
time="2021-12-24T05:37:28-05:00" level=debug msg="\"/var/tmp/buildah444047453/mnt/rootfs\" is apparently not really mounted, skipping"
time="2021-12-24T05:37:28-05:00" level=debug msg="\"/var/tmp/buildah444047453/mnt\" is apparently not really mounted, skipping"
time="2021-12-24T05:37:28-05:00" level=debug msg="error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci LANG=en_US.UTF-8] Command:run Args:[if [ 'rhel' == 'rhel' ]; then dnf module -y disable virt:rhel; dnf module -y enable virt:av; dnf module -y enable redis:5; dnf module -y enable mariadb:10.5; fi] Flags:[] Attrs:map[] Message:RUN if [ 'rhel' == 'rhel' ]; then dnf module -y disable virt:rhel; dnf module -y enable virt:av; dnf module -y enable redis:5; dnf module -y enable mariadb:10.5; fi Original:RUN if [ 'rhel' == 'rhel' ]; then dnf module -y disable virt:rhel; dnf module -y enable virt:av; dnf module -y enable redis:5; dnf module -y enable mariadb:10.5; fi}: error while running runtime: exit status 1"
```

On RHEL-9, these modules streams are no longer shipped.

In order to fix this issue, we need to modify this part to handle exception for RHEL-9
https://opendev.org/openstack/tripleo-common/src/branch/master/container-images/tcib/base/base.yaml#L17

```
    if [ '{{ tcib_distro }}' == 'rhel' ]; then
    {%- if "el" ~ tcib_release in tcib_packages.modules %}
     {% for item in tcib_packages.modules["el" ~ tcib_release] %}{% set key, value = (item.items() | list).0 %}dnf module -y {{ key }} {{ value }}; {% endfor %}
    {%- else %}
      echo "WARNING: No modules defined for el{{ tcib_release}}";
    {%- endif %}
    fi
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/823820
Committed: https://opendev.org/openstack/tripleo-common/commit/6688b56221842eb40b0191243640dc96f4c14ff9
Submitter: "Zuul (22348)"
Branch: master

commit 6688b56221842eb40b0191243640dc96f4c14ff9
Author: Sandeep Yadav <email address hidden>
Date: Fri Jan 7 21:10:05 2022 +0530

    Don't enable module stream in rhel9

    On Rhel-9, modules streams are no longer shipped. Updating condition
    with this patch to only try to enable module stream for rhel-8 case.

    Closes-Bug: #1956449
    Change-Id: I4b9bc141925f9ef9ec790b4c790df2aaf4fedd2d

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-common/+/823846

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-common/+/823846
Committed: https://opendev.org/openstack/tripleo-common/commit/adb4f1a6f867b498180c37efbb2545502ca74611
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit adb4f1a6f867b498180c37efbb2545502ca74611
Author: Sandeep Yadav <email address hidden>
Date: Fri Jan 7 21:10:05 2022 +0530

    Don't enable module stream in rhel9

    On Rhel-9, modules streams are no longer shipped. Updating condition
    with this patch to only try to enable module stream for rhel-8 case.

    Closes-Bug: #1956449
    Change-Id: I4b9bc141925f9ef9ec790b4c790df2aaf4fedd2d
    (cherry picked from commit 6688b56221842eb40b0191243640dc96f4c14ff9)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 16.3.0

This issue was fixed in the openstack/tripleo-common 16.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.