From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6629320495720300544 X-Received: by 2002:a50:8eca:: with SMTP id x10mr1020154edx.8.1543569638190; Fri, 30 Nov 2018 01:20:38 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:1c0c:: with SMTP id k12-v6ls988864ejg.1.gmail; Fri, 30 Nov 2018 01:20:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/WheryAsNxkJywKoL9pRc6EQRYNKKBlgLemUwpCVFeOyc2rYheq1oZJL3E9jSM45UcqEvxy X-Received: by 2002:a17:906:6006:: with SMTP id o6-v6mr917120ejj.4.1543569637719; Fri, 30 Nov 2018 01:20:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543569637; cv=none; d=google.com; s=arc-20160816; b=e6y+LpORNMJjlzoSI8LNYNZQeqvOGVCGYOX+xsR8UroLKQ4CfvB4i2loz5IVtB1QKX FKZAlcPd0mbDH68/Y7q1oe6o5XtwXtOkE2WjB+t0g0QSRUx6O8PKRs2dEDftexrUYCKF vm5CmeQwW47gDBk8Q6XR4eqnCJ/h6Q/DK6nqOVUwop8PBA1JfOJERdL7nu6VmxZ7+RSV ZDGvee6Os9Xc+I3vDkPQwiZUtcg0lLAQGFBRojAGXWHaH1zCoLZHFGfoBJUbHy0CtVov RF2ffLsq8ucu5nKABPXFj3/AZ8l1vnFkG+ezipAQyJr9drbJ4Fqvphy+0hUkVG6MeOUT RADA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:cc:to :subject; bh=F/HPwNepZtiI0qfCV8cx3IviYoNuD3XSnJnpbEzNPUs=; b=AJkuDOomo8JrTT6xICK0+bfV6369b3oydMMJ2/C87ymukHAqB6YmywlyGNQFu7X5xg /1N6gQwBis/TkTgEt7Fia3jLeHkXJ56+krpxGEbWmb8siwrKRKS+Q5jkAVXziHU46XgC FBWjN22kN231BUl3fDWYbwtmNy95oQvJ2nGXDFUoxpeDnjNUBEUpoykjLgBzkgKqpMwe JslGFoIj8yryjO6vauXwJRAVV/MdJFmiJmIkeNiArwt5egi+U4kHMICwcvqGjbXZPbUs OKCWHXz07e5XSErLOPxmQAWruaN/JYIvMzijg9qKlpglRD/vlZ/w1w297/Bl/cr83pQd L9tQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id i2-v6si143209ejj.1.2018.11.30.01.20.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 01:20:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (nat-ppp-217.71.235.199-satnet-spb.ru [217.71.235.199] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id wAU9KYoQ024338 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 30 Nov 2018 10:20:36 +0100 Subject: Re: [PATCH] isar-bootstrap: Fix and cleanup bind mounting To: Jan Kiszka Cc: Henning Schild , isar-users , Cedric Hombourger References: <6f5714bc-d5f5-c08f-c408-b32bab9169fc@siemens.com> <20181129193929.61a35056@md1za8fc.ad001.siemens.net> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: Date: Fri, 30 Nov 2018 12:20:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181129193929.61a35056@md1za8fc.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: uOvGCGEgigXA 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 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" > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov