[libvirt] [jenkins-ci PATCH] lcitool: Add 'install=' to the extra_arg

Fabiano Fidêncio posted 1 patch 4 years, 4 months ago
Failed in applying to current master (apply log)
guests/lcitool | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
[libvirt] [jenkins-ci PATCH] lcitool: Add 'install=' to the extra_arg
Posted by Fabiano Fidêncio 4 years, 4 months ago
Add "install=" unconditionally to the extra_arg parameter passed to
virt-install. It's needed as the virt-install present on CentOS CI host
does not use the correct kernel URL argument when installing OpenSUSE.

This does not cause issues on other installations as the other distros
will just ignore the argument passed.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
---
I've verified this solution works on a CentOS 7 host. I've verified this
solution doesn't cause regressions on a Fedora 31 host.
---
 guests/lcitool | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/guests/lcitool b/guests/lcitool
index 0e27796..c7f949d 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -542,8 +542,13 @@ class Application:
             # but we need to point anaconda in the right direction through
             # the 'ks' kernel parameter. We can use 'ks' unconditionally
             # for simplicity's sake, because distributions that don't use
-            # kickstart for unattended installation will simply ignore it
-            extra_arg = "console=ttyS0 ks=file:/{}".format(install_config)
+            # kickstart for unattended installation will simply ignore it.
+            # Similarly to how we can use 'ks' unconditionally, we also can
+            # do the same with 'install' argument, needed to workaround a
+            # a bug on virt-install as it does not use the correct kernel
+            # URL argument when installing an OpenSUSE guest.
+            extra_arg = ("console=ttyS0 ks=file:/{} install={}".
+                         format(install_config, facts["install_url"]))
 
             virt_install = distutils.spawn.find_executable("virt-install")
             if virt_install is None:
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH] lcitool: Add 'install=' to the extra_arg
Posted by Andrea Bolognani 4 years, 4 months ago
On Wed, 2019-12-04 at 17:19 +0100, Fabiano Fidêncio wrote:
> Add "install=" unconditionally to the extra_arg parameter passed to
> virt-install. It's needed as the virt-install present on CentOS CI host
> does not use the correct kernel URL argument when installing OpenSUSE.
> 
> This does not cause issues on other installations as the other distros
> will just ignore the argument passed.
> 
> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
> ---
> I've verified this solution works on a CentOS 7 host. I've verified this
> solution doesn't cause regressions on a Fedora 31 host.
> ---
>  guests/lcitool | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

I've tweaked the comment and the code formatting a bit, added my

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

and pushed.

-- 
Andrea Bolognani / Red Hat / Virtualization

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