[jenkins-ci PATCH] guests: optionally wait for installation completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The install command is hardcoded to put the virt-install command into
the background. It is useful to be able to wait for completion, so you
know when you can go onto the package update step of setup, without
having to check back to see if the guest has finished installing.

Using --noautoconsole is preferred syntax for virt-install, avoiding
a warning about use of "--wait 0".

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 guests/lcitool | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/guests/lcitool b/guests/lcitool
index d24ac0d..8a681e4 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -394,11 +394,20 @@ class Application:
                 help="target architecture for cross compiler",
             )
 
+        def add_wait_arg(parser):
+            parser.add_argument(
+                "-w", "--wait",
+                help="wait for installation to complete",
+                default=False,
+                action="store_true",
+            )
+
         installparser = subparsers.add_parser(
             "install", help="perform unattended host installation")
         installparser.set_defaults(func=self._action_install)
 
         add_hosts_arg(installparser)
+        add_wait_arg(installparser)
 
         updateparser = subparsers.add_parser(
             "update", help="prepare hosts and keep them updated")
@@ -597,9 +606,11 @@ class Application:
                 "--rng", "device=/dev/urandom,model=virtio",
                 "--initrd-inject", initrd_inject,
                 "--extra-args", extra_arg,
-                "--wait", "0",
             ]
 
+            if not args.wait:
+                cmd.append("--noautoconsole")
+
             # Only configure autostart for the guest for the jenkins flavor
             if flavor == "jenkins":
                 cmd += ["--autostart"]
-- 
2.23.0

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux