content provider failing with Problem: The operation would result in removing the following protected packages: redhat-release

Bug #1922326 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Critical
Unassigned

Bug Description

https://review.opendev.org/c/openstack/tripleo-heat-templates/+/778077/ content provider job is failing in gate queue with following error:
https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_01e/778077/7/gate/tripleo-ci-centos-8-content-provider/01e3234/logs/undercloud/home/zuul/workspace/logs/container-builds/33cf6ba2-78aa-41de-8ac5-82027725a868/base/base-build.log

```
yaml-cpp-0.6.3-4.el8.x86_64

Complete!
Failed to set locale, defaulting to C.UTF-8
level=debug msg="Parsed Step: {Env:[container=oci LANG=en_US.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci LANG=en_US.UTF-8 container=oci] Command:run Args:[mkdir -p /openstack] Flags:[] Attrs:map[] Message:RUN mkdir -p /openstack Original:RUN mkdir -p /openstack}"
STEP 23: RUN mkdir -p /openstack
level=debug msg="RUN imagebuilder.Run{Shell:true, Args:[]string{\"mkdir -p /openstack\"}}, docker.Config{Hostname:\"f80d667b537f\", Domainname:\"\", User:\"\", Memory:0, MemorySwap:0, MemoryReservation:0, KernelMemory:0, CPUShares:0, CPUSet:\"\", PortSpecs:[]string(nil), ExposedPorts:map[docker.Port]struct {}{}, PublishService:\"\", StopSignal:\"\", StopTimeout:0, Env:[]string{\"container=oci\", \"LANG=en_US.UTF-8\", \"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\", \"container=oci\", \"\", \"\", \"LANG=en_US.UTF-8\", \"container=oci\"}, Cmd:[]string{\"/bin/bash\"}, Shell:[]string{}, Healthcheck:(*docker.HealthConfig)(nil), DNS:[]string(nil), Image:\"\", Volumes:map[string]struct {}{}, VolumeDriver:\"\", WorkingDir:\"\", MacAddress:\"\", Entrypoint:[]string{}, SecurityOpts:[]string(nil), OnBuild:[]string{}, Mounts:[]docker.Mount(nil), Labels:map[string]string{\"architecture\":\"x86_64\", \"build-date\":\"2021-02-10T00:15:26.710361\", \"com.redhat.build-host\":\"cpt-1004.osbs.prod.upshift.rdu2.redhat.com\", \"com.redhat.component\":\"ubi8-container\", \"com.redhat.license_terms\":\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI\", \"description\":\"The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\", \"distribution-scope\":\"public\", \"io.k8s.description\":\"The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\", \"io.k8s.display-name\":\"Red Hat Universal Base Image 8\", \"io.openshift.expose-services\":\"\", \"io.openshift.tags\":\"base rhel8\", \"maintainer\":\"OpenStack TripleO team\", \"name\":\"ubi8\", \"release\":\"289\", \"summary\":\"Provides the latest release of Red Hat Universal Base Image 8.\", \"tcib_managed\":\"true\", \"url\":\"https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8/images/8.3-289\", \"vcs-ref\":\"7dd0869dabeebe7119fc04b16767c5991bcaa865\", \"vcs-type\":\"git\", \"vendor\":\"Red Hat, Inc.\", \"version\":\"8.3\"}, AttachStdin:false, AttachStdout:false, AttachStderr:false, ArgsEscaped:false, Tty:false, OpenStdin:false, StdinOnce:false, NetworkDisabled:false, VolumesFrom:\"\"}"
level=debug msg="using \"/var/tmp/buildah824202213\" to hold bundle data"
level=debug msg="Resources: &buildah.CommonBuildOptions{AddHost:[]string{}, CgroupParent:\"\", CPUPeriod:0x0, CPUQuota:0, CPUShares:0x0, CPUSetCPUs:\"\", CPUSetMems:\"\", HTTPProxy:true, Memory:0, DNSSearch:[]string{}, DNSServers:[]string{}, DNSOptions:[]string{}, MemorySwap:0, LabelOpts:[]string(nil), SeccompProfilePath:\"/usr/share/containers/seccomp.json\", ApparmorProfile:\"\", ShmSize:\"65536k\", Ulimit:[]string{\"nofile=1048576:1048576\", \"nproc=1048576:1048576\"}, Volumes:[]string{\"/etc/yum.repos.d:/etc/distro.repos.d:z\", \"/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z\", \"/etc/yum.repos.d:/etc/distro.repos.d:z\", \"/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z\", \"/etc/dnf/vars:/etc/dnf/vars:z\", \"/opt/gating_repo:/opt/gating_repo:z\"}}"
level=debug msg="stdio is not a terminal, defaulting to not using a terminal"
level=debug msg="ensuring working directory \"/var/lib/containers/storage/overlay/f61f85e78ed28fdf6567f586a715e7cef03bf84ab5f3510ed6956cd442bf9bcb/merged\" exists"
level=debug msg="/etc/system-fips does not exist on host, not mounting FIPS mode secret"
level=debug msg="setting up mounted volume at \"/etc/distro.repos.d\""
level=debug msg="setting up mounted volume at \"/etc/pki/rpm-gpg\""
level=debug msg="setting up mounted volume at \"/etc/distro.repos.d\""
level=debug msg="setting up mounted volume at \"/etc/pki/rpm-gpg\""
level=debug msg="setting up mounted volume at \"/etc/dnf/vars\""
level=debug msg="setting up mounted volume at \"/opt/gating_repo\""
level=debug msg="bind mounted \"/var/lib/containers/storage/overlay/f61f85e78ed28fdf6567f586a715e7cef03bf84ab5f3510ed6956cd442bf9bcb/merged\" to \"/var/tmp/buildah824202213/mnt/rootfs\""
level=debug msg="bind mounted \"/etc/yum.repos.d\" to \"/var/tmp/buildah824202213/mnt/buildah-bind-target-0\""
level=debug msg="bind mounted \"/etc/pki/rpm-gpg\" to \"/var/tmp/buildah824202213/mnt/buildah-bind-target-1\""
level=debug msg="bind mounted \"/etc/dnf/vars\" to \"/var/tmp/buildah824202213/mnt/buildah-bind-target-2\""
level=debug msg="bind mounted \"/opt/gating_repo\" to \"/var/tmp/buildah824202213/mnt/buildah-bind-target-3\""

Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 0:02:06 ago on Fri 02 Apr 2021 02:21:27 AM UTC.
Error:
 Problem: The operation would result in removing the following protected packages: redhat-release
(try to add '--skip-broken' to skip uninstallable packages)
level=debug msg="error building at step {Env:[container=oci LANG=en_US.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci LANG=en_US.UTF-8 container=oci] Command:run Args:[dnf update -y && dnf clean all && rm -rf /var/cache/dnf] Flags:[] Attrs:map[] Message:RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf Original:RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf}: error while running runtime: exit status 1"
```

