Bug 821867

Summary: vdsm munges libvirtd sysconfig file
Product: [Fedora] Fedora Reporter: Daniel Berrangé <berrange>
Component: vdsmAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 17CC: danken, danken, dougsland, fsimonce, oschreib, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-28 12:01:45 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:
Bug Depends On:    
Bug Blocks: 822145    

Description Daniel Berrangé 2012-05-15 15:43:18 UTC
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):

Comment 1 Daniel Berrangé 2012-05-16 13:17:07 UTC
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

Comment 2 Dan Kenigsberg 2012-05-17 07:30:51 UTC
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?

Comment 3 Daniel Berrangé 2012-05-17 07:54:04 UTC
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.

Comment 4 Douglas Schilling Landgraf 2012-05-19 19:54:15 UTC
Hi Daniel,

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"


Comment 5 Daniel Berrangé 2012-05-23 10:42:44 UTC
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.

Comment 6 Douglas Schilling Landgraf 2012-05-23 18:12:36 UTC
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.