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 09:14:12 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f184.google.com (mail-pl1-f184.google.com [209.85.214.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52I8EAPv020955 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Mar 2025 09:14:11 +0100 Received: by mail-pl1-f184.google.com with SMTP id d9443c01a7336-224347aef79sf120446925ad.2 for ; Tue, 18 Mar 2025 01:14:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742285640; cv=pass; d=google.com; s=arc-20240605; b=W8zVs6mDWZAxW1+tKKetjyQsvIZQsuQXQNmdlJXzlXPStuIjlguEFsHeoG75hwS8YL 4lw3BaM4RuFtUyixZZpQZSuXiz2ZK1onDumZRTCLdMF7W7/GgZNqAEvljAyyBnljntIZ 2XqVzKf2aFCGbh6kBIWSIBUtbzld9ftf8G65iofHJW3xk08N/sSb/30X6RqSXqvXcA0R zLwywMLfUye+i3NcilHl7I9GXX8VWdWEu6ta7gTayX5Cvffa7mYSJUgVwpbBHiNa07BF fFLwt900rLfEB/ssCnAE718jDDRWs8msu2HJBoHb7vu/aC1xtr0O/gvx2hHFLiI06+x5 7T7w== 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=C8O1/k2QJXIBx3bPGPPBpXR1rzhmKabT9JWBi5vktYM=; fh=/AsFjyqqsLS6PXalNOZ6Y3USH8kBayqSAissqp8zmmw=; b=YCvxYSC1lDYT70BI6PGpRbcx4IhRy9FvRlVDSrXiwaQqTBJClsxhp1c4sMuNXAOn5r NUTg5KNITe6OQaMjsweg9a+8fpwJswwvhIGZ7u1KLINRC709FVFDXPOd7QAmTHHx7iZv pQtJ4wc/Q8YAl6OJfDTkzrSvz/0gRlOMYEcq8/aR3OijnvT1SDsOSZxrVhXby5Ta+1Ie ViYumZlssYXFRBT2EYMZmsCUxoMfVCU36dYQSco+yuOmimX6Vfn7vxaoND2VIx50QBWv bppohx2nMsstqet8eI5CDtudbSNAo9GCRKlUXmoRzcHHx3zko8m9FOMS6Dgs4rL5n/O+ i2gw==; 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=1742285640; x=1742890440; 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=C8O1/k2QJXIBx3bPGPPBpXR1rzhmKabT9JWBi5vktYM=; b=m/n+Vvq3yHPkNyoKzxNZxwZzBDgY39hl8IvbOeewWTh4Osdb/6CkZdlYwp0hpORAH6 qNiwEv3r06MC/wrmmJ0RlAQzxHPCmnNF6sWwJEZplKRfEZ9Isx/Zvld12LjoA+lnUgw9 YD483R+zA2zHfkY0v4GA7DqF+jTdUWs12DTHZU1FPeDNIhrXxg++EKIkS8gfhHew/KGm eEE5y18NSI1ZDZFj/MM3LsYoXWG/TP29RIe8hIhzALdr7lbp/ImUNzv1xfzbcqC58HPq YPzS+1E5GJRlmcJAv7w/1gW7sA82rj9Nw6gI3ZADqTbDEm1SdFHx4yL/gPaKymL/Eu09 ZXiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742285640; x=1742890440; 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=C8O1/k2QJXIBx3bPGPPBpXR1rzhmKabT9JWBi5vktYM=; b=J7SBm/XxOOw7wxEQe/L0Dn9RYOajcNp7g1L0Ftq5G+Euo7r11UySE9ZXWcE1c1A7O1 sV/jKiFxiTwghgrNCY8gUQWKFV2d5DdPpscyy4CByKi9adgnXX4AS5cxFcBgcdXVI0Xu K3updE0fefLQHT7Y8dUERUEJWYU8MR5JKdFbvn4B6mGDBRB/dfWYpSwaniZutL+fkUn/ h6X3KYVR4fr0r/VTO4k9AbnaaCSCaX+QcQOf8WhsgEGzx6BE3CZy0WksVSHNW7bVikZu xUQBv9FlglK/HdiFzqmZJnBMmJ41f7EsWlNPzNpFBHedO0nzCA+OPC2mFQaaxsEq36vU uQzw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVKI7BbFY/BozCgU8vcevNq1+VOCkPwmTtqnMxXYfV87nplc3tovgzIN+3pv9Y591iMoUAN@ilbers.de X-Gm-Message-State: AOJu0YwcIHTi0/quXY1NOY5u9nb7Le4WQBGUg75/Qy7ogzppWjGCDQxR UUaJORJbv2PScYD7KV2UEwY781ZXS/bzNTOxLz20R8GhTsu9D8dr X-Google-Smtp-Source: AGHT+IF9KNVr+Ksc86e+zABzGsf1fSQ6g/P0kpUtAkb4rdrAO/9U7lrupiW7vGHcuIlJCkvQF6VkZA== X-Received: by 2002:a05:6a00:27a0:b0:736:5822:74b4 with SMTP id d2e1a72fcca58-737572e0b89mr3668796b3a.21.1742285639829; Tue, 18 Mar 2025 01:13:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARLLPAIFwqJtw9052JAmfQie7eft9L6Ej2XKp0v2Er4a1OpGZw== Received: by 2002:a05:6a00:3991:b0:736:61f7:1482 with SMTP id d2e1a72fcca58-7370d7e5f0els2870086b3a.0.-pod-prod-03-us; Tue, 18 Mar 2025 01:13:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQYUQhSqIQUKJyYMNb8BbldkVTXWOwBwZkxVvoZ/6BwMGdA2jpqclWC5OOFdVwo+GadPH2hTOMg93M@googlegroups.com X-Received: by 2002:a05:6a00:1896:b0:736:4830:68a6 with SMTP id d2e1a72fcca58-73757205be4mr3951710b3a.4.1742285638202; Tue, 18 Mar 2025 01:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742285638; cv=none; d=google.com; s=arc-20240605; b=YEr0ylC+2rt7q1sD4xt/73YE4uft/4rxnouxRuAQ+IePb8c0jjXiCLW1Cq3+fHzWpY hWz5Io/jrlmShSvbwZyKa2jQse7W23RTYclHbVDlQD3LwenAOYNUOmaqw6IrG8G3xjAx Tr59Bv/lAenUelB+8opQVkJaxkMf+ARZ+e12hxZDVBSUd+ZVYqGhEA0xm+rINn/Yxhyd 5V3vjEQDxVY3ZEi/6Kulcw4yFBUHAvltsAXi4re2Mq8IrsLn2sUpLgOY17P4OkT1Bdlz 6DjCVs4LM3mim4H3WmbHiHkNjCaAT4n4PNchlfeeVLe9GybdVmFj0TE1Xu8FdXF4urFo YD0g== 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=X68BfBZWuDuk07PxoDHIM8bljHRgQl6XTQzSm1zE630=; fh=O+ZMFUiiuyZKsfz7Fw8hsdknZlxcSFSsLsCydBEGD0o=; b=g3u8c/ufk+TpVNotsnhNx4sRYsv2F5a6sfZXlNVdtMMii438cCyXz8lTsH088JJHql Ff73u9yolFWYEKOHF7R2IVrNFSyEvebFDLkG+7d/UR3tRDT2pfAJTVRYe7ASHzvgKvzc fuap8pu2RCFK45P63KmqLhckfaWcBMKj8XPn+zytZcL5SPOTG0JoKl4cILlKVLJTq5nB NaCXFJP1fDRvD8u/wyAAB7kN0C8wVaqbw2QcWkwGimcwwqUCOscBi8VL8Anbg8mppBnD 7GJ+hJ3XPM57dzQFqT4ixapsYASaTB6b80OtnSddMuC4eR+DEofZMLsbSD6k7pcHFjZt JITw==; 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 d2e1a72fcca58-737116b6d1fsi582225b3a.4.2025.03.18.01.13.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 01:13:58 -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 52I8Dr0d020944 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Mar 2025 09:13:55 +0100 Message-ID: <6ce13be6cba7f99471d3eeb3d14722adc702b711.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 11:13:53 +0300 In-Reply-To: References: <20250318061300.12805-1-ubely@ilbers.de> <20250318061300.12805-4-ubely@ilbers.de> <7b66abad-a095-4eb0-bc20-643f9743e5fb@siemens.com> <68af99349e8b348fd22e0167af7c284168096e68.camel@ilbers.de> <0935ecd8-60c5-40ac-bb9d-d52ff49609d9@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_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: njwmiULMQjSi On Tue, 2025-03-18 at 10:51 +0300, Uladzimir Bely wrote: > On Tue, 2025-03-18 at 08:08 +0100, Jan Kiszka wrote: > > On 18.03.25 07:33, Uladzimir Bely wrote: > > > 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 unatt= ended mode on $(tty), it's > > > > > > active > > > > > > on > > > > > > /dev/ttyS0" > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 installer_unattende= d=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 > > >=20 > > > The service itself is correct, the problem is that it's run > > > twice. > > >=20 > > > https://github.com/ilbers/isar/blob/master/meta-isar/recipes-installe= r/deploy-image-service/deploy-image-service.bb#L19-L20 > > >=20 > > > For non-unattended mode it doesn't matter, but in unattended mode > > > one > > > of instances fails and schedules rebooting. > > >=20 > >=20 > > Ah, now I remember. > >=20 > > But, again, we need a proper fix here. Re-entrance needs to be > > detected, > > the core copy job needs to be run only once. And all other > > entrances > > of > > the script skip over the copying core or otherwise wait at the same > > dialog that semi-unattended modes may show. > >=20 > > Jan > >=20 >=20 > OK, I see. >=20 > So, there are two ways to deal with the issue: >=20 > 1. Make one of terminals (for example, first virtual console ttyS1) > main one, e.g.: >=20 > INSTALLER_UNATTENDED_CONSOLE ?=3D "ttyS1" >=20 > And refer to this variable instead of hardcoded value. ...Actually, we could simply check for MACHINE_SERIAL here without adding new variable. >=20 > 2. Unattended installation will be done by the service which was the > first one in the race (first who run bmaptool and locked e.g. > /dev/sda). Other services just should not trigger reboot in this > case, > that means "reboot" should be moved from service unit to script > again. >=20 > As for me, I would prefer option 1 since it's more predictable. >=20 >=20 > --=20 > Best regards, > Uladzimir. >=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/= 6ce13be6cba7f99471d3eeb3d14722adc702b711.camel%40ilbers.de.