<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 3, 2016 at 4:28 PM, Martin Polednik <span dir="ltr">&lt;<a href="mailto:mpolednik@redhat.com" target="_blank">mpolednik@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello developers!<br>
<br>
I&#39;ve been chasing a bug that lead me to an idea of improving our XML<br>
logging. Now, to see a VMs generated libvirt XML, we have to rely on<br>
vdsm.log. The issue is that the log is rotating and therefore, it is<br>
easy to miss the correct XML when dealing with busy hypervisor.<br>
<br>
Since we&#39;re built on libvirt, I was thinking of doing similar thinks<br>
that libvirt does with qemu commandline. Each running domain(VM) has<br>
it&#39;s command line logged in /var/log/libvirt/qemu/${vmname}. This is<br>
great for debugging as you can mostly just take the cmdline and<br>
restart the VM.<br>
<br>
There is an issue with using the cmdline directly - networking.<br>
Libvirt uses additional script to create and up a bridge. Therefore,<br>
it is easier to use the XML and shape it to one&#39;s needs.<br>
<br>
I propose that we properly log the generated XML in a similar fashion<br>
as libvirt generates the cmdline. This means we would have path like<br>
/var/log/vdsm/libvirt/${vmname}, where generated XML would be stored.<br>
To minimize the logging requirements, only last definition of VM with<br>
that name may be stored. Additionally, exception level errors<br>
related to that VM could also be stored there.<br></blockquote><div><br></div><div>Without history, it will much less useful, so I think we should keep this in vdsm log.</div><div><br></div><div>How about creating separate log for virt?</div><div><br></div><div>We talked about separating the application to several parts, so we can start by</div><div>having separate logs. In /var/log/vdsm/virt.log (or /var/log/vdsm/vms.log) you</div><div>will see calls to the storage layer (service in the future), but you will not see all </div><div>the noise that storage generates (e.g. resourseManager crap).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What do you think, can we afford the space and additional writes per<br>
VM to help the debugging process?<br></blockquote><div><br></div><div>We can, but the default log level should not show stuff like full xml dumps.</div><div><br></div><div>Nir</div></div></div></div>