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; Tue, 18 Mar 2025 07:34:11 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f61.google.com (mail-qv1-f61.google.com [209.85.219.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52I6YA2U020195 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Mar 2025 07:34:10 +0100 Received: by mail-qv1-f61.google.com with SMTP id 6a1803df08f44-6eada773c0esf162970146d6.3 for ; Mon, 17 Mar 2025 23:34:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742279644; cv=pass; d=google.com; s=arc-20240605; b=ZYNlKJWyrzGsHyWZNL8+XsP9ksskOvkz0dR2A8PW7HUCeg4I+LwUjaqDMml7VbmEwq 7W6twzNAk2YPposfh2HbjopOFhmALjI/GuD44am7CvGLwr7hD/wYJdqiBLU4yz1f+GZn +ATPKNINP0wZL3LmbR4rmCN8cyYvG1CMii3GG2Qs/RcSQX9WloEiITo/u8yJVDZeIon5 LZA7k3/lQFa8Hw9fnpkgZF/I1ZkdAPyasiC1kQSuH668Eg44Hq5l4VDEEoV3Gd/Hl8Gs P7Eu++mBXHJaBh9RenK3kjoesdr7g1NU+Dlu/QZiP9wA44B681KtKa0dvxalrbMjsXs3 MThA== 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=I8I3LCTB2VtujpKTTAgZCMX+TWRCQmQfwVBZHdDjGvs=; fh=Qx5Wr24yMwyJNRDGU88e3dLfMg1kkDTOGv9ljuNt5uo=; b=Tj1NxR3x+RagTnDK6LdulOjBAqWl8MG1dxPUOh5zqUopoXGFIneFxKO0k83iwJ2ySn otqsTPkQMuNGiqnRl4XCeuQIori0dyHX/+RBsBJxun87twpehsAO98wOhfCau1ZPtPdL 50UDdlbLb2sE/aFPVUHGBbYf+awa0cOgzMd8Pmx818X/iPzBAtYsCIl+W4JgGQBpjWSu l1kUBy34HHr7EeeZah7yqeJ4wbLSw8yXNijhRgMymDbqItQ+HjYjG0B5nd+8pQfE7Vpl MeGMZ2ieiDQXeQZMRXrcWsQHrv3vcrS0YrtOqY2wAG4+5cf75pgwa0aI03YOr8QBAtus 9kqw==; 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=1742279644; x=1742884444; 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=I8I3LCTB2VtujpKTTAgZCMX+TWRCQmQfwVBZHdDjGvs=; b=cY0sy/wemvlYjJVaET10PCvIMv7EUuwvtlrG/Ai+2wZ/1T2uvKOj6yWeccEVEj206p cLTa9Jk4m9u8FBhGpfAIGmWibCIoNNSj5F+bWHlu4fRfGdASZdyQtG/gWPsPTy411DO8 /VPx/D3gaW5kTWSDOqvq2ZaBnuBtoD2SMhBdEPhdacfsjoN2Hv1VeHnJ8A86ogxo3Htt Raz1UyPWILKf9ArYasBoQ5ijzRfVxb8HF1uJ/mwH0SZDCVGEZYbHKWhRLuw/SD8GQe3N QnBcw6JnI4MBJJVURVaEUHnhh87y77n5CrZRWTKAfxXtu0/U18V2RaDqx0JDkUM83tc0 OpyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742279644; x=1742884444; 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=I8I3LCTB2VtujpKTTAgZCMX+TWRCQmQfwVBZHdDjGvs=; b=SSOoLOMgfoK2pdftDsYTvOpevu5Im2n1yrv68GqpuT7TkBszYXK9pNSYynS4pnJ0LB CzaNcGvWfKdmGmvKa7A2jcmGyS/MabX7eeW4PXUP72SnkxXq5Is0xT7WZdLUnmc2M9Fr mtN8ys4uyAo2pUkMh1ErVTDArOwOfqGjDcNYLXQdNPt9vhU0cimQ9OmekYxstnVbn7g5 o4QpliGwqEzkKE6SIDew2rRsBeTG51vHJNhD5uc7CERDLHNCQN+++ZdZ1Tq6nAZyTIQT h/ZkcvwAJHZqRG6390yX013/fmjW6lV3ZbnEIT7GPrOaTA1+CDTioQc57NYPw1CfYYop IySA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXzvXmpJE3QfQs1xyVe2ONqRnbSY18RNENN176Gd7pR9ISWImA811dM18+sFEiIScZZcgD7@ilbers.de X-Gm-Message-State: AOJu0YxidysQHnXK1hQgIr4jhZtYqKOTnZQE4Oy9IXJyfboCkbpBu6OP w39ljbNmm6Fa4PHdW1wXTDn4Uo3jPEYaqNYHyhmBXvb55FPB+CaF X-Google-Smtp-Source: AGHT+IHCfP9M41dVCLR7g4AZRc6zhGpjEnt3WUkGsKa5QiLmMGe5AluVLMhbL5qKyqRT6F0rDt7F1A== X-Received: by 2002:a05:622a:438b:b0:476:964a:e335 with SMTP id d75a77b69052e-476c8151c1dmr156556811cf.24.1742279644322; Mon, 17 Mar 2025 23:34:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARLLPALgw5FJPmaNbbnxdVlIVHpQETTzi/sKYCK3cNtoNgyZTw== Received: by 2002:ac8:7fcc:0:b0:476:b5d0:6c0 with SMTP id d75a77b69052e-476b7e10472ls7672191cf.2.-pod-prod-04-us; Mon, 17 Mar 2025 23:34:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV85GBIHch1iXNCSBtQLiQcLDGL/BqnOHq4kKwCZMvZ4aADNRPLRjh4bSRycFmrZZhRsDuTZIBO9nlO@googlegroups.com X-Received: by 2002:a05:6122:4013:b0:520:61ee:c815 with SMTP id 71dfb90a1353d-524499f88fcmr9427657e0c.10.1742279642463; Mon, 17 Mar 2025 23:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742279642; cv=none; d=google.com; s=arc-20240605; b=VDFbG7HI0OiOJ0j9p2h8HyZM+XoJODLBeb4r6JVI1qfbVw/Qu9Le1RdXPsVjitC/xg fZndwsPvx3HJYOMuu6sk0tVfm3e0AEpq4N2MeZRels8dh6OdP67lpxGOrKnKN2nI8Qzp +BijQXV/w8DJNzqvHVVYzAwo+4zLxWRikRsKQuCwAmAxrZWobaU9zzVhwLKgTKZXzh1E HMfnO3ea1BklynmA9o+7IY1yUDaszgvB3hiudtdvwUKUTnre7TBPGkMKxnnAn8BnQ3/7 CC9qxbvVcddk8f+TinTZFDKWB8hnWpsWHYg0vSJPE1DYCaZFCzAKECPCrcVFpsxJWap5 A6Ag== 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=3n16AlvbMrC8io5D+ipYdbp8gFPZb5L/tT6YxdXi374=; fh=O+ZMFUiiuyZKsfz7Fw8hsdknZlxcSFSsLsCydBEGD0o=; b=Xrkl9icel1ALqIRYo67PIAyd8VzAy9zI1iZHPIMb2hfLiS7JwXIb+a93CorR/Y0UJn 3220SLLQ4V0M/UT2P1hGZ6T+U0V11YXuPTMQWzuSqgRgWvVM1Eva6PLyczfygpCC7CUy R+jXiTCw5lnFfL0RvjGE/uyJaXe++pyV67NuXpop7XoTqdefZeyz4+5RSObXCZ4yIYGZ v8IARwCFxQj6VsWKhvRPnaT6J+d8Y1FhhABvZazXpYmlE8IZa4jURMpLEA1qf3Xn2/lU uHSbjjWg4YMB3dniupHEDyaQcjaDIK953Y0HaqzG8q7AyDlBgGZZzVwzEwAkBl87pa1J GmqA==; 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 71dfb90a1353d-5243a6b8344si531001e0c.3.2025.03.17.23.34.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Mar 2025 23:34:02 -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 52I6XwMB020181 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Mar 2025 07:34:00 +0100 Message-ID: <68af99349e8b348fd22e0167af7c284168096e68.camel@ilbers.de> Subject: Re: [PATCH v2 3/3] installer: Run in unattended mode only on ttyS0 From: Uladzimir Bely To: Jan Kiszka , isar-users@googlegroups.com Date: Tue, 18 Mar 2025 09:33:58 +0300 In-Reply-To: <7b66abad-a095-4eb0-bc20-643f9743e5fb@siemens.com> References: <20250318061300.12805-1-ubely@ilbers.de> <20250318061300.12805-4-ubely@ilbers.de> <7b66abad-a095-4eb0-bc20-643f9743e5fb@siemens.com> 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_H2, 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: 5W6DrZl0LmyT On Tue, 2025-03-18 at 07:29 +0100, Jan Kiszka wrote: > On 18.03.25 07:25, 'Jan Kiszka' via isar-users wrote: > > On 18.03.25 07:10, Uladzimir Bely wrote: > > > This fixes race between two unattended installer instances > > > running > > > on 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 > > > Signed-off-by: Uladzimir Bely > > > --- > > > =C2=A0.../deploy-image/files/usr/bin/deploy-image-wic.sh=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 6 > > > ++++++ > > > =C2=A01 file changed, 6 insertions(+) > > >=20 > > > 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 > > > index 7f552eee..bd580694 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 > > > @@ -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/ttyS0" ]; then > >=20 > > This is wrong. "ttyS0" is target-specific. We need a different, > > generic > > mechanism to detect multiple executions. > >=20 > > Jan > >=20 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo "Disable unattended = mode on $(tty), it's active on > > > /dev/ttyS0" > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 installer_unattended=3D0 >=20 > And this would be also wrong. >=20 > But all this does not make sense yet. We have a single service that > is > supposed to run a single script. I don't see why systemd should > instantiate the service multiple times. Is our service file > incorrect? >=20 The service itself is correct, the problem is that it's run twice. https://github.com/ilbers/isar/blob/master/meta-isar/recipes-installer/depl= oy-image-service/deploy-image-service.bb#L19-L20 For non-unattended mode it doesn't matter, but in unattended mode one of instances fails and schedules rebooting. > 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" = -type f -iname > > > "*.wic*" -a -not -iname "*.wic.bmap" -exec basename {} \;) > >=20 > >=20 >=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/= 68af99349e8b348fd22e0167af7c284168096e68.camel%40ilbers.de.