From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6629320495720300544 X-Received: by 2002:a17:906:6899:: with SMTP id n25-v6mr554764ejr.11.1543516771544; Thu, 29 Nov 2018 10:39:31 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:89cf:: with SMTP id h15ls806747edh.7.gmail; Thu, 29 Nov 2018 10:39:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/WoCrKWUltN2RVE9kTxfGa8J1BOPSwlyXRyccgseZW0LBCyJptQn7G+VkLeEtNi+GhOxYff X-Received: by 2002:a50:aeaf:: with SMTP id e44mr618464edd.4.1543516771118; Thu, 29 Nov 2018 10:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543516771; cv=none; d=google.com; s=arc-20160816; b=B0U8X3UU+aptK2o71o0zHDyZHJNKATVsVh7A34IzW32j18GPv5q7V9cyw1/cOBpeRE ocoj2OiR58T92Q4uB/lKunbvGloyGCvsXQYLx9g+NZ9Wq0F7CRicVx6BJzENSifFcvyU MxtQk1qk99jOpS8Eh2CG8wN+z8iOrRay9iCauw+iLAdcGpxMJtVufhSDUVA+kWR0M8+c qYQZw4Ka9TVY+A9kOFm1KogjxrpypnfdBl1murrRJcfdNQ4nSGOf/FVDMGWRjRXxLqM0 Owx3m3CHuHS+M/zrPznf9BZoZ/sWfOof3YiaUvnPZelaIkCSQ1l4PTSp6XN9Bp5xWlnM sIDQ== 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=nSsiFOzhNlF8Ib6dt+tA1qJbFVikd0TopAoQsCd8ISU=; b=UVt6eBbeHISwMz53r+fyWuqaYc4XyGIALuYXpuerp/2ibnKRpcxAPyYyVtaiL16gi2 aPhBvtlyfFVRwRvBvZsN0J6IiLzmeNLh0Zpfyyj7u+kUx9QKdku4vUQ2dJEcv3jklnkV QqFjd5IMv/AgJrYVu7zFLAcQbrTvwNkfo39B18JfggaozehFQcR12J/wQscQsqzTX3tg TiK5UP4bjse7KLNmca1TnFhFxdG6TmN5rMcZIqq0svUBc3oRqE6g0SrgVJIKt1au9tKB 684t25knm/5lfcpwPyFMiLTY/lXl6goZ+fiB++fLKpRVR7Tmc3tUlChN7JxzZjWCRl0n +xLw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id m24si143463edc.3.2018.11.29.10.39.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:39:31 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id wATIdUY0019360 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 19:39:30 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.223]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wATIdUj5014383; Thu, 29 Nov 2018 19:39:30 +0100 Date: Thu, 29 Nov 2018 19:39:29 +0100 From: Henning Schild To: "[ext] Jan Kiszka" Cc: isar-users , Maksim Osipov , Cedric Hombourger Subject: Re: [PATCH] isar-bootstrap: Fix and cleanup bind mounting Message-ID: <20181129193929.61a35056@md1za8fc.ad001.siemens.net> In-Reply-To: <6f5714bc-d5f5-c08f-c408-b32bab9169fc@siemens.com> References: <6f5714bc-d5f5-c08f-c408-b32bab9169fc@siemens.com> 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: KtgRxaoOdhmr 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"