RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1142386 - if /usr filesystem is RO, yum erase is successful
Summary: if /usr filesystem is RO, yum erase is successful
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: Stefan Dordevic
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-16 16:49 UTC by Sal Castiglione
Modified: 2016-05-11 00:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-11 00:53:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0936 0 normal SHIPPED_LIVE rpm bug fix and enhancement update 2016-05-10 22:54:44 UTC

Description Sal Castiglione 2014-09-16 16:49:43 UTC
Description of problem:

We typically mount /usr as ReadOnly (RO) - if that is the case, doing a "yum erase" will return a successful operation, even though files located in /usr were not removed.

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

How reproducible:
Always

Steps to Reproduce:
1. mount -o ro,remount /usr
2. yum erase packagename
3. 

Actual results:
Failure

Expected results:
Success ?

Additional info:
Additionally, if attempting to install while /usr is mounted RO, there is a failure but that indicates lack of disk space - perhaps that could be modified to indicate the filesystem not being mounted as RW ?

Example:

[root@rhel-adtest2 ~]# mount
/dev/mapper/vg_rhel65templat-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_rhel65templat-lv_home on /home type ext4 (rw,nosuid,nodev)
/dev/mapper/vg_rhel65templat-lv_opt on /opt type ext4 (rw,nosuid,nodev)
/dev/mapper/vg_rhel65templat-lv_tmp on /tmp type ext4 (rw)
/dev/mapper/vg_rhel65templat-lv_usr on /usr type ext4 (ro)
/dev/mapper/vg_rhel65templat-lv_var on /var type ext4 (rw,nosuid,nodev)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@rhel-adtest2 ~]# which mtr
/usr/sbin/mtr
[root@rhel-adtest2 ~]# rm /usr/sbin/mtr
rm: remove regular file `/usr/sbin/mtr'? y
rm: cannot remove `/usr/sbin/mtr': Read-only file system
[root@rhel-adtest2 ~]# yum erase mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mtr.x86_64 2:0.75-5.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================
 Package            Arch                  Version                       Repository                                                              Size
=====================================================================================================================================================
Removing:
 mtr                x86_64                2:0.75-5.el6                  @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5                 96 k

Transaction Summary
=====================================================================================================================================================
Remove        1 Package(s)

Installed size: 96 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : 2:mtr-0.75-5.el6.x86_64                                                                                                           1/1
epel/metalink                                                                                                                 |  16 kB     00:00
epel                                                                                                                          | 4.4 kB     00:00
epel/primary_db                                                                                                               | 6.3 MB     00:09
rhel-6-server-beta-rpms                                                                                                       | 3.4 kB     00:00
rhel-6-server-rpms                                                                                                            | 3.7 kB     00:00
rhel-6-server-rpms/primary_db                                                                                                 |  28 MB     00:05
rhel-6-server-rpms/productid                                                                                                  | 1.7 kB     00:00
rhel-server-dts-6-rpms                                                                                                        | 2.9 kB     00:00
rhel-server-dts2-6-rpms                                                                                                       | 2.9 kB     00:00
  Verifying  : 2:mtr-0.75-5.el6.x86_64                                                                                                           1/1

Removed:
  mtr.x86_64 2:0.75-5.el6

Complete!
[root@rhel-adtest2 ~]# which mtr
/usr/sbin/mtr
[root@rhel-adtest2 ~]# yum erase mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Remove Process
No Match for argument: mtr
Package(s) mtr available, but not installed.
No Packages marked for removal
[root@rhel-adtest2 ~]# yum install mtr
Loaded plugins: product-id, security, subscription-manager, verify
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mtr.x86_64 2:0.75-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================
 Package                    Arch                          Version                               Repository                                      Size
=====================================================================================================================================================
Installing:
 mtr                        x86_64                        2:0.75-5.el6                          rhel-6-server-beta-rpms                         54 k

Transaction Summary
=====================================================================================================================================================
Install       1 Package(s)

Total download size: 54 k
Installed size: 96 k
Is this ok [y/N]: y
Downloading Packages:
mtr-0.75-5.el6.x86_64.rpm                                                                                                     |  54 kB     00:00
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  installing package mtr-2:0.75-5.el6.x86_64 needs 120KB on the /usr filesystem

Error Summary
-------------

[root@rhel-adtest2 ~]#

Comment 2 Valentina Mukhamedzhanova 2014-12-05 10:04:03 UTC
I believe this should be fixed in rpm.

Comment 3 Ľuboš Kardoš 2016-01-12 08:59:47 UTC
Devel ack for adding a warning that was impossible to remove some file but not for failing whole transaction. This is how upstream rpm and rhel-7 rpm behaves.

Comment 7 Karel Srot 2016-01-28 14:43:30 UTC
Hi Lubos,
the reporter was also asking if the failed attempt to install package on a RO filesystem could be reported more accurately. Are you going to address also this issue?

Comment 8 Ľuboš Kardoš 2016-01-29 14:33:46 UTC
I modified that message in the following way (rpm-4.8.0-50.el6):

  installing package ... needs ...KB of free writable space on the ... filesystem

Comment 9 Karel Srot 2016-01-29 19:33:30 UTC
Hi Lubos,
I am sorry that with my previous question I could made an impression that you really need to do a respin.

Unfortunately, I am afraid we cannot do the change you did. I am not sure if such a change won't be considered as a regression. Some custom scripts could be already parsing rpm output, moreover yum does that too. 
Previously we have been addressing yum bugs 1212514 resp. 1051931 where yum is parsing rpm error message and I have just verified that the new rpm build breaks that yum functionality. We would have to update yum too but I guess that it would be better to revert this change.

If we even decide to address also the fs read only case I would rather propose to print an additional message (e.g. filesystem is mounted as read only), not to change the existing one.

Comment 10 Ľuboš Kardoš 2016-02-01 09:26:24 UTC
The change of error message was reverted in rpm-4.8.0-51.el6 because it caused regression.

Comment 14 errata-xmlrpc 2016-05-11 00:53:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0936.html


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