Bug 1809725 - dnf upgrade fail in rhel8 images
Summary: dnf upgrade fail in rhel8 images
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: podman
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Giuseppe Scrivano
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-03 18:32 UTC by Steve Dickson
Modified: 2020-11-24 20:27 UTC (History)
10 users (show)

Fixed In Version: fuse-overlayfs 0.7.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 20:27:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Dickson 2020-03-03 18:32:23 UTC
Description of problem:
In a rhel8 container image 'RUN dnf -y upgrade' fails with:

Error: Cannot rename directory "/var/cache/dnf/appstream-d6d7b57ac113d323/tmpdir.deYE57/repodata" to "/var/cache/dnf/appstream-d6d7b57ac113d323/repodata": File exists


Version-Release number of selected component (if applicable):
podman-1.8.0-2.fc31.x86_64
kernel-5.5.7-200.fc31.x86_64

How reproducible:
100% 


Steps to Reproduce:
1. Use the following docker file: rhel8-devel.doc

FROM registry.access.redhat.com/rhel8-beta:latest
MAINTAINER Steve Dickson <steved>

USER root

#VOLUME ["/sys/fs/cgroup"]

#
# Install some repos
#
COPY repos/rhel8-latest.repo /etc/yum.repos.d/redhat-eng.repo

#
# Make sure everything is up to date 
#
RUN dnf -y upgrade

2. Try build the image
  podman build -f rhel8-devel.doc -t rhel8-devel .


Additional info:
Here is the repo that is being used: repos/rhel8-latest.repo

[RHEL8.1 BaseOS]
name=Red Hat Enterprise Linux 8.1 - Baseos
failovermethod=priority
baseurl=http://download.eng.bos.redhat.com/released/RHEL-8/8.1.0/BaseOS/x86_64/os/
enabled=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
skip_if_unavailable=false

[RHEL8.1 AppStream]
name=Red Hat Enterprise Linux 8.1 - AppStream
failovermethod=priority
baseurl=http://download.eng.bos.redhat.com/released/RHEL-8/8.1.0/AppStream/x86_64/os/
enabled=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
skip_if_unavailable=false

Note: I've used multiple repos with the same results.
      Also this does not happen using docker.

Comment 1 Steve Dickson 2020-03-03 18:50:20 UTC
Here is all of output from the run:

$ podman build -f rhel8-devel.doc -t rhel8-devel .
STEP 1: FROM registry.access.redhat.com/rhel8-beta:latest
STEP 2: MAINTAINER Steve Dickson <steved>
--> Using cache 61b9bd9b55bf0cca6630482b569f02947ef5dc3fafca63dc2ecd1f714b97436c
STEP 3: USER root
--> Using cache ac5fb6edd5fdfb6845f8e0c767a3e10f72e873a273a1133e1f32e3198848653e
STEP 4: COPY repos/rhel8-latest.repo /etc/yum.repos.d/redhat-eng.repo
--> Using cache 7d5dfc27926d9978c303d984a482410f24e197d159ba116ed97fe88fbb8ede29
STEP 5: RUN dnf -y upgrade
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.
Bad id for repo: RHEL8.1 BaseOS, byte =   7
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.
Red Hat Enterprise Linux 8.1 - AppStream        2.7 MB/s | 5.6 MB     00:02    
Error: Cannot rename directory "/var/cache/dnf/appstream-d6d7b57ac113d323/tmpdir.deYE57/repodata" to "/var/cache/dnf/appstream-d6d7b57ac113d323/repodata": File exists
Error: error building at STEP "RUN dnf -y upgrade": error while running runtime: exit status 1

Comment 2 Daniel Walsh 2020-03-03 19:16:03 UTC
Steve does this work as root?

Giuseppe feels lik Fuse-overlay>

Comment 3 Steve Dickson 2020-03-03 22:47:55 UTC
(In reply to Daniel Walsh from comment #2)
> Steve does this work as root?
> 
> Giuseppe feels lik Fuse-overlay>

Well at this point I'm at home so I'm going through a vpn and I'm getting
a different error.

# podman build -f rhel8-devel.doc -t rhel8-devel .
STEP 1: FROM registry.access.redhat.com/rhel8-beta:latest
STEP 2: MAINTAINER Steve Dickson <steved>
--> Using cache cd4d54b365465f12562623e2e12a70226fc6edee0d779b24e5dd530d05b7b32c
STEP 3: USER root
--> Using cache f13c6ddd892159d76638a2f2aec8971e6ffa9362de240bf14095e995716eaa04
STEP 4: COPY repos/rhel8-latest.repo /etc/yum.repos.d/redhat-eng.repo
--> Using cache cd5e25e0273d5d298ec92ec5be91e7c416cf21f0013a169dc936e8d15bee413d
STEP 5: RUN dnf -y upgrade
2020-03-03T22:44:12.000911751Z: sd-bus add match: Connection reset by peer
error running container: error creating container for [/bin/sh -c dnf -y upgrade]: : exit status 1
Error: error building at STEP "RUN dnf -y upgrade": error while running runtime: exit status 1

I'll be in the office tomorrow (aka behind the firewall) I'll try it again as root.

Comment 4 Giuseppe Scrivano 2020-03-04 08:46:06 UTC
should be fixed with 0.7.7, I am cutting a new release today

Comment 7 Steve Dickson 2020-03-04 16:45:36 UTC
(In reply to Daniel Walsh from comment #2)
> Steve does this work as root?
Yes... build as root worked... thanks!

Comment 8 Steve Dickson 2020-03-10 15:48:07 UTC
(In reply to Giuseppe Scrivano from comment #4)
> should be fixed with 0.7.7, I am cutting a new release today

I did a scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=42381182
and it did fix the problem

Test-by: Steve Dickson <steved>

Comment 9 Steve Dickson 2020-03-17 19:12:03 UTC
(In reply to Steve Dickson from comment #8)
> (In reply to Giuseppe Scrivano from comment #4)
> > should be fixed with 0.7.7, I am cutting a new release today
> 
> I did a scratch build
> https://koji.fedoraproject.org/koji/taskinfo?taskID=42381182
> and it did fix the problem
> 
> Test-by: Steve Dickson <steved>

I still there there is a problem... 

The doc image file creates steved by doing:

RUN useradd -d /devel/steved -M -u 3606 steved
RUN echo "steved ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers

USER steved
WORKDIR /devel/steved

Then the podman run does the following 
podman run --volume=/home/steved:/devel/steved \

and everything under /devel/steved is owned by 
root not steved.

Comment 10 Daniel Walsh 2020-03-17 20:07:36 UTC
Try

podman run --userns=keep-id --volume=/home/steved:/devel/steved  ...

Comment 11 Ben Cotton 2020-11-03 16:25:22 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2020-11-24 20:27:24 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.