Bug 483071 - filesystem upgrade fails with NFS mounts
filesystem upgrade fails with NFS mounts
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Panu Matilainen
BaseOS QE Security Team
: 484212 488229 489718 (view as bug list)
Depends On:
Blocks: 594519
  Show dependency treegraph
Reported: 2009-01-29 10:53 EST by daryl herzmann
Modified: 2011-05-13 07:06 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 594519 (view as bug list)
Last Closed: 2009-09-23 06:01:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 21401 None None None Never

  None (edit)
Description daryl herzmann 2009-01-29 10:53:09 EST
Description of problem:
Attempting to apply the filesystem update for RHEL5.3 will fail when /home and/or /usr/local are NFS mounted.

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

How reproducible:
always when NFS mounts exist

Steps to Reproduce:
1. # yum -y update filesystem

  Running Transaction
  Updating       : filesystem                                        [1/2] 
Error unpacking rpm package filesystem-2.4.0-2.i386
error: unpacking of archive failed on file /home: cpio: chown

Updated: filesystem.i386 0:2.4.0-2

Actual results:

Expected results:
filesystem ignores the error for NFS mounted filesystems.

Comment 1 Phil Knirsch 2009-02-03 10:56:34 EST
Are those /usr/local and/or /home mounted read-only and/or without no_root_squash?

If they are that explains it as rpm will try and update the directory entries during an update of the filesystem component (see the chown error for /home where rpm tries to change the owner of /home).

This problem can be worked around by either unmounting both directories prior to an update or by exporting them with the no_root_squash during the time of the update.

Generally though this is something that needs to be fixed in rpm, so i'm reassigning this bug to the rpm component.

Thanks & regards, Phil
Comment 2 daryl herzmann 2009-02-03 11:39:54 EST

Thanks for the response and the work arounds are easy enough.  I still think there is a bug here somewhere :)

1. Eventhough the filesystem rpm install fails,
2. yum will still report an update success
3. yum then updates RHN noting that the filesystem rpm was installed, when
   it actually wasn't...

Comment 3 Phil Knirsch 2009-02-11 08:14:14 EST
*** Bug 484212 has been marked as a duplicate of this bug. ***
Comment 4 adam winberg 2009-02-11 08:23:05 EST
i would not say those workarounds are satisfactory in a large production environment with strict security policies. I think i will wait for an update of the rpm wich resolves this instead, hope to see it soon.
Comment 5 Panu Matilainen 2009-02-11 09:11:14 EST
To have rpm semi-reasonably deal with NFS-mounts on rpm "owned" paths, you need to tell rpm about them. This'll tell rpm to avoid touching /home and /usr/local:

# echo "%_netsharedpath /home:/usr/local" > /etc/rpm/macros.nfs

That yum reports success on clearly failed packages is a yum bug (recently been addressed at yum upstream to some extent at least)
Comment 6 daryl herzmann 2009-02-11 12:21:16 EST
Thanks Panu!  I learn something everything day :)

Should this be refiled to the yum component then?

Comment 7 Phil Knirsch 2009-03-03 08:37:30 EST
*** Bug 488229 has been marked as a duplicate of this bug. ***
Comment 8 Kyle Prescott 2009-04-03 18:13:30 EDT
This bug will also occur if the immutable flag is set on the root (/) directory.
Comment 9 Panu Matilainen 2009-04-07 11:27:54 EDT
*** Bug 489718 has been marked as a duplicate of this bug. ***
Comment 10 R P Herrold 2009-04-29 12:03:17 EDT
This problem continues in RawHide presently 

  Updating       : filesystem                                             2/583
Error unpacking rpm package filesystem-2.4.21-1.fc11.i586
error: unpacking of archive failed on file /home: cpio: chown

with a fstab thus:
nfs.first.lan:/home  /home  nfs  rsize=8192,wsize=8192,timeo=14,intr    0 0
xps400.first.lan:/var/ftp/pub/mirror /mnt/nfs/var/ftp/pub/mirror nfs \
   ro,rsize=8192,wsize=8192,timeo=14,intr     0 0

and an export:

[herrold@nfs ~]$ cat /etc/exports
#       then: /usr/sbin/exportfs -ra
/home                   *.first.lan(rw)
[herrold@nfs ~]$

so the stock root_squash is (intentionally) in play at the remote NFS server

-- Russ Herrold
Comment 12 systems 2009-07-23 12:04:32 EDT
I'm getting this bug on a Cell blade (QS22) running the PPC version for RHEL 5.

$ sudo yum -y update
Loaded plugins: rhnplugin, security
CellSDK-Open-RHEL-cbea                                   | 1.1 kB     00:00     
CellSDK-Extras-RHEL-cbea                                 | 1.1 kB     00:00     
CellSDK-Devel-RHEL-cbea                                  | 1.1 kB     00:00     
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package filesystem.ppc 0:2.4.0-2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package            Arch        Version         Repository                 Size
 filesystem         ppc         2.4.0-2         rhel-ppc-server-5         116 k

Transaction Summary
Install      0 Package(s)         
Update       1 Package(s)         
Remove       0 Package(s)         

Total download size: 116 k
Downloading Packages:
filesystem-2.4.0-2.ppc.rpm                               | 116 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : filesystem                                        [1/2] 
Error unpacking rpm package filesystem-2.4.0-2.ppc
error: unpacking of archive failed on file /home: cpio: chown
There was an error communicating with RHN.
Package profile information could not be sent.
Error communicating with server. The message was:

Error Message:
    Unknown package arch found
Error Class Code: 45
Error Class Info: 
     Invalid architecture.

     The architecture of the package is not supported by Red Hat Network
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Updated: filesystem.ppc 0:2.4.0-2
Comment 14 Florian Festi 2009-09-23 06:01:14 EDT
Basically the error message give here is right. Solution is setting netsharedpath to keep rpm out of the mount points.

Of course it would be nicer if rpm could detect such situations before starting the transaction and error out. Adding such check to rpm is out of the scope of a RHEL update release and will be done upstream.
Comment 15 R P Herrold 2010-05-20 18:00:25 EDT
This is Closed/Deferred but still not solved -- I see similarly #484212 #526368 but the issue is still present in RHEL 5 (.5 update)

-- Russ herrold
Comment 16 Niels de Vos 2011-05-13 07:06:44 EDT
This issue has been documented in the Red Hat Knowledge Base:
- https://access.redhat.com/kb/docs/DOC-52785

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