jenkins-debian-glue: recursive bind mount problem with parallel builds

Michael Prokop mika at debian.org
Thu Aug 27 21:20:27 UTC 2015


Hi!

* Philipp Hahn [Thu Aug 27, 2015 at 03:04:33PM +0200]:

> hope you made it back from DebConf15 allright - thank you for your talk
> about Continuous Delivery.

Thanks!

> I'm currently looking at a problem with jenkins-debian-glue: I build
> multiple packages in parallel, as my host has multiple CPUs. I have the
> strange phenomenon, that the 2nd cowbuilder environment seems to get
> mounted inside the 1st and prevent cleanly unmounting it:
[...]
> In /usr/bin/build-and-provide-package:536 I see this:
> >   local BINDMOUNTS="/tmp/apt-$$ /var/cache/pbuilder/build ${USER_BINDMOUNTS:-}"

> Why is it needed to mount BUILDPLACE recursively?

It's just needed to be able to copy away the build environment of
failing builds (which sadly isn't available directly from
pbuilder/cowbuilder).

> Reading
> <https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt>
> I think the pbuilder mounts should use "mount --make-private".

> I have this work-around added to my /etc/pbuilderrc:
> > mount () {
> >         case "$1" in
> >         -obind) /bin/mount --make-private "$@" ;;
> >         *) /bin/mount "$@"
> >         esac
> > }

Great idea as a workaround, thanks for that!

I've just pushed the following change to jenkins-debian-glue so
/var/cache/pbuilder/build doesn't turn up as bindmount by default
any longer:

  https://github.com/mika/jenkins-debian-glue/commit/a410fbb9b0923f2b05a15f023abbad09f1682a2d

> Thanks for jenkins-debian-glue.

Thanks for your detailed analysis and bug report!

> PS: I haven't yet filed a bug against pbuilder @ Debian.

Could be worth doing so just to make sure people are aware of
pbuilder's behaviour WRT --bindmounts. If "mount --make-private"
could be the default behaviour within pbuilder itself that would be
great IMHO.

Thanks!

regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20150827/392e949d/attachment.sig>


More information about the Pbuilder-maint mailing list