From nobody Mon May 6 14:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578406668; cv=none; d=zohomail.com; s=zohoarc; b=O6wNcAoWuGJn9ZYV4nkY5HqbNA7NVk2t2+ntPmT3bF4dD8kJBG7yW+3NF3W0yPdbqddq+bjpOYZVq3zWkpnwAB/iDq7ZATn7e72Or/yXdv8btJVy0CMjNsfNLJZ6gIwkPUKvHaGqyx/DnyTBQdJZWNiFU6h7ew0aHZ0012elHvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578406668; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=DFKwQEo3Dl0tClcfO6qKOqDH6LQTc8UNnJy1DmVD8+A=; b=OcDBXu45f4bfD7k1+jy1C7QQzsspqQRT9O6tVQPOmSblkV2zjqyAfyacbKIraTTIiasGonb1dkxDl8msYBIY2A0Vtbyc44zvCfBkcvOxouJ6MfDDw8z9P/YrJ3qpTuo9qICQbSKrTDgwNwZS1EvxHEVfcRSfOR8YeB2n6qW0M9I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578406668677302.71323109678224; Tue, 7 Jan 2020 06:17:48 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-115-CxAHhbLnPWuAB6uPf3drJw-1; Tue, 07 Jan 2020 09:17:43 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9E6218FF669; Tue, 7 Jan 2020 14:17:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E33F5D9CA; Tue, 7 Jan 2020 14:17:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E82701809567; Tue, 7 Jan 2020 14:17:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 007EHZfu030282 for ; Tue, 7 Jan 2020 09:17:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id B86F284672; Tue, 7 Jan 2020 14:17:35 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-61.ams2.redhat.com [10.36.112.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4D7F691AD; Tue, 7 Jan 2020 14:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578406667; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DFKwQEo3Dl0tClcfO6qKOqDH6LQTc8UNnJy1DmVD8+A=; b=IREg8CUST57p0+8nnddyDIvltch6bN09EfS0sBV4TFrPUn53DUtDJFt1PtKvE7i2fEuqHi B/BvcbcqzuNb30A9Skb1GZ6vpuAHY92MiyFS3m974UDv0bUuBWSq+ioasku52TtAeBw593 oW2m94pJLMrn09xWnSW+MzLzbt3ptl0= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 7 Jan 2020 14:17:29 +0000 Message-Id: <20200107141729.3379672-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH] guests: optionally wait for installation completion X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: CxAHhbLnPWuAB6uPf3drJw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 Reviewed-by: Erik Skultety Tested-by: Erik Skultety --- 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=3D"target architecture for cross compiler", ) =20 + def add_wait_arg(parser): + parser.add_argument( + "-w", "--wait", + help=3D"wait for installation to complete", + default=3DFalse, + action=3D"store_true", + ) + installparser =3D subparsers.add_parser( "install", help=3D"perform unattended host installation") installparser.set_defaults(func=3Dself._action_install) =20 add_hosts_arg(installparser) + add_wait_arg(installparser) =20 updateparser =3D subparsers.add_parser( "update", help=3D"prepare hosts and keep them updated") @@ -597,9 +606,11 @@ class Application: "--rng", "device=3D/dev/urandom,model=3Dvirtio", "--initrd-inject", initrd_inject, "--extra-args", extra_arg, - "--wait", "0", ] =20 + if not args.wait: + cmd.append("--noautoconsole") + # Only configure autostart for the guest for the jenkins flavor if flavor =3D=3D "jenkins": cmd +=3D ["--autostart"] --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list