Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1432319 - [RFE] Configuration option so that normal users can use the root yum cache in "/var/cache/yum"
[RFE] Configuration option so that normal users can use the root yum cache in...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: 7.4
Assigned To: Michal Domonkos
Eva Mrakova
Lucie Maňásková
: FutureFeature
: 1500666 (view as bug list)
Depends On:
Blocks: 1420851 1465896 1466368
  Show dependency treegraph
 
Reported: 2017-03-15 02:19 EDT by Supreet
Modified: 2018-04-10 11:07 EDT (History)
6 users (show)

See Also:
Fixed In Version: yum-3.4.3-156.el7
Doc Type: Release Note
Doc Text:
*yum* can disable creation of per-user cache as a non-root user New "usercache" option has been added to the `yum.conf(5)` configuration file of the *yum* utility. It allows the users to disable the creation of per-user cache when *yum* runs as a non-root user. The reason for this change is that in some cases users do not want to create and populate per-user cache, for example in cases where the space in the `$TMPDIR` directory is consumed by the user cache data.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 11:05:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 Product Errata RHBA-2018:0845 None None None 2018-04-10 11:07 EDT

  None (edit)
Description Supreet 2017-03-15 02:19:05 EDT
Description of problem:

The issue is where my /var/tmp partition gets filled up by users running yum search/list/whatever. 
Every user running yum get his own complete cache instead of using the system wide cache.It seems there is no configuration fix for this problem. This behavior leads to yum being unusable if /var/tmp is full.

So enhancement request is to have a configuration option so that all users use the root yum cache in /var/cache/yum

As a workaround is to discourage users from running yum with users other than root.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.3 (Maipo)
# rpm -qa|grep yum
yum-plugin-priorities-1.1.31-40.el7.noarch
yum-plugin-versionlock-1.1.31-40.el7.noarch
yum-utils-1.1.31-40.el7.noarch
yum-3.4.3-150.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-rhn-plugin-2.0.1-6.el7.noarch

Actual results:
yum being unusable if /var/tmp is full.

Expected results:
Shouldn't be full

Additional info:
Have a configuration option so that all users use the root yum cache in /var/cache/yum
Comment 6 Karel Srot 2017-07-18 03:19:18 EDT
If we introduce an option to enforce the usage of root's cache for regular users,
would regular users be able to force the metadata download (again) e.g. via --setopt ? IMHO it would be reasonable.
Comment 7 Michal Domonkos 2017-07-18 09:26:26 EDT
(In reply to Karel Srot from comment #6)
> If we introduce an option to enforce the usage of root's cache for regular
> users,
> would regular users be able to force the metadata download (again) e.g. via
> --setopt ? IMHO it would be reasonable.

Good point, I think that's a good reason to make this a config option rather than a cmdline option so that users can override it with --setopt if they wish.  The default will probably stay the same (i.e. preload enabled), so they will be able to enable it again.
Comment 8 Klaas Demter 2017-07-19 03:48:36 EDT
Hi,
I have a question about the proposed possibility to allow a user to force metadata download. Do you want a user to be able to refresh the "global" cache in /var/cache/yum? That shouldn't be possible in yums current form because its not setuid and the cache is not writeable for other users than root.

Or do you simply want to enable them to override the "use root cache" option and fall back to the current behaviour of creating a user owned cache?

Greetings
Klaas
Comment 9 Michal Domonkos 2017-07-19 06:24:49 EDT
(In reply to Klaas Demter from comment #8)
> Hi,
> I have a question about the proposed possibility to allow a user to force
> metadata download. Do you want a user to be able to refresh the "global"
> cache in /var/cache/yum? That shouldn't be possible in yums current form
> because its not setuid and the cache is not writeable for other users than
> root.

Yup, that's correct, see below.

> 
> Or do you simply want to enable them to override the "use root cache" option
> and fall back to the current behaviour of creating a user owned cache?
> 
> Greetings
> Klaas

This.

I imagine the semantics of the new option to be something like "don't preload anything, just use the root cache directly", of which the opposite (and the default) is "preload stuff from the root cache to the user cache".

I'll have to think about it more deeply once I'm at it, though, but it probably will be done along these lines.
Comment 15 Michal Domonkos 2017-10-31 13:22:15 EDT
*** Bug 1500666 has been marked as a duplicate of this bug. ***
Comment 23 errata-xmlrpc 2018-04-10 11:05:56 EDT
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://access.redhat.com/errata/RHBA-2018:0845

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