Bug 1475214 - package update filesystem-3.2-21.el7.x86_64 fails in el7 nspawn container because of readonly /sys
package update filesystem-3.2-21.el7.x86_64 fails in el7 nspawn container bec...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: filesystem (Show other bugs)
7.3
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Ondrej Vasik
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-26 04:07 EDT by Christoph Sievers
Modified: 2017-09-18 13:00 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christoph Sievers 2017-07-26 04:07:26 EDT
Description of problem:

trying to update filesystem-3.2-21.el7.x86_64 fails in a nspawn el7 container because of readonly /sys

Version-Release number of selected component (if applicable):

filesystem-3.2-21.el7.x86_64

How reproducible:

start nspawn container, try to yum update filesystem in that el7 container


Actual results:

  Updating   : filesystem-3.2-21.el7.x86_64                                                                                                                                                                      1/2 
Error unpacking rpm package filesystem-3.2-21.el7.x86_64
error: unpacking of archive failed on file /sys: cpio: chmod
filesystem-3.2-20.el7.x86_64 was supposed to be removed but is not!

Failed:
 filesystem.x86_64 0:3.2-20.el7 filesystem.x86_64 0:3.2-21.el7

Expected results:

updating cleanly :-)


Additional info:
Comment 2 Ondrej Vasik 2017-08-10 10:05:32 EDT
Just as a confirmation of duplicate - is that on RHEL 6 host?
/sys is controlled by kernel - and kernel in containers is used from the host. Unfortunately, mode set by kernel changed between RHEL 6 and RHEL 7 (see #1037862) - so there is no good solution for this. It will be either broken on RHEL 6 host or on RHEL 7 host - or if I make this directory ghosted, it would show as "permissions modified" on one or other ghost - which is not perfect as well - could scare admin.
Btw. https://bugzilla.redhat.com/show_bug.cgi?id=1116516 is similar report.
Comment 3 Christoph Sievers 2017-09-18 13:00:22 EDT
It is a rhel 7 guest but I think I caused the problem myself. I'm using nsenter and remount parts of /sys to be able to set some settings using sysctl (I know it's bad) in the container - then remounting it ro but for some reason that changes the permissions on that directory like this

drwxr-xr-x. 9 root root 180 Jul 26 15:55 /sys

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