RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1912155 - Fail to update filesystem inside systemd-nspawn container
Summary: Fail to update filesystem inside systemd-nspawn container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: filesystem
Version: 8.3
Hardware: x86_64
OS: Linux
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Martin Osvald 🛹
QA Contact: František Hrdina
URL:
Whiteboard:
: 1965093 2027663 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-03 22:01 UTC by Igor Kremin'
Modified: 2022-01-25 16:52 UTC (History)
7 users (show)

Fixed In Version: filesystem-3.8-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:51:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4461 0 None None None 2021-11-09 19:51:55 UTC

Description Igor Kremin' 2021-01-03 22:01:16 UTC
Description of problem:
Fail to update filesystem inside systemd-nspawn container                                                                   

Version-Release number of selected component (if applicable):
3.8-3.el8.x86_64

How reproducible:
always

Steps to Reproduce:

1. Install RHEL 8.3 / CentOS 8.3

2. create systemd-nspawn container:

yum -y --nogpg --releasever=8 --installroot=/var/lib/machines/$name install systemd systemd-networkd passwd yum dnf-plugins-core vim-enhanced bash bash-completion cronie less psmisc openssh-server iputils iproute net-tools openssh-clients epel-release mc htop tar rsyslog libxslt-devel rootfiles

3. enter inside container

4. yum update

Actual results:
======================================================================================================================================================
 Package                               Architecture                      Version                              Repository                         Size
======================================================================================================================================================
Upgrading:
 filesystem                            x86_64                            3.8-3.el8                            baseos                            1.1 M

Transaction Summary
======================================================================================================================================================
Upgrade  1 Package

Total download size: 1.1 M
Downloading Packages:
filesystem-3.8-3.el8.x86_64.rpm                                                                                       8.9 MB/s | 1.1 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 3.2 MB/s | 1.1 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: filesystem-3.8-3.el8.x86_64                                                                                                  1/1
  Preparing        :                                                                                                                              1/1
  Upgrading        : filesystem-3.8-3.el8.x86_64                                                                                                  1/2
Error unpacking rpm package filesystem-3.8-3.el8.x86_64
  Verifying        : filesystem-3.8-3.el8.x86_64                                                                                                  1/2
  Verifying        : filesystem-3.8-2.el8.x86_64                                                                                                  2/2

Failed:
  filesystem-3.8-2.el8.x86_64                                               filesystem-3.8-3.el8.x86_64

Error: Transaction failed

----------------------------------------------------------------------------

Expected results:

updated filesystem package without errors.

Additional info:
  Upgrading        : filesystem-3.8-3.el8.x86_64
error: unpacking of archive failed on file /sys: cpio: chmod
error: filesystem-3.8-3.el8.x86_64: install failed
Error unpacking rpm package filesystem-3.8-3.el8.x86_64

/sys in container is readonly 
tmpfs on /sys type tmpfs (ro,nosuid,nodev,noexec,relatime,mode=755)

Comment 1 Pavel Zhukov 2021-01-04 09:47:00 UTC
Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please visit:
    https://access.redhat.com/support

Comment 2 Gena Makhomed 2021-01-10 23:07:33 UTC
I hit the same bug, but with different error message:

Error unpacking rpm package filesystem-3.8-3.el8.x86_64
  Running scriptlet: systemd-networkd-247.2-1.el8.x86_64
error: unpacking of archive failed on file /proc: cpio: chown

/proc is mounted in rw mode inside systemd-nspawn container:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

# ls -la -d /proc
dr-xr-xr-x 471 nobody nobody 0 Jan  9 09:02 /proc

Hope this help to identify and fix the bug.

Comment 3 Gena Makhomed 2021-02-27 19:40:10 UTC
workaround, run inside systemd-nspawn container:

# echo '%_netsharedpath /sys:/proc' > /etc/rpm/macros.netshared

after this workaround filesystem package will be updated inside systemd-nspawn container without any problems:

# yum update filesystem

Comment 8 Pavel Zhukov 2021-06-21 06:16:17 UTC
*** Bug 1965093 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2021-11-09 19:51:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (filesystem bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4461

Comment 22 Michal Domonkos 2022-01-25 16:52:55 UTC
*** Bug 2027663 has been marked as a duplicate of this bug. ***


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