search for: logmsg

Displaying 20 results from an estimated 24 matches for "logmsg".

2011 Jun 02
2
preauth privsep logging via monitor
..._postauth(struct monitor *p for (;;) monitor_read(pmonitor, mon_dispatch, NULL); + + close(pmonitor->m_sendfd); + pmonitor->m_sendfd = -1; } void @@ -465,6 +494,45 @@ monitor_sync(struct monitor *pmonitor) } } +static int +monitor_read_log(struct monitor *pmonitor) +{ + Buffer logmsg; + u_int len, level; + char *msg; + + buffer_init(&logmsg); + buffer_append_space(&logmsg, 4); + if (atomicio(read, pmonitor->m_log_recvfd, + buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { + if (errno == EPIPE) { + debug("%s: child log fd clos...
2013 Sep 05
1
[PATCH] virt-v2v: Add verbose message logging
..."c|connect" => sub { # -c|--connect is the default for other virt tools. Be nice to # the user and point out that virt-v2v is different. @@ -521,6 +549,10 @@ else { # Get an appropriate Source my $source; +if (defined($verbose)) { + logmsg NOTICE, __x('Connecting to input '. + '({input})', input => $input_method) +} if ($input_method eq "libvirtxml") { my $path = shift(@ARGV) or pod2usage({ -message => __"You must specify a filename", @@ -574,6 +606,10 @@...
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests. The converter is based on the RedHat module, and should offer the same functionality on both SUSE and RedHat hosts. There are a few additional messages in this module, such as reporting of packages when installing through zypper or the local virt-v2v repo. These messages don't necessarily flow unless verbose switches
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...g, $@) if ($@); + + # Prepend the grub filesystem to the kernel path + $kernel = "$grub_fs$kernel" if defined $grub_fs; + + # Check the kernel exists + if ($g->exists($kernel)) { + push(@kernels, $kernel); + } + + else { + logmsg WARN, __x('grub refers to {path}, which doesn\'t exist.', + path => $kernel); + } + } + + return @kernels; +} + +sub update_console +{ + my $self = shift; + my ($remove) = @_; + + my $g = $self->{g}; + my $grub_conf = $self->...
2012 Jan 28
1
PATCH: Fix memory leak in sshd
...monitor.c b/monitor.c index a166fed..6464eec 100644 --- a/monitor.c +++ b/monitor.c @@ -510,6 +510,7 @@ monitor_read_log(struct monitor *pmonitor) debug("%s: child log fd closed", __func__); close(pmonitor->m_log_recvfd); pmonitor->m_log_recvfd = -1; + buffer_free(&logmsg); return -1; } fatal("%s: log fd read: %s", __func__, strerror(errno));
2014 Jan 03
1
[PATCH] virt-v2v: Check for firstboot before unconfiguring XenPV
...m b/lib/Sys/VirtConvert/Converter/Windows.pm index 59d273f..ce8b474 100644 --- a/lib/Sys/VirtConvert/Converter/Windows.pm +++ b/lib/Sys/VirtConvert/Converter/Windows.pm @@ -564,6 +564,12 @@ sub _unconfigure_xenpv { my ($g, $h_soft, $firstboot) = @_; + if (!defined($firstboot)) { + logmsg WARN, __x('Unable to uninstall Xen PV drivers without '. + 'firstboot'); + return; + } + my @regkey = ('Microsoft', 'Windows', 'CurrentVersion', 'Uninstall', 'Red Hat Paravirtualized Xen Dr...
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...path) = @_; > + > + my $g = $self->{g}; > + > + my $default = $self->get_default_image; Parens(). > + > + if ($default ne $path) { > + eval { > + $self->set_default_image($path); > + }; > + if ($@) { > + logmsg WARN, __x('Unable to set default kernel to {path}', > + path => $path); > + } > + } RedHat.pm diff. This could be managed in a common set_default_image(), though. > +} > + > +# For grub2, we : > +# Turn the EFI partition into...
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...g, $@) if ($@); + + # Prepend the grub filesystem to the kernel path + $kernel = "$grub_fs$kernel" if defined $grub_fs; + + # Check the kernel exists + if ($g->exists($kernel)) { + push(@kernels, $kernel); + } + + else { + logmsg WARN, __x('grub refers to {path}, which doesn\'t exist.', + path => $kernel); + } + } + + return @kernels; +} + +sub update_console +{ + my $self = shift; + my ($remove) = @_; + + my $g = $self->{g}; + my $grub_conf = $self->...
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
If a volume is not an exact multiple of 512 bytes, qemu-img will report its size rounded down to a 512 byte boundary. However, when copying, the file is still read until EOF, which will return more data than was expected. This change prevents that causing a failure in itself. The situation is still not resolved, however, as there are still situations where this will cause a failure. For example,
2014 Jan 03
1
[PATCH] virt-v2v: Default to non-virtio drivers if driver path is missing
...{list}', - list => $virtio_host) - unless (defined($virtio_host) && $g->exists($virtio_guest)); + if (!(defined($virtio_host) && $g->exists($virtio_guest))) { + my $block = 'ide'; + my $net = 'rtl8139'; + + logmsg WARN, __x('The installation of virtio drivers failed because '. + 'the driver path referenced in the configuration file '. + '({path}) is required, but missing. The guest will be '. + 'configured with a {block} block storage adap...
2012 Jul 29
0
Xen networking experiment (with custom scripts and OpenVSwitch)
...e script does. Then on line 8, the $unique variable is set to a random 6 character wide string, a ''cookie'' of sorts, this is used as a log prefix so that you can see which particular instance of the script does what. Then a couple of functions are initialized. The checklog() and logmsg() functions take care of logging at the requested loglevel (set in xen.conf). This is different from line 4; logmsg is a function that logs to the console, syslog, or a file (xen.conf). The sigerr(), fatal(), success(), xenstore_read_default(), findCommand() and evalVariables() functions are modif...
2013 Sep 25
0
Re: [PATCH 3/4] Add SUSE converter
...e kernel. You can convert it into a list within this function and > leave the rest untouched. Yes, I wasn't completely sure where I should pull the trigger on adding the - base kernel. I'll clean the 'single kernel' references up and follow your recommendations. > > + logmsg NOTICE, __x('Falling back to local virt-v2v repo:'); > > + foreach my $pkg (@rpms) { > > + (my $pkgname = $pkg) =~ s/(.*\/)//; > > basename would have saved me a moment of squinting :) Yes, but would it have been as fun? ;) Using basename would require File:...
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...;, '--default-kernel']); - chomp($default); + my $default = $self->get_default_image(); if ($default ne $path) { - $g->command(['grubby', '--set-default', $path]); + eval { $self->set_default_image($path) }; + if ($@) { + logmsg WARN, __x('Unable to set default kernel to {path}', + path => $path); + } } } @@ -486,7 +569,7 @@ sub convert_efi # EFI systems boot using grub2-efi, and probably don't have the base grub2 # package installed. - Sys::VirtConve...
2013 Oct 31
6
[PATCH 0/4] virt-v2v: Convert RedHat.pm to Linux.pm
In preparation for an upcoming patch which adds support for SUSE guest conversions, it makes sense to have an intermediate steps that changes the RedHat.pm converter into a more generic Linux converter. The SUSE changes will then be limited in scope to only what is required for SUSE support. This series of patches accomplishes the following: - Renames RedHat.pm to Linux.pm - Modifies Linux.pm
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...;, '--default-kernel']); - chomp($default); + my $default = $self->get_default_image(); if ($default ne $path) { - $g->command(['grubby', '--set-default', $path]); + eval { $self->set_default_image($path) }; + if ($@) { + logmsg WARN, __x('Unable to set default kernel to {path}', + path => $path); + } } } @@ -486,7 +567,7 @@ sub convert_efi # EFI systems boot using grub2-efi, and probably don't have the base grub2 # package installed. - Sys::VirtConve...
2012 Jul 30
3
Xen networking disconnect
...e script does. Then on line 8, the $unique variable is set to a random 6 character wide string, a ''cookie'' of sorts, this is used as a log prefix so that you can see which particular instance of the script does what. Then a couple of functions are initialized. The checklog() and logmsg() functions take care of logging at the requested loglevel (set in xen.conf). This is different from line 4; logmsg is a function that logs to the console, syslog, or a file (xen.conf). The sigerr(), fatal(), success(), xenstore_read_default(), findCommand() and evalVariables() functions are modif...
2013 Oct 03
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...alled virtio capable kernel if virtio was > > installed - die("virtio configured, but no virtio kernel found") > > + # Warn if there is no installed virtio capable kernel. It is safe to > > + # continue and attempt to install a virtio kernel next. > > + logmsg NOTICE, __x('virtio capable guest, but no virtio kernel > > found.')> > > if ($virtio && !defined($boot_kernel)); > > No. This indicates an error in the program rather than something the > user can fix. This is also why it's a plain die with no...
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote: > It's specifically an error if we're attempting to configure virtio, and > there's no detected virtio kernel. It shouldn't have been possible to > get here in that state, hence it's a programmer error. The code below > attempts to install *any* kernel in the case that we aren't configuring >
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...+ my ($g, $root) = @_; + + my $arch = $g->inspect_get_arch($root); my $arch_suffix = ''; - if ($desc->{arch} eq 'x86_64') { + if ($arch eq 'x86_64') { $arch_suffix = 'x64'; - } elsif ($desc->{arch} ne 'i386') { - logmsg WARN, __x('Unsupported architecture: {arch}', - arch => $desc->{arch}); + } elsif ($arch ne 'i386') { + logmsg WARN, __x('Unsupported architecture: {arch}', arch => $arch); return undef; } my $type; - $type...
2013 Oct 04
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...kernel if virtio was > > > installed - die("virtio configured, but no virtio kernel found") > > > + # Warn if there is no installed virtio capable kernel. It is safe to > > > + # continue and attempt to install a virtio kernel next. > > > + logmsg NOTICE, __x('virtio capable guest, but no virtio kernel > > > found.')> > > > if ($virtio && !defined($boot_kernel)); > > > > No. This indicates an error in the program rather than something the > > user can fix. This is also why it&...