Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create an LXC domain and start it
2. virsh -c lxc:/// dominfo <thatdomain>
3. view system journal/logs
The above call results in the useless "error" log "this function is not supported by the connection driver: virDomainHasManagedSaveImage"
No log entry should be generated at all, if at all, this should have a severity of debug
When managing containers with crm (ocf:heartbeat:VirtualDomain), every time the resource is monitored, the journal is spammed with the above useless message as the monitor operation will run virsh dominfo. This results in one such message per affected domain every 30 seconds.
I have the same problem when running LXC container in cluster as resource.
Libvirt version: libvirt-1.2.8-11.el7.x86_64
It spams log file every 3-5 seconds, so the file size grows quickly.
The cluster software really should not use virsh to monitor the VMs in this way. It should use the libvirt API directly, which is available in every common programming language. Not only would this avoid calling functions that are not required & so avoid this error message, but it would be much more efficient too.
Agreed. But then VirtualDomain, like ca. 99% of the Linux HA resource agents, is in fact just a shell script making virsh its natural interace to libvirtd.
changing product to RHEL so that we can track it better. As I understand it it's RHEL 7 issue.
There are two possible ways of fixing this... First, the resource agent should be rewritten to python or perl and use libvirt API directly. Second, virDomainHasManagedSaveImage could be trivially implemented for LXC.
we would definitely prefer the second option :)
Upstream patch implementing the second option:
Author: Ján Tomko <firstname.lastname@example.org>
CommitDate: 2015-02-06 12:52:50 +0100
Trivially support DomainHasManagedSaveImage
Return 0 instead of ERR_NO_SUPPORT in each driver
where we don't support managed save or -1 if
the domain does not exist.
This avoids spamming daemon logs when 'virsh dominfo' is run.
git describe: v1.2.12-82-g481881f
Verified on libvirt-1.2.15-1.el7.x86_64
1. define/start a lxc
# virsh -c lxc:/// define lxc.xml
# virsh -c lxc:/// start helloworld
# cat lxc.xml
<vcpu placement='static' cpuset='1-3'>2</vcpu>
<filesystem type='mount' accessmode='passthrough'>
<target type='lxc' port='0'/>
<seclabel type='dynamic' model='selinux' relabel='yes'/>
2. # virsh -c lxc:/// dominfo helloworld
OS Type: exe
CPU time: 0.0s
Max memory: 102400 KiB
Used memory: 564 KiB
Managed save: no
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_lxc_net_t:s0:c822,c883 (enforcing)
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.