From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6629320495720300544 X-Received: by 2002:a2e:9053:: with SMTP id n19-v6mr549246ljg.12.1543570584992; Fri, 30 Nov 2018 01:36:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8910:: with SMTP id d16-v6ls732411lji.14.gmail; Fri, 30 Nov 2018 01:36:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/UxPy9G5SvBvjQXsRkNr/lqoGPPWEKmUqXgejx4ihSzsIG5NBZwxmv5qFTpXiCrsAp26rCJ X-Received: by 2002:a2e:9902:: with SMTP id v2-v6mr519973lji.6.1543570584409; Fri, 30 Nov 2018 01:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543570584; cv=none; d=google.com; s=arc-20160816; b=X/I2tfJnvMQ6r61rtO+jNb8vW9I6jEi1Es7di4GSyWI0BtuEVYpZaqhmxFwaNLZ6TM wCLZBb2dKXxQO4lV0kWUrSSs2FGTUGj4aKWD2uIbOUa7fsnn9lurywaXG8UVMPn9xVzL 0jWFoHfHj2yrBGXfSYh6IaF+1SUDmPwffdEIogLsvmpcYUJ/YfyzX6yL9wsbHL3PNiRG 2n3509s1LsCkuX5wssUAvXxhUUwhbn8C1NrMlh4x4PaCrN3rzyygdYWTpg0/XHEOBD+F p0WxOvwC8fosCruPffsQO033EHM6xFEOvLq7xUveSn5bvLdIvi41VxqCq+6lX74gQ+FX CwCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=KBQ2oUi+WwzBJNux1GCzBQyT+yssmcL00UUIIYlfZXA=; b=oAOBxJ2npWxhlIcdx8dbmLpS3UVxQTxOohdEJ7tzCBOs0vF5ZEvMXoNJY2huu/CJWB UyUbFxuGW1kqgWJ47CNgGYg7SH0tVR/QWUDdPiGIDpOop5EuaIyTsMfMF/NAStFALBb9 gsShhsmgYJ1HWU+GScGJDWkaf5CdDoEJnAOql51/qvn/ziTSFipM2hWqguVk9tIrsPug fzazv5fCXMA1nwdYTRPbU0kthHTVjbV33BhE5pnCOdTUkiOGUEBfT+COsMPa1vyvje0Z UXaVNKGevmgIzUb6PBRSkM7t12F+slumJVwxstuZcV1uRAN2PD8tAgEdor1DUyAgKTAg l4wQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id w10si137686lfc.5.2018.11.30.01.36.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 01:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id wAU9aNpM001640 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Nov 2018 10:36:23 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.52]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id wAU9aN8N022119; Fri, 30 Nov 2018 10:36:23 +0100 Date: Fri, 30 Nov 2018 10:36:22 +0100 From: Henning Schild To: "Maxim Yu. Osipov" Cc: Jan Kiszka , isar-users , Cedric Hombourger Subject: Re: [PATCH] isar-bootstrap: Fix and cleanup bind mounting Message-ID: <20181130103622.0536b2a4@md1za8fc.ad001.siemens.net> In-Reply-To: References: <6f5714bc-d5f5-c08f-c408-b32bab9169fc@siemens.com> <20181129193929.61a35056@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: DTE5lQBHvIt9 Am Fri, 30 Nov 2018 12:20:29 +0300 schrieb "Maxim Yu. Osipov" : > Hi Jan, > > I've just tried this patch (on the 'next' with reverted patch > d40a9ac0) and ran "fast" CI > > isar$mount | wc -l > 34 > > isar$./scripts/ci_build.sh -q -f > > CI script hung on CI stage when dpkg-base is modified > causing rebuilding recipes based on dpkg-base. > > The mount reports less (!) mount points than before launching the > script. > > mount | wc -l > 31 Maybe you can share the output of mount, i would blame the "umount --lazy". I am not sure why this was introduces, would be good if we could get rid of it. Henning > Maxim. > > On 11/29/18 9:39 PM, Henning Schild wrote: > > Maybe that is where the leftover mounts came from, and the reverts > > are not required. > > > > Henning > > > > Am Thu, 29 Nov 2018 17:29:17 +0100 > > schrieb "[ext] Jan Kiszka" : > > > >> First, wrong variables were used (there is no BUILDCHROOT_DIR for > >> isar_bootstrap). And then we simply left the mount points active > >> after completing the bootstrap. The led to setup_root_file_system > >> copying all the mount point content over into the buildchroot or > >> rootfs - including base-apt when it was used. > >> > >> Signed-off-by: Jan Kiszka > >> --- > >> > >> This is a precondition for "isar-image: umount base-apt when doing > >> offline build" to work properly. IOW, that patch reveal these bugs. > >> > >> Possibly, this also explains the increasing mount count that was > >> visible in CI. > >> > >> meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 21 > >> +++++++++++---------- 1 file changed, 11 insertions(+), 10 > >> deletions(-) > >> > >> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > >> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index > >> 8ea3b08..da077d0 100644 --- > >> a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ > >> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -185,12 > >> +185,8 @@ isar_bootstrap() { sudo -E flock "${ISAR_BOOTSTRAP_LOCK}" > >> -c "\ set -e > >> if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then > >> - if [ -e "${ROOTFSDIR}" ]; then > >> - umount -R -l "${ROOTFSDIR}/dev" || true > >> - umount -l "${ROOTFSDIR}/proc" || true > >> - umount -R -l "${ROOTFSDIR}/sys" || true > >> - rm -rf "${ROOTFSDIR}" > >> - fi > >> + rm -rf "${ROOTFSDIR}" > >> + > >> if [ ${IS_HOST} ]; then > >> ${DEBOOTSTRAP} $debootstrap_args \ > >> ${@get_distro_components_argument(d, > >> True)} \ @@ -247,17 +243,22 @@ isar_bootstrap() { > >> "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" > >> > >> # update APT > >> - mount --rbind /dev ${BUILDCHROOT_DIR}/dev > >> - mount --make-rslave ${BUILDCHROOT_DIR}/dev > >> + mount --rbind /dev ${ROOTFSDIR}/dev > >> + mount --make-rslave ${ROOTFSDIR}/dev > >> mount -t proc none ${ROOTFSDIR}/proc > >> - mount --rbind /sys ${BUILDCHROOT_DIR}/sys > >> - mount --make-rslave ${BUILDCHROOT_DIR}/sys > >> + mount --rbind /sys ${ROOTFSDIR}/sys > >> + mount --make-rslave ${ROOTFSDIR}/sys > >> > >> export DEBIAN_FRONTEND=noninteractive > >> chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y > >> chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade > >> -y \ -o Debug::pkgProblemResolver=yes > >> > >> + umount -R -l "${ROOTFSDIR}/dev" > >> + umount -l "${ROOTFSDIR}/proc" > >> + umount -R -l "${ROOTFSDIR}/sys" > >> + umount -l "${ROOTFSDIR}/base-apt" || true > >> + > >> # Finalize debootstrap by setting the link in deploy > >> ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}" > >> fi" > > > >