Bug 821867 - vdsm munges libvirtd sysconfig file
vdsm munges libvirtd sysconfig file
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: vdsm (Show other bugs)
17
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Douglas Schilling Landgraf
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 822145
  Show dependency treegraph
 
Reported: 2012-05-15 11:43 EDT by Daniel Berrange
Modified: 2012-05-28 08:01 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-28 08:01:45 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)

  None (edit)
Description Daniel Berrange 2012-05-15 11:43:18 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

eg,

 # augtool -s -- set  /files/etc/sysconfig/libvirtd/LIBVIRTD_ARGS "--listen"


Version-Release number of selected component (if applicable):
vdsm-4.9.3.2-0.fc17
Comment 1 Daniel Berrange 2012-05-16 09:17:07 EDT
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 03:30:51 EDT
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 Berrange 2012-05-17 03:54:04 EDT
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 15:54:15 EDT
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 
libvirt-daemon-0.9.11.3-1.fc17.x86_64

# rpm -qf /etc/libvirt/qemu.conf 
libvirt-daemon-0.9.11.3-1.fc17.x86_64

# rpm -qf /usr/share/augeas/lenses/libvirtd.aug 
libvirt-daemon-0.9.11.3-1.fc17.x86_64

# rpm -qf /usr/share/augeas/lenses/libvirtd_qemu.aug 
libvirt-daemon-0.9.11.3-1.fc17.x86_64

# rpm -qa | grep libvirt
libvirt-docs-0.9.11.3-1.fc17.x86_64
libvirt-daemon-0.9.11.3-1.fc17.x86_64
libvirt-daemon-config-nwfilter-0.9.11.3-1.fc17.x86_64
libvirt-0.9.11.3-1.fc17.x86_64
libvirt-client-0.9.11.3-1.fc17.x86_64
libvirt-daemon-config-network-0.9.11.3-1.fc17.x86_64
libvirt-python-0.9.11.3-1.fc17.x86_64
libvirt-devel-0.9.11.3-1.fc17.x86_64

# rpm -qa | grep augeas
augeas-libs-0.10.0-3.fc17.x86_64
augeas-0.10.0-3.fc17.x86_64

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
/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"

Thanks!
Comment 5 Daniel Berrange 2012-05-23 06:42:44 EDT
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 14:12:36 EDT
Patch to vdsm:
http://gerrit.ovirt.org/#change,4716

Daniel:

 > 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.

Thanks!

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