Bug 483071 - filesystem upgrade fails with NFS mounts
Summary: filesystem upgrade fails with NFS mounts
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
: 484212 488229 489718 (view as bug list)
Depends On:
Blocks: 594519
TreeView+ depends on / blocked
 
Reported: 2009-01-29 15:53 UTC by daryl herzmann
Modified: 2018-11-14 12:35 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 594519 (view as bug list)
Environment:
Last Closed: 2009-09-23 10:01:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 21401 0 None None None Never

Description daryl herzmann 2009-01-29 15:53:09 UTC
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):
filesystem-2.4.0-2

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
Complete!

Actual results:


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

thanks!
 daryl

Comment 1 Phil Knirsch 2009-02-03 15:56:34 UTC
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 16:39:54 UTC
Hi,

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...

thanks!
  daryl

Comment 3 Phil Knirsch 2009-02-11 13:14:14 UTC
*** Bug 484212 has been marked as a duplicate of this bug. ***

Comment 4 adam winberg 2009-02-11 13:23:05 UTC
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 14:11:14 UTC
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 17:21:16 UTC
Thanks Panu!  I learn something everything day :)

Should this be refiled to the yum component then?

thanks!
  daryl

Comment 7 Phil Knirsch 2009-03-03 13:37:30 UTC
*** Bug 488229 has been marked as a duplicate of this bug. ***

Comment 8 Kyle Prescott 2009-04-03 22:13:30 UTC
This bug will also occur if the immutable flag is set on the root (/) directory.

Comment 9 Panu Matilainen 2009-04-07 15:27:54 UTC
*** Bug 489718 has been marked as a duplicate of this bug. ***

Comment 10 R P Herrold 2009-04-29 16:03:17 UTC
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 16:04:32 UTC
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
================================================================================
Updating:
 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
Explanation: 
     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
Complete!

Comment 14 Florian Festi 2009-09-23 10:01:14 UTC
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 22:00:25 UTC
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 11:06:44 UTC
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.