|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3] ts-xen-install: Enable debug level logging in libvirt
This should make diagnosing libvirt issues a bit easier.
Refactor the existing loop to edit the xencommons kvp style config
file editing code so it can be reused for libvirtd.conf.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Jim Fehlig <jfehlig@xxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v3: Only apply if toolstack==libvirt, else we break non-libvirt
tests. Now tested with test-amd64-amd64-xl as well as -libvirt.
v2: Match key\b
---
ts-xen-install | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/ts-xen-install b/ts-xen-install
index 7cfe344..5282f0a 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -114,19 +114,27 @@ sub adjustconfig () {
}
die unless defined $trace_config_file;
- target_editfile_root($ho, $trace_config_file, sub {
+ my $kvp_replace = sub($$) {
+ my ($key,$value) = @_;
my $prnow;
$prnow= sub {
- print EO "XENCONSOLED_TRACE=guest\n" or die $!;
+ print EO "$key=$value\n" or die $!;
$prnow= sub { };
};
while (<EI>) {
- print EO or die $! unless m/^XENCONSOLED_TRACE/;
- $prnow->() if m/^#XENCONSOLED_TRACE/;
+ print EO or die $! unless m/^$key\b/;
+ $prnow->() if m/^#$key/;
}
print EO "\n" or die $!;
$prnow->();
- });
+ };
+
+ target_editfile_root($ho, $trace_config_file,
+ sub { $kvp_replace->("XENCONSOLED_TRACE", "guest") });
+
+ target_editfile_root($ho, '/etc/libvirt/libvirtd.conf',
+ sub { $kvp_replace->("log_level", "1") })
+ if toolstack($ho)->{Name} eq "libvirt";
target_cmd_root($ho, 'mkdir -p /var/log/xen/console');
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |