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 10:15:53 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f185.google.com (mail-qt1-f185.google.com [209.85.160.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52J9Fqq4028797 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Mar 2025 10:15:53 +0100 Received: by mail-qt1-f185.google.com with SMTP id d75a77b69052e-47682f9e7b9sf112473671cf.2 for ; Wed, 19 Mar 2025 02:15:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742375747; cv=pass; d=google.com; s=arc-20240605; b=HV4zaAviWQwBkxqVOSQlKgRIkJkc1jpSwqbGNalAwM3Lv4BtpzyFT+WnpmHWwDT3x1 2x61iNvejfSJUfq4YgYVImKgI5SASTyPOnRjIXBkmO99eP7vsd+vkxBEPkJwt3xTdhbu 6OJn0IIrSkeKgIRJdyLufFU1cumQIzLeFVLfotgfAARMTEhl7L/3GQeFr41kTsqstEuO 6rTgHa8l5gqgZroTdkJWJKf2G0H1CAVI2RaUv6vAq00n6DMjSbOB9F5pABDsZhbC0hQc eo10Q1dyLXG85uvo9On+mS3X+oWisCU7rcOK4ptuDRXIo3cNjsmXxgdZcM60d1JjHxbT nAUA== 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=YDwSbyeHvcJuYyP3Mb0aMet6mUp6Bn36W+tlXesFrfc=; fh=fIFTrygO3Lp1X72wvfN73eSTeCBhRk+L/wVUgNNosag=; b=DkSZEPRLO9vYuStZ0sdxdKXy0fM/bqVBy4vMmD2I4rOXLat9CPy0IEp4J2tJ4EbV4g zYgTc82oQHbgZ8ooQNA0aGixg/q+k5j30FVttRDCiddp9IVwI3OCkwutkFrPW3XYN1Ub 9fNbRDjiIlFB4Y6jk3CgGFh1VmHzKMlvv3KuTErhJhJPUODByhofgh9sDjpV2q1U/bM2 5k/qWuNPZL8Y1AoA9ugaAIdr5kOqzrLnHrkVdEGaOSWa/g/dtCfYlNod6KWpb08+qxmE IXkavIXV1Vm3zEyoGdJzZetb5yKHVjlD1uHx/XHSc8zv6gF2yBMpJGjLyvbVgaA9jxst GASQ==; 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=1742375747; x=1742980547; 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=YDwSbyeHvcJuYyP3Mb0aMet6mUp6Bn36W+tlXesFrfc=; b=SerboLDTQpVD7+zu7rdwex4RoGshzy+z3iJKytNhvb9dT3EyEcrkpl2O3EzQXTnqmi 35GoxvVp+XMuT8o2wOjSRhTz952xEgfNT3M+Hr7CnTEuak6dZ+QXkE30PGhRbmXu6jX6 hAkb7H2SVZ51oRt+9xHaHT0t5hLVwbCh4RgPnPueoboIiW22MGVug4sAAjBUbU1mOBMs ysgDJsLdM18UTk2LCGOEzNmzRVesJnrAF7EvUB4BhCcwEKXv9jkJz90ad/XocSyLxYTj b4kxGXEu7LlIiwwqu9kzaJIGzXno/WAoWTa0WyAehsMsc6R8mqv/KRJ6di0gNhALA5nE S8Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742375747; x=1742980547; 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=YDwSbyeHvcJuYyP3Mb0aMet6mUp6Bn36W+tlXesFrfc=; b=u/LBZhbZhH5Z5gnjSQAMhbctAmvwc0v52AtrpSPHBl4EkiW/nqRj90LScOBJBSJcpM sCNP6Ox4XrBM6Wr2KP67CG8ve7cgnrYUZQFP3e9oXAaoJ++1DjlhuW7qhv+T2REm/uwm fDwRocCszHh2h/3essDFJPZmeohO6D4fFV7bsZcaYW3WQcPg7Ifjb/sOrySNskzEMZPr 22Clz7/pANLuiflxH1QaD/XV2xiHoy1aQG4ZbWd3ype21Aj6zAOQz2YAC8m+SJqAG1Ad yULrz6cLus8Lc5+/bXEBcPNd5F8AtNVvmLp4oI3l2XtSKPrCEb7Kyzn7/2HXZTdDIOwp jcAw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVF0XkuhEdSRttoT0TH4t68J8+VqRELl0qO8NtG/h5X9zCU3gEUlA0RioNXYCviBKzAq2TO@ilbers.de X-Gm-Message-State: AOJu0YyM67fiFWUZfPnhWhpqaIH3YTlHyH/Mn2f/O8hEkIiH6+YhGD3K vnQNfonpanJHp3vIxTTM9e3Ia1qqlS7W1S90IpgCyoCiejddDCZ+ X-Google-Smtp-Source: AGHT+IEujVJAEuahkKpbOLLrHd+oJwRaR5yDdFPujP7YBtmKOfAXPsAIjHtuy5zx/aYILnsGgK+sDQ== X-Received: by 2002:a05:622a:248e:b0:476:701b:d7ff with SMTP id d75a77b69052e-477083f8517mr35023901cf.41.1742375746601; Wed, 19 Mar 2025 02:15:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARLLPAIYLnZoyAfMETZhdARgfRFdR3r82C9MsihbidvKou8k2w== Received: by 2002:a05:622a:7706:b0:476:9c9c:1a5d with SMTP id d75a77b69052e-476b7e02b18ls19466591cf.2.-pod-prod-05-us; Wed, 19 Mar 2025 02:15:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5upoLeMKyy9L24gn4UfB44WGRbf8SpSDDf3ExTsQw25kq6OfZFucecWaq1ZzIzezH6IumPpkZsg0Z@googlegroups.com X-Received: by 2002:a05:620a:4546:b0:7c5:4913:500a with SMTP id af79cd13be357-7c5a838ecc8mr198180085a.19.1742375745501; Wed, 19 Mar 2025 02:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742375745; cv=none; d=google.com; s=arc-20240605; b=EAXdt8VfvzLbh2daj/VBGdFXJJPt8TiguiWLBu5ohB4VRsAx+BuaKjmLflkXroOzeo 87FT34S3jceVZ9tTeGX10vfywBBYwMIIwZxGCDcgyavTCtR6HsrRobreqYtTwtcxP/gI tCwXppyx5mY0a2OnTtFHK78+06lTezAKH1xF9PjL4ZiWbO+To6SKXc2nEpcJDNfA94PW hNVRDWSFPuJw0iuvY09xtS9Lt6bT3GNr1LIF0XP7Q0fBAEKrb0WB1RoyIOsQ2KYTAtZs mnAXIYRHqwktfq+CWTA1qYMLomOTGKOV/vC9ags2yCCZF+CtcJg2MI2o6NS6Dw6S6csX zgew== 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=k/TId86ynfXaaZ3RVwzLBXeIv//nidqKXoGG9sc8gWs=; fh=O+ZMFUiiuyZKsfz7Fw8hsdknZlxcSFSsLsCydBEGD0o=; b=AYlp13eLg8shphggRRgF/ijIVpQXz1c+hHpu//cXWilb8y4RyPtg/GKA9G71Qoh9gS P3Weh7dbBNQCiam7JBDJeU7XbNBozn9E1R6IeJxzMw+imiNhgYbY0kT9z5gG5LVAigwf J/MeuPrFvnjQT+3tmlLi3dDiZlOO0dR4JqEbVtViWDea6kJKz7SXvBOpN/cVT2HcK4uU HeVHCBUwPCAce3b1FjQOBleRoSmT2JRPqLdJC4K34WrmS4fO5IaHIri2FregiUhVlQ1j 3vyiwVVa3AZ0qc3bmOI2lQB0CvdnhazPlSxURcjSvF7ZgLo15JOOSYvlToUcyhIhpNyR bJxA==; 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 af79cd13be357-7c573b58f63si56245485a.1.2025.03.19.02.15.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Mar 2025 02:15:45 -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 52J9FfNo028789 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Mar 2025 10:15:42 +0100 Message-ID: <65b10c049f59096a66d835faa17ae13948e8056d.camel@ilbers.de> 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 12:15:40 +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: 5u2VDkUGqaqR 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, But if there is no direct definition of UNATTENDED_TTY and we allow such kind of race, it's not predictable, where to look at the installation process. > the other > instances terminate without error. I didn't get why, but for some reason board reboots even if the instance immediately terminates without errors (i.e. returns 0). That's strange (because we have ' || ' in the service, but it is. So, the only way I found is to leave other instances waiting for user input. > If the empty test fails and > installer_target_overwrite is not set, the dialog will still be shown > on > all te mrminals. The one that is then used will become the first (and > only) to copy. >=20 The main thing I tried to achieve with the patchset is to fix problems that make CI fail and block merging other patches from maillist. Probably, from the user perspective the ideal behaviour would be run unattended installation on one TTY and just show the progress on all TTYs.=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/= 65b10c049f59096a66d835faa17ae13948e8056d.camel%40ilbers.de.