Bug 1084876

Summary: RFE: rename /etc/sysctl.d/libvirtd to something starts with numbers
Product: Red Hat Enterprise Linux 7 Reporter: Satoru SATOH <ssato>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dyuan, jdenemar, lmiksik, mzhan, rbalakri, ydu, zhwang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.15-1.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 05:45:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Satoru SATOH 2014-04-07 05:56:45 UTC
Description of problem:

It seems that there is an informal convention that config files under .d/
starts with  numbers (e.g. /usr/lib/sysctl.d/00-system.conf) to control 
the order to load and apply these config files.

Add to this, if users want to override default configurations
libvirt (/etc/sysctl.d/libvirtd) provides, user must arrange 
config file with its name starting from [m-z], ex. zz-local.conf, 
to make it loaded and applied after /etc/sysctl.d/libvirtd.

To rename /etc/sysctl.d/libvirtd to something starts with
numbers like 60-libvirtd.conf fixes this.

Version-Release number of selected component (if applicable):
I confirmed this with the libvirt RPM in RHEL 6.5 and the latest
libvirt-daemon RPM in Fedora 20 (libvirt-daemon-1.1.3.4-3.fc20.x86_64).


Additional info:

This should also applicable to the latest Fedora and RHEL7 beta.

And the number in filenames may be around 10 ~ 60, I guess,
as I've got this result in F20:

ssato@localhost% ls /usr/lib/sysctl.d/*
/usr/lib/sysctl.d/00-system.conf
/usr/lib/sysctl.d/50-default.conf
/usr/lib/sysctl.d/libvirtd.conf
ssato@localhost%

Comment 2 Jiri Denemark 2014-04-07 08:53:44 UTC
Hmm, being consistent would be nice but creating zz-local.conf is not any harder than 99-local.conf. And given that RHEL-6 stores this file in /etc/sysctl.d rather than /usr/lib/sysctl.d, I feel like it's probably more important to keep the name as is for RHEL-6. Let's move this bug to RHEL-7.

Comment 4 Jiri Denemark 2015-04-15 11:15:34 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-April/msg00667.html

Comment 5 Jiri Denemark 2015-04-16 13:22:05 UTC
Pushed upstream as v1.2.14-199-g0c68ec7:

commit 0c68ec7d78952028282cfc39dad76af00b457801
Author: Jiri Denemark <jdenemar>
Date:   Wed Apr 15 11:49:22 2015 +0200

    daemon: Prefix sysctl configuration filename with a number
    
    Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers
    for easier ordering. Let's be consistent with this. I chose 60 for
    libvirtd so that it goes after 50-default.conf.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1084876
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 7 vivian zhang 2015-07-15 02:26:43 UTC
I can produce this bug with build libvirt-1.2.14-1.el7.x86_64

# pwd
/usr/lib/sysctl.d
# ll
total 12
-rw-r--r--. 1 root root  466 Jan 15 17:17 00-system.conf
-rw-r--r--. 1 root root 1297 May 19 03:16 50-default.conf
-rw-r--r--. 1 root root  499 Apr  2 16:53 libvirtd.conf


verify this with build libvirt-1.2.17-1.el7.x86_64

# pwd
/usr/lib/sysctl.d
# ll
total 12
-rw-r--r--. 1 root root  466 Jan 15 17:17 00-system.conf
-rw-r--r--. 1 root root 1297 Jun 30 21:27 50-default.conf
-rw-r--r--. 1 root root  499 Jul  2 15:40 60-libvirtd.conf

libvirtd.conf has been changed to start with number like 60-libvirtd.conf, so move to verified

Comment 9 errata-xmlrpc 2015-11-19 05:45:43 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-2015-2202.html