I am not sure what is the issue, It breaks while building base containers from ubi8 image. Please have a look.

Revision history for this message
wes hayutin (weshayutin) wrote :
Revision history for this message
wes hayutin (weshayutin) wrote :
Revision history for this message
wes hayutin (weshayutin) wrote :

could be related to centos-stream-release obsoleting the redhat-release file

https://git.centos.org/rpms/centos-stream-release/c/ba1b93480d15848e19aa40af070308d6a2a3eb20

Revision history for this message
wes hayutin (weshayutin) wrote :
Revision history for this message
wes hayutin (weshayutin) wrote :

suggestions from the centos crew:

Carl George, 13 min
this was something we did to facilitate basing the cs8 container image on ubi8

@Brian Stinson do we still need to do that?

Brian Stinson, 12 min
@Wesley Hayutin why not pull quay.io/centos/centos:stream8 directly?

Brian Stinson, 4 min
if you really really need to build something on your own, you need to do something like this anyways: https://github.com/CentOS/sig-cloud-instance-images/blob/CentOS-8-Stream/docker/Dockerfile#L18

dnf protects *-release whether they're obsoleted or not

Wesley Hayutin, 3 min
k.. will try these out.. @Carl George the openstack org wanted to use the same ubi image for both upstream and downstream.. Has been working well until this minor issue.

thanks for the quick response guys!

trying a plain exclude atm

Revision history for this message
wes hayutin (weshayutin) wrote :

OK.. this is the current fix / workaround depending on if we want to change images
https://review.opendev.org/c/openstack/tripleo-common/+/784601

wes hayutin (weshayutin)
Changed in tripleo:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers