View Issue Details

IDProjectCategoryView StatusLast Update
0010301CentOS-7yumpublic2019-02-12 21:06
Status newResolutionopen 
Product Version7.1-1503 
Target VersionFixed in Version 
Summary0010301: yum makes a wrong check of space available on /opt, when /opt is automounted; should not depend on /opt/rh
DescriptionStarting point: fresh install of 7.1-1503, plus configuration to make the machine an NFS client. Machine configured so that `/opt` is automounted, and `/opt/rh` does not exist on the NFS-mounted device..

A `yum update` fails with the error

    Transaction check error:
      installing package scl-utils-20130529-17.el7_1.x86_64 needs 4KB on the /opt filesystem

I then added `rh` to the `opt` mount map so that `/opt/rh` mounted a writable directory from localhost, and verified that `/opt/rh` then existed and was writable (`# echo foo >/opt/rh/stamp.txt`). `yum update` again failed, with the same error.

I note that the system reports `/opt` as having zero size available:

    # df /opt
    Filesystem 1K-blocks Used Available Use% Mounted on
    auto.opt 0 0 0 - /opt

I speculate therefore that at some point when checking the presence of, and space available under, `/opt/rh`, yum checks the space available on `/opt` (or something equivalent to this), and therefore erroneously gets a wrong size, causing it to fail.

I then set `diskspacecheck=0` in `yum.conf`, and the update proceeded without error, incidentally leaving `/opt/rh` empty apart from the above stamp file (ie, nothing was being installed there).


  * bug: when `/opt` is automouted, yum fails to detect that `/opt/rh` exists and is writable

  * enhancement: yum should not, I think, demand that `/opt/rh` exists, in the case where it is not going to install anything there. That is, given that I do not plan to install any Software Collections on a client machine, I should be able to mount `/opt` read-only, without `/opt/rh`. (I'm happy to make this a separate enhancement request if you feel that would be neater).
Steps To ReproduceSee above. I've selected reproducibility 'N/A' since it seems clear that it's `/opt` being automounted that is the key feature.
Additional Information1. It would be desirable to be able to choose to relocate `/opt` at installation time (as opposed to when one is constructing the metapackage), but I appreciate this may be infeasible, and so I have not included this as an enhancement request.

2. The notes at <> remark that 'This enables you to mount the /opt file system hierarchy over NFS as read-only', so that this is at least intended as a supported configuration (though I can see that might be approaching the problem from the slightly different point of view of doing the yum install to /opt on the NFS server).

3. The FHS description at <> is not particularly clear, but the remark 'Package files that are variable (change in normal operation) must be installed in /var/opt.' seems to imply that /opt is mountable read-only. The FHS doesn't say anything about NFS in the context of /opt The remark 'Distributions may install and otherwise manage software in /opt under an appropriately registered subdirectory' does not, I think, imply that /opt should be writable other than when deliberately installing things in /opt.
TagsNo tags attached.




2017-09-21 21:05

reporter   ~0030167

Same problem here, for the same reasons.

The workaround (setting "diskspacecheck=0" in yum.conf) cripples a nice safeguard in yum.


2019-02-12 19:08

reporter   ~0033816

This is still true in 7.5.1804


2019-02-12 19:12

manager   ~0033817

Which is still not current. 7.6.1810 is current.

And since it doesn't seem to be mentioned anywhere in this ticket, CentOS is a rebuild of RHEL with only modifications to remove trademarks and branding. To get any bugs fixed they need to be reported on Once Redhat fix it for RHEL and release the package, CentOS will rebuild it.


2019-02-12 21:06

reporter   ~0033820

Ah, right -- I wasn't sure how that worked.

Duly reported there:

Issue History

Date Modified Username Field Change
2016-02-02 12:45 nxg New Issue
2017-09-21 21:05 gparmer Note Added: 0030167
2019-02-12 19:08 nxg Note Added: 0033816
2019-02-12 19:12 TrevorH Note Added: 0033817
2019-02-12 21:06 nxg Note Added: 0033820