From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 19 Mar 2025 11:14:03 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f61.google.com (mail-pj1-f61.google.com [209.85.216.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52JAE1dH029346 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Mar 2025 11:14:02 +0100 Received: by mail-pj1-f61.google.com with SMTP id 98e67ed59e1d1-2ff854a2541sf6916609a91.0 for ; Wed, 19 Mar 2025 03:14:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742379235; cv=pass; d=google.com; s=arc-20240605; b=PPhExEmwIEBF2izG07zjS/Sxb6nG+lR7WJ6ZmTsgZ+qdsneK7kyNB0u+1CKRFQwTlJ a5A/LNLUmxND1inb3u6S6WIzpKD0cH6hLWYZD8dLFY5PMwXPBsWhNauPgaCQhf8otDP8 KoQcJto8WdR/cxT+iceB4gGQCDQlHvUGDIXlYPOQej697vVfebXY2Oi2RTy//H3sag9M ZAYTacR/H8FOf7iNmuwdQTZc1nIc5EvmucNAnqs8TvYGxeq+XEKzsLh7HHmaEjK30Jm6 uwxiXPhgM65bZlVdT5SzLg16GPFjgDjFpjjL33x4UwLooYhijsx1spxl+1DkSF2srhVY NpWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:sender:dkim-signature; bh=6HW0st+sDsOZK6aAs44kr9o1O14S5BoiTTTBpzI7YjI=; fh=gRAPFse7lgPsxRJYLzdNYPEWDtJXQ2HiKY/Q1tAp3fk=; b=RXhwQk3EoTZHlqkYzGRc4i8mXnO1lTXSRFZ0iMnSFAUcaHHfdYZg+Q3v9bmKOavd93 S4V96wRu8cEAJHGvB/4AUsFOf7Ki8SHQ9WjvVNxIq0YCnPRAIeeiz5ET5o0A5faHPNmm olMkTXmapvL+Ymu+I5msPBtdx8uOygr4/mRzCU2O2DAX8hBrWgN7HnSUfBBvsLBxeuEv js+XheKGyHPumRHpu6hMfs8rY6WCj56RyeB+CfIrFlSpaWin9Z+Hl7vurX+DJhzTp839 ggsecFa+AX/SaKTk8p/lw3x3XsvLAw5IqFyAnvZPMS6RklM425Zz3bh4LbvO8iYGxLcp ri1Q==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1742379235; x=1742984035; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:user-agent:content-transfer-encoding :references:in-reply-to:date:to:from:subject:message-id:sender:from :to:cc:subject:date:message-id:reply-to; bh=6HW0st+sDsOZK6aAs44kr9o1O14S5BoiTTTBpzI7YjI=; b=Jh9uJeSYmCH2pttgJRmIgQaej428pnFf24H0BNHMr8MbYMDjGheZXmLAu4IT22elbV bpjMOc6JBBxpVpk/iMmX7zuxjZpFEX7zw3Mw/ED/FBPlVr/Zuz1u4TWOesvw+/ieIyeL WZnxpK/Ax8FjKiNJW+RhK402QRD+f7pqw3F9D3hmAjHHFPC8C4K70IECxaE+YgUi+xKw pJtV2M/cWEM2ley2pE4B4bIqfGFd65BTzSUo29rvcihcvBZLlcaLuv5vTTbCAg6djP93 kgsXLY2m7/pZgAj7LHdgkAml1CRdNOFL5L/6XTYrFDkp7A7z407etS0VUQYDmnFeEnKF deJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742379235; x=1742984035; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=6HW0st+sDsOZK6aAs44kr9o1O14S5BoiTTTBpzI7YjI=; b=htQE7xBoopInsuUF2LCZDQtHm95N7O7rERtGcAlDASEEwuEDontan7dDtKdVKz5fUP vZlN73cWoq0be51fYN8ST12LQ28gQs5Mz0jd9FGRJpH3lvVSI4HQWoTcnh/0rMJKduPl VST8WwFwt3at+Sz0hJp8gQyPIleW1+O9qU5Z8V6Tdyvs4m6OziskxDdFPcUca/VpDMXb 8UUntcURGpABCQOHPGYovn3SRMce34iJuWLWTuy8tYq5I9MqFoKRbjRll2F+9L2JpYGv nbnEGzxKggG03IPtxF0AcaFUYHN+5QKoZSIDvRI3nIBi4BZmllsnGYzNU4qfKWlPgO7t /g+Q== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUDKXF1LB/jzz29x8diPMeyxFNRQJMYScvd20WwSv/QBz6z4p40XCKsNIbtk2mvWCTiNsIn@ilbers.de X-Gm-Message-State: AOJu0YxhNy4hURpGS67uSd/Id17n4fptwh0ST1hsGP+RgodYHRwPt+eP 2M0l6JetFtBAmrAjPQcQlIvbX4BY7j3mljF+nkwPO+PazunMFpwv X-Google-Smtp-Source: AGHT+IG+eyoVKvCV29iTPnixPEKrxkymrH4ZlQRr1CxPqGa+0NdKgQsyitINw3dk62iw8phHCvX0cQ== X-Received: by 2002:a17:90b:4a11:b0:2ee:aa28:79aa with SMTP id 98e67ed59e1d1-301bde530c5mr2919334a91.6.1742379235415; Wed, 19 Mar 2025 03:13:55 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARLLPAJUlerH9MMM3geOnVOmX6qaQ/vAujVnB1DPooNmlPXgyQ== Received: by 2002:a17:90b:56c3:b0:2e1:1d4a:962a with SMTP id 98e67ed59e1d1-301531d7276ls537603a91.1.-pod-prod-04-us; Wed, 19 Mar 2025 03:13:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVif7SC8sBHD91FwTK7v+1cDUBLbOB+m9Hfxay4TmDVTxyTU6UWC1wBqxxcMxSKRvSggfvphW3Hx4qa@googlegroups.com X-Received: by 2002:a17:90b:54c6:b0:301:1bce:c26f with SMTP id 98e67ed59e1d1-301bde4c26cmr3036434a91.3.1742379233775; Wed, 19 Mar 2025 03:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742379233; cv=none; d=google.com; s=arc-20240605; b=YmndNgvhI6gGotDM566mKTZN9KjisnFmBBLpTxzOzfctxiHuDrRW58s90LHiocPbox ZMV69VtK467KOJuI6aEvEvDt1Y8j24UD8WGG/K8i1xvse1WbN5fLqXg02ywP6HszCKjC KBYZGGtmUTmfBpCvbwGIauvaDF0Bg3PterO3PPFRDwG3VahL0Yc6EykvmnYa7gYyZ2bN Tfu8b6h55JETHU9C48XekjMoESOe9PsdnbN1g4oUutWtyfPDqpJWjoEuCYmCBKULM4kZ LlwbhUJkxc3LAaJlKGt7UMgSQeON8idupuQYacSWdncsRH4f2nxJjJPCfZ1IXHiobRZi AO/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id; bh=CX4iDTqTjAZUyQ6WwKWulz5UfwrqCoNpQeB1VPZEidU=; fh=O+ZMFUiiuyZKsfz7Fw8hsdknZlxcSFSsLsCydBEGD0o=; b=N9h4824NCZxBx7mZ8nG+GJJK2RsBZoNgv8C844dOOcKjvhJkrBrqtO9xtbzDUwTniZ tT2MdPi8xJLxTl38JVXNnW2USC9aJhHPu1/fLjGrFKni/+/lkIjmaK02Zwexl1cbvaY4 o+U+bGqgHY+jmJSKTadDdyB9PRnX03lNYpCV+Ffjlnk+rHvIbj5ZADsBgcN2LHGZL6Me n5cYLLNpNUFUMyr6J1HiBr3SvB3vGrOLOQzoZnE7VQIxLzte5gm7GpZTqjPseWtXPqH6 f8ABpaUn3bDEMk4nGbdYxlbl480TPf5RNIzwIMNO0giL8ph3pLHxJtm2pxVI9WXlz66i XsFA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-301bf4773d4si44437a91.1.2025.03.19.03.13.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Mar 2025 03:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 52JADnWi029336 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Mar 2025 11:13:50 +0100 Message-ID: Subject: Re: [PATCH v3 4/4] installer: Run unattended mode on the only terminal From: Uladzimir Bely To: Jan Kiszka , isar-users@googlegroups.com Date: Wed, 19 Mar 2025 13:13:49 +0300 In-Reply-To: References: <20250318140622.13676-1-ubely@ilbers.de> <20250318140622.13676-5-ubely@ilbers.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: dlQicKP9VGSa On Tue, 2025-03-18 at 22:39 +0100, Jan Kiszka wrote: > On 18.03.25 15:02, Uladzimir Bely wrote: > > This fixes race between two unattended installer instances running > > on different (e.g. serial "ttyS0" and graphic "tty1") terminals. > >=20 > > While one of them starts writing the disk, another one fails > > and schedules reboot in 60 seconds. Depending on build machine > > performance we can get incomplete installation and broken target > > filesystem. > >=20 > > Selected terminal with unattended installer can be set by > > INSTALLER_UNATTENDED_TTY variable. It should correspond to one > > of INSTALLER_GETTY_TARGETS from deploy-image.service recipe. > >=20 > > Signed-off-by: Uladzimir Bely > > --- > > =C2=A0.../recipes-installer/deploy-image/deploy-image_0.1.bb=C2=A0=C2= =A0=C2=A0 | 8 > > +++++++- > > =C2=A0.../bin/{deploy-image-wic.sh =3D> deploy-image-wic.sh.tmpl} | 6 > > ++++++ > > =C2=A02 files changed, 13 insertions(+), 1 deletion(-) > > =C2=A0rename meta-isar/recipes-installer/deploy- > > image/files/usr/bin/{deploy-image-wic.sh =3D> deploy-image- > > wic.sh.tmpl} (95%) > >=20 > > diff --git a/meta-isar/recipes-installer/deploy-image/deploy- > > image_0.1.bb b/meta-isar/recipes-installer/deploy-image/deploy- > > image_0.1.bb > > index 242ca88e..1af3a6dd 100644 > > --- a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb > > +++ b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb > > @@ -7,10 +7,16 @@ DESCRIPTION =3D "Install image to device" > > =C2=A0 > > =C2=A0inherit dpkg-raw > > =C2=A0 > > -SRC_URI =3D "file://usr/bin/deploy-image-wic.sh=C2=A0\ > > +SRC_URI =3D "file://usr/bin/deploy-image-wic.sh.tmpl=C2=A0\ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file= ://usr/lib/deploy-image-wic/handle-config.sh=C2=A0\ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " > > =C2=A0DEBIAN_DEPENDS =3D "bmap-tools, pv, dialog, util-linux, parted, > > fdisk, gdisk, pigz, xz-utils, pbzip2, zstd" > > + > > +INSTALLER_UNATTENDED_TTY ?=3D "${MACHINE_SERIAL}" > > + > > +TEMPLATE_FILES +=3D "usr/bin/deploy-image-wic.sh.tmpl" > > +TEMPLATE_VARS +=3D "INSTALLER_UNATTENDED_TTY" > > + > > =C2=A0do_install[cleandirs] =3D "${D}/usr/bin/ \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ${D}/usr/lib/deploy-image-wic \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= " > > diff --git a/meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes- > > installer/deploy-image/files/usr/bin/deploy-image-wic.sh.tmpl > > similarity index 95% > > rename from meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh > > rename to meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh.tmpl > > index 7f552eee..33a409f3 100755 > > --- a/meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh > > +++ b/meta-isar/recipes-installer/deploy- > > image/files/usr/bin/deploy-image-wic.sh.tmpl > > @@ -10,6 +10,12 @@ SCRIPT_DIR=3D$( dirname -- "$( readlink -f -- > > "$0"; )"; ) > > =C2=A0 > > =C2=A0. ${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh > > =C2=A0 > > +if $installer_unattended; then > > +=C2=A0=C2=A0=C2=A0 if [ "$(tty)" !=3D "/dev/${INSTALLER_UNATTENDED_TTY= }" ]; then > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dialog --msgbox "Unattended= installer is active on > > ${INSTALLER_UNATTENDED_TTY}. Please wait for it to finish." 7 60 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 installer_unattended=3Dfals= e >=20 > This remains wrong, already wrote before. Even more now with the new > model where we define that we will only handle even errors on > INSTALLER_UNATTENDED_TTY. >=20 > But all this is not what I suggested: First entry into the script > that > passes the "target dev empty" test will do the copying, the other > instances terminate without error. Actually, all instances will pass "target dev empty" test since they are working in parallel. First error starts at "bmaptool" stage. > If the empty test fails and > installer_target_overwrite is not set, the dialog will still be shown > on > all terminals. The one that is then used will become the first (and > only) to copy. >=20 > Jan >=20 > > +=C2=A0=C2=A0=C2=A0 fi > > +fi > > =C2=A0 > > =C2=A0if ! $installer_unattended; then > > =C2=A0=C2=A0=C2=A0=C2=A0 installer_image_uri=3D$(find "$installdata" -t= ype f -iname > > "*.wic*" -a -not -iname "*.wic.bmap" -exec basename {} \;) >=20 --=20 Best regards, Uladzimir. --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= a606f3ae2bd47b158cc26e0417ef246120eb46ca.camel%40ilbers.de.