Red Hat Bugzilla – Bug 821867
vdsm munges libvirtd sysconfig file
Last modified: 2012-05-28 08:01:45 EDT
Description of problem:
I noticed the following process listing:
root 907 0.0 0.3 459996 13556 ? Ssl 09:05 0:00 /usr/sbin/libvirtd --listen # by vdsm
It turns out that this is caused by the following addition VDSM makes to /etc/sysconfig/libvirtd
LIBVIRTD_ARGS=--listen # by vdsm
DAEMON_COREFILE_LIMIT=unlimited # by vdsm
The comments will only work if applied on a separate line. In addition, rather than appending the value, it ought to use augtool to simply set the value, which would guarantee correct syntax
# augtool -s -- set /files/etc/sysconfig/libvirtd/LIBVIRTD_ARGS "--listen"
Version-Release number of selected component (if applicable):
BTW, if you go down the route of using augeas to update this file, I'd also recommend using augeas to update /etc/libvirt/qemu.conf and /etc/libvirt/libvirtd.conf
Daniel, vdsm would like to clean after itself when it is removed. That's easy with `sed d//` and even easier with `grep -v #byvdsm`. How would you suggest to do this with augtool?
Personally I wouldn't bother with cleaning up config file changes after uninstall of VDSM. If the admin wishes to reconfigure use of libvirt to avoid VDSM they'll know what they want to do.
I have tried augeas. However, looks like I have found a problem in augeas reading the current libvirt.aug and qemu.aug. Which updated files are you referring from comment #1 ?
# rpm -qf /etc/libvirt/libvirtd.conf
# rpm -qf /etc/libvirt/qemu.conf
# rpm -qf /usr/share/augeas/lenses/libvirtd.aug
# rpm -qf /usr/share/augeas/lenses/libvirtd_qemu.aug
# rpm -qa | grep libvirt
# rpm -qa | grep augeas
augtool> ls /files/etc/libvirt/
lxc.conf/ = (none)
augtool> print /augeas/files/etc/libvirt/libvirtd.conf/error/
/augeas/files/etc/libvirt/libvirtd.conf/error = "parse_failed"
/augeas/files/etc/libvirt/libvirtd.conf/error/pos = "12788"
/augeas/files/etc/libvirt/libvirtd.conf/error/line = "394"
/augeas/files/etc/libvirt/libvirtd.conf/error/char = "0"
/augeas/files/etc/libvirt/libvirtd.conf/error/lens = "/usr/share/augeas/lenses/libvirtd.aug:88.13-.43:"
/augeas/files/etc/libvirt/libvirtd.conf/error/message = "Iterated lens matched less than it should
augtool> print /augeas/files/etc/libvirt/qemu.conf/
/augeas/files/etc/libvirt/qemu.conf/path = "/files/etc/libvirt/qemu.conf"
/augeas/files/etc/libvirt/qemu.conf/mtime = "1336165311"
/augeas/files/etc/libvirt/qemu.conf/lens = "@Libvirtd_qemu"
/augeas/files/etc/libvirt/qemu.conf/lens/info = "/usr/share/augeas/lenses/libvirtd_qemu.aug:68.13-.43:"
/augeas/files/etc/libvirt/qemu.conf/error = "parse_failed"
/augeas/files/etc/libvirt/qemu.conf/error/pos = "12982"
/augeas/files/etc/libvirt/qemu.conf/error/line = "354"
/augeas/files/etc/libvirt/qemu.conf/error/char = "0"
/augeas/files/etc/libvirt/qemu.conf/error/lens = "/usr/share/augeas/lenses/libvirtd_qemu.aug:68.13-.43:"
/augeas/files/etc/libvirt/qemu.conf/error/message = "Iterated lens matched less than it should"
Hmm, damn. That loooks like a flaw in the libvirt augeas lens. Can you file a bug against libvirt providing a copy of the libvirtd.conf and qemu.conf files that illustrate this flaw.
Patch to vdsm:
> Can you file a bug against libvirt providing a copy of the libvirtd.conf
> and qemu.conf files that illustrate this flaw.
Sure. First, I will double check if it's not caused by vdsm changes.