Bug 538674

Summary: filesystem rpm install fails if readonly /mnt exists
Product: Red Hat Enterprise Linux 5 Reporter: Subhendu Ghosh <sghosh>
Component: filesystemAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: ghelleks
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-19 06:28:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Subhendu Ghosh 2009-11-19 03:05:42 UTC
Description of problem:
updating filesystem via yum fails if /mnt is used as a readonly mount

Version-Release number of selected component (if applicable):
 filesystem.x86_64 0:2.4.0-3.el5 

How reproducible:
everytime


Steps to Reproduce:
1. mount -o ro somefs /mnt
2. yum update filesystem
3. 
  
Actual results:

Downloading Packages:
filesystem-2.4.0-3.el5.x86_64.rpm                      | 1.0 MB     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-3.el5.x86_64
error: unpacking of archive failed on file /mnt: cpio: lsetfilecon

Failed:
  filesystem.x86_64 0:2.4.0-3.el5    



Expected results:

Downloading Packages:
filesystem-2.4.0-3.el5.x86_64.rpm                                                                                      | 1.0 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : filesystem                                         1/2 
  Cleanup        : filesystem                                         2/2 

Updated:
  filesystem.x86_64 0:2.4.0-3.el5  

Additional info:

Comment 1 Ondrej Vasik 2009-11-19 06:28:49 UTC
Thanks for report, but "/mnt" is directory for mounts and not the directory, where you should directly mount. I already had discussion with rpm guy - Jindrich Novy - about similar issue - see https://bugzilla.redhat.com/show_bug.cgi?id=526368 for details.

It is expected that rpm update should fail when one or more of the package
files/dirs are not installed due to read only target filesystem. Any other
behaviour could lead to incomplete package update, imagine package update on
filesystem with read only /usr. Maybe error from rpm could be more
comprehensive to allow user better address the issue. But this could be only
suggested as RFE for rpm. Feel free to make a suggestion there.

Closing NOTABUG.