|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] PATCH: Use name instead of pid in QEMU logs
On Fri, Jun 01, 2007 at 01:55:30AM +0100, Daniel P. Berrange wrote:
> The attached patch changes the logfile name generated by qemu-dm to use the
> pattern qemu-dm-[NAME].log instead of qemu-dm-[PID].log. This makes it
> easier for the adminsitrator to figure out which log corresponds to which
> guest (particularly after a crash where you no long know what PID the
> qemu-dm process for your guest had). It also prevents the number of log
> files from growing unbounded.
>
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
I've just seen that this patch having been included in 15212:fc8e40692690
was then effectively reverted in 15219:f45c84dd5f41 by switching QEMU to
use Domain ID in log files.
This causes just as much pain for support purposes as the original naming
based on PID. Now when a user reports problems with domain 'foo' crashing,
instead of just asking them to send /var/log/xen/qemu-foo.log we're back to
having users to dig around in /var/log/xen/xend.log to try and figure out
what domain ID their guest was running with before it crashed and then
find the qemu-[DOMAIN ID].log file that matches.
changeset: 15219:f45c84dd5f41
user: kfraser@xxxxxxxxxxxxxxxxxxxxx
date: Tue Jun 05 09:59:34 2007 +0100
files: tools/ioemu/vl.c
description:
qemu: Use domid in qemu log name. Can be related back to domain name
or uuid via xend logs, less unique than pids to prevent excessive
number of log files hanging around, yet not immediately reused (unlike
e.g., after domain crash or reboot) where previous log file is
immediately overwritten. Not using domain names in logs avoids and
chance of unprintable charcatres becoming embedded in filenames.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
All domain names should be validated by XenD to contain printable characters
only - they are displayed & used all over the place in numerous tools where
having non-printale characters will cause plenty of trouble.
As for overwriting the log file with a domain autorestart after a crash, the
logfile ought to be opened in append mode (w+ instead of w) - logrotate
scripts can handle cleanup of logfiles
I am happy to submit further patches to validate domain names in XenD and
switch to opening the file in append mode, if changeset 15219 were to be
reverted.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|