Re: [PATCH v2] libxl: define a per-domain logger.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/06/2017 01:04 AM, Cedric Bosdonnat wrote:
On Thu, 2017-01-05 at 15:45 -0700, Jim Fehlig wrote:
Cédric Bosdonnat wrote:
libxl doesn't provide a way to write one log for each domain. Thus
we need to demux the messages. If our logger doesn't know to which
domain to attribute a message, then it will write it to the default
log file.

Starting with Xen 4.9 (commit f9858025 and following), libxl will
write the domain ID in an easy to grab manner. The logger introduced
by this commit will use it to demux the libxl log messages.

One thing I noticed when testing this on a Xen installation prior to that commit
is log files are created that will never be written to. E.g. after starting
libvirtd and one domain

# ll /var/log/libvirt/libxl/
-rw-r--r-- 1 root root     0 Jan  5 15:48 Domain-0.log
-rw-r--r-- 1 root root 17512 Jan  5 15:49 libxl-driver.log
-rw-r--r-- 1 root root     0 Jan  5 15:49 sles12sp2-hvm.log

IMO these empty, never-to-be-written-to log files might be a bit confusing to
users. AFAIK there is no way to detect up front that the underlying Xen supports
this capability right?

No there is no way to know it since there is no public API change
in libxl. The only thing we can do is delaying the creation of the file
to the first message write.

I think that is a wise thing to do, otherwise I envision bug reports such as "my domain log files are 0 bytes" :-).

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux