Hide Forgot
Description of problem: SLAC (Stanford Linear Accelerator Center) maintains a central read only nfs repository of tools for their workstation users. The mount point is linked to by /usr/local. This scenario poses a problem when an end user runs yum upgrade/update as the read only nature of /usr/local causes the upgrade/update of perl and perl-libs to fail (in my testing it's only these two rpm's that fail an upgrade of a base os install). As per SLAC: We think the rpm update should not fail because of a non-writable /usr/local. We believe rpm should be configurable to allow /usr/local to be a known non-writable space, so the rpm update does not fail. This scenario not only breaks updates to perl and perl-libs but breaks installing Perl modules via the RHEL supplied CPAN. The obvious solution/work around is to put /usr/local back in the state the perl/perl-libs rpms expect, perform the update/upgrade then return it to the configuration of their liking. Curious if there is possibly another means of resolving this, like maybe an option to point site perl elsewhere. $ cat yum_update_perl_usr_local_linked_to_ro_fs Script started on Tue 07 Jun 2011 01:55:41 PM EDT [root@rhel601s ~]# ls -ld /usr/local lrwxrwxrwx. 1 root root 13 Jun 7 13:53 /usr/local -> /export/local [root@rhel601s ~]# mount |grep local /usr/.local on /export/local type none (ro,bind) [root@rhel601s ~]# yum update perl perl-libs Loaded plugins: rhnplugin Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package perl.x86_64 4:5.10.1-115.el6 will be updated ---> Package perl.x86_64 4:5.10.1-119.el6 will be an update ---> Package perl-libs.x86_64 4:5.10.1-115.el6 will be updated ---> Package perl-libs.x86_64 4:5.10.1-119.el6 will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: perl x86_64 4:5.10.1-119.el6 rhel-x86_64-server-6 10 M perl-libs x86_64 4:5.10.1-119.el6 rhel-x86_64-server-6 577 k Transaction Summary ================================================================================ Upgrade 2 Package(s) Total download size: 11 M Is this ok [y/N]: y Downloading Packages: (1/2): perl-5.10.1-119.el6.x86_64.rpm | 10 MB 00:03 (2/2): perl-libs-5.10.1-119.el6.x86_64.rpm | 577 kB 00:00 -------------------------------------------------------------------------------- Total 2.2 MB/s | 11 MB 00:04 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : 4:perl-libs-5.10.1-119.el6.x86_64 1/4 Error unpacking rpm package 4:perl-libs-5.10.1-119.el6.x86_64 error: unpacking of archive failed on file /usr/local/lib64/perl5: cpio: lsetfilecon Updating : 4:perl-5.10.1-119.el6.x86_64 2/4 Error unpacking rpm package 4:perl-5.10.1-119.el6.x86_64 error: unpacking of archive failed on file /usr/local/share/perl5: cpio: lsetfilecon 4:perl-5.10.1-115.el6.x86_64 was supposed to be removed but is not! 4:perl-libs-5.10.1-115.el6.x86_64 was supposed to be removed but is not! Failed: perl.x86_64 4:5.10.1-119.el6 perl-libs.x86_64 4:5.10.1-119.el6 Complete! [root@rhel601s ~]# exit exit Script done on Tue 07 Jun 2011 01:56:14 PM EDT Version-Release number of selected component (if applicable): perl-libs-5.10.1-119.el6.x86_64 perl-5.10.1-119.el6.x86_64 How reproducible: 100% Steps to Reproduce: 0. make /usr/local read only 1. yum update/upgrade perl perl-libs 2. see above script session Actual results: perl & perl-libs fail update/upgrade Expected results: no failure Additional info:
Perl package creating /usr/local directories might be a bit questionable but the same issue happens with filesystem package wherever /usr/local and such are nfs-mounted. This is practically the same as bug 594519, and the simple cure which works with all rpm versions is to make rpm aware of the nfs-mount: echo "%_netsharedpath /usr/local" > /etc/rpm/macros.nfs There are other aspects to consider though: - rpm should spot attempt to write to a read-only mount and abort early (this currently only caught for files which would require additional space on the fs) - rpm could ignore the unpack errors on write-mounted but root-squashed fs when the permissions dont change (upstream rpm does this now)
Is the workaround using %_netsharedpath sufficient for SLAC? As Panu mentioned, for a more complete fix we'd need to backport a fix from a newer version of rpm and maybe even extend that a bit more for more exotic which would mean we'd have to target RHEL-6.3 for that. Thanks & regards, Phil
Since RHEL 6.3 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
(In reply to comment #0) > We think the rpm update should not fail because of a non-writable > /usr/local. We believe rpm should be configurable to allow /usr/local to be > a known non-writable space, so the rpm update does not fail. As explained in comments 2-3, there already is such a configuration option (%_netsharedpath) specifically for these kind of setups -> closing NOTABUG.