Nir Soffer has posted comments on this change.

Change subject: vdsm.conf: Add drop-in dir
......................................................................


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/48317/7//COMMIT_MSG
Commit Message:

Line 35: - /etc/vdsm/vdsm.conf
Line 36: - /etc/vdsm/vdsm.conf.d/
Line 37: 
Line 38: Files with a .conf suffix can be placed into any of the
Line 39: vdsm.conf.d drop-in directories.
> I agree that having installing our defaults in /usr/lib and leaving /etc fo
Looking how others are using drop-in directories for configuration, I think we 
should adopt the systemd way, which is little simpler than what you suggest.
http://www.freedesktop.org/software/systemd/man/journald.conf.html

- /etc/vdsm/vdsm.conf - for user configuration. We install this file if 
missing, and never touch this file during upgrade. (not sure if we should 
install vdsm.conf.rpmnew). No change comparing with current behavior (good for 
backward compatibility)

- /etc/vdsm/vdsm.conf.d/ - for admin drop-in conf files. We created this 
directory during installation, but we never touch the contents.

- /usr/lib/vdsm/vdsm.conf.d/ - for vendor drop-in configuration files. We 
create it during installation, but never touch the contents.

- /var/run/vdsm/vdsm.conf.d/ - for admin temporary configuration, valid until 
the next reboot. We create this directory on startup, but never touch the 
contents.

Reading configs:

- read /etc/vdsm/vdsm.conf
- find all drop-in files in all drop-in directories
- sorted all drop-in files by base name
- read sorted drop-in files

Example implementation:

    config.read("/etc/vdsm/vdsm.conf")

    dropins = []
    for basedir in ["/usr/lib"', "/run", "/etc"]:
        pattern = os.path.join(basedir, "vdsm", "vdsm.conf.d", "*.conf")
        dropins.extend(glob.glob(pattern))
     
    dropins.sort(key=os.path.basename)
    config.read(dropins)

Fabian, what do you think?
Line 40: 
Line 41: Change-Id: I707a1865e8d60dc4dcdc0e681b52c07c75f1c409
Line 42: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1279555


-- 
To view, visit https://gerrit.ovirt.org/48317
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I707a1865e8d60dc4dcdc0e681b52c07c75f1c409
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Simone Tiraboschi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to