Richard W.M. Jones
2017-Jul-18 13:57 UTC
Re: [Libguestfs] [PATCH] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
On Tue, Jul 18, 2017 at 03:46:38PM +0200, Pino Toscano wrote:> On Tuesday, 18 July 2017 12:01:12 CEST Richard W.M. Jones wrote: > > In SUSE guests, handle the case where > > Bootloader::Tools::GetDefaultSection () returns undef. > > > > Previously this would return an empty string and cause a bogus error > > in subsequent code: > > > > virt-v2v: error: libguestfs error: statns: statns_stub: path must start > > with a / character > > --- > > I'm torn about this one: the test case for this comes from a simple > > $ virt-builder opensuse-13.2 > $ virt-v2v -i disk opensuse-13.2.img -o null > > What I see is that the template available from the openSUSE repository > is configured to configure itself at the first boot, which indeed takes > longer than the subsequent boots. The grub.conf in the image is very > simple, and apparently hand-made, and just makes the guest boot; after > the first boot, it is replaced by a proper configuration made by > grub2-mkconfig (which Bootloader::Tools handles correctly). > > So I'd put this patch on hold for now, and see whether there's a real > world guest with a grub2 configuration that Bootloader::Tools cannot > handle. > > What do you think?I agree with the analysis. OTOH can the patch hurt in any way? It seems there is a possibility that Bootloader::Tools::GetDefaultSection() might return undef and we should have handled that case. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Pino Toscano
2017-Jul-18 15:35 UTC
Re: [Libguestfs] [PATCH] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
On Tuesday, 18 July 2017 15:57:47 CEST Richard W.M. Jones wrote:> On Tue, Jul 18, 2017 at 03:46:38PM +0200, Pino Toscano wrote: > > On Tuesday, 18 July 2017 12:01:12 CEST Richard W.M. Jones wrote: > > > In SUSE guests, handle the case where > > > Bootloader::Tools::GetDefaultSection () returns undef. > > > > > > Previously this would return an empty string and cause a bogus error > > > in subsequent code: > > > > > > virt-v2v: error: libguestfs error: statns: statns_stub: path must start > > > with a / character > > > --- > > > > I'm torn about this one: the test case for this comes from a simple > > > > $ virt-builder opensuse-13.2 > > $ virt-v2v -i disk opensuse-13.2.img -o null > > > > What I see is that the template available from the openSUSE repository > > is configured to configure itself at the first boot, which indeed takes > > longer than the subsequent boots. The grub.conf in the image is very > > simple, and apparently hand-made, and just makes the guest boot; after > > the first boot, it is replaced by a proper configuration made by > > grub2-mkconfig (which Bootloader::Tools handles correctly). > > > > So I'd put this patch on hold for now, and see whether there's a real > > world guest with a grub2 configuration that Bootloader::Tools cannot > > handle. > > > > What do you think? > > I agree with the analysis. OTOH can the patch hurt in any way? > > It seems there is a possibility that > Bootloader::Tools::GetDefaultSection() might return undef and we > should have handled that case.More than hurt, I'd see whether there are actual SUSE guests out there with a grub2 configuration that Bootloader::Tools fails to handle, and then taylor the workaround on that. -- Pino Toscano
Richard W.M. Jones
2017-Jul-18 17:48 UTC
Re: [Libguestfs] [PATCH] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
On Tue, Jul 18, 2017 at 05:35:45PM +0200, Pino Toscano wrote:> More than hurt, I'd see whether there are actual SUSE guests out there > with a grub2 configuration that Bootloader::Tools fails to handle, and > then taylor the workaround on that.This gives me an idea... version 2 coming up. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Maybe Matching Threads
- Re: [PATCH] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
- Re: [PATCH] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
- [PATCH v2 1/2] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
- Re: [PATCH v2 1/2] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).
- Re: [PATCH v2 1/2] v2v: bootloaders: Handle no Bootloader::Tools default section (RHBZ#1472208).