Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#988354: schroot: fails to enter zfs source chroots

35 views
Skip to first unread message

Sebastian Ramacher

unread,
May 11, 2021, 5:00:03 AM5/11/21
to
Package: schroot
Version: 1.6.10-12
Severity: normal

Thanks for adding zfs support to schroot. While entering a zfs-backed
chroot works fine, i.e., schroot -c unstable-amd64-sbuild, trying to
enter the source chroot fails:

$ schroot -c source:unstable-amd64-sbuild
E: 10mount: filesystem 'tank/debian/schroot/unstable-amd64-sbuild' cannot be mounted using 'mount'.
E: 10mount: Use 'zfs set mountpoint=legacy' or 'zfs mount tank/debian/schroot/unstable-amd64-sbuild'.
E: 10mount: See zfs(8) for more information.
E: unstable-amd64-sbuild-74f80dc1-c405-4ec6-a7f5-b533ea723811: Chroot setup failed: stage=setup-start

Cheers

-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (601, 'testing'), (500, 'testing-security')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-6-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages schroot depends on:
ii libboost-filesystem1.74.0 1.74.0-9
ii libboost-iostreams1.74.0 1.74.0-9
ii libboost-program-options1.74.0 1.74.0-9
ii libc6 2.31-11
ii libgcc-s1 10.2.1-6
ii libpam0g 1.4.0-7
ii libstdc++6 10.2.1-6
ii libuuid1 2.36.1-7
ii lsb-base 11.1.0
ii schroot-common 1.6.10-12

schroot recommends no packages.

Versions of packages schroot suggests:
pn aufs-tools | unionfs-fuse <none>
pn btrfs-progs <none>
ii debootstrap 1.0.123
ii lvm2 2.03.11-2.1
pn qemu-user-static <none>
ii zfsutils-linux 2.0.3-8

-- Configuration Files:
/etc/schroot/sbuild/fstab changed [not included]
/etc/schroot/setup.d/05btrfs changed [not included]

-- no debconf information

--
Sebastian Ramacher

Florian Ernst

unread,
Mar 29, 2022, 12:30:04 PM3/29/22
to
Hello there,

On Tue, May 11, 2021 at 10:48:00AM +0200, Sebastian Ramacher wrote:
> Thanks for adding zfs support to schroot. While entering a zfs-backed
> chroot works fine, i.e., schroot -c unstable-amd64-sbuild, trying to
> enter the source chroot fails:
> [...]

FWIW, this works for me, so it might simply be that some additional
configuration is required. Thus the following just for reference:

My bash history tells me that I actually applied

# zfs set mountpoint=legacy zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild

when migrating to a ZFS-based schroot setup as per

# cat /etc/schroot/chroot.d/unstable-amd64-sbuild-*
[unstable-amd64-sbuild]
description=Debian unstable/amd64 autobuilder
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
type=zfs-snapshot
zfs-dataset=zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild
mount-options=-o relatime,async
command-prefix=/var/cache/pbuilder/ccache/sbuild-setup,eatmydata
aliases=UNRELEASED,sid,rc-buggy,experimental

and indeed it just works for me, cf. for illustration

$ schroot -c unstable-amd64-sbuild # normal access
(unstable-amd64-sbuild)fernst@fernst:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
zfspool/SYSTEM/srv/chroot/unstable-amd64-sbuild/schroot-unstable-amd64-sbuild-caeca563-8016-4209-a022-77f59f5d4058 zfs 65G 359M 64G 1% /
tmpfs tmpfs 16G 0 16G 0% /dev/shm
zfspool/SYSTEM/var zfs 50G 33G 18G 65% /build
zfspool/SYSTEM/home/fernst zfs 264G 201G 64G 76% /home/fernst/debian
/dev/mapper/lvmpool-root ext4 15G 11G 4.0G 73% /etc/sudoers.d/local-reprotest
(unstable-amd64-sbuild)fernst@fernst:~$ # CTRL+D here
exit
$ schroot -c source:unstable-amd64-sbuild # accessing the source chroot as a normal user
E: Access not authorised
I: You do not have permission to access the schroot service.
I: This failure will be reported.
$ sudo schroot -c source:unstable-amd64-sbuil # accessing the source chroot via sudo
(unstable-amd64-sbuild)root@fernst:/home/fernst# touch /blubber # apply some change
(unstable-amd64-sbuild)root@fernst:/home/fernst# # CTRL+D here
exit
$ schroot -c unstable-amd64-sbuild
(unstable-amd64-sbuild)fernst@fernst:~$ ls -al /blubber # check whether the above change persisted
-rw-r--r-- 1 root root 0 Mar 29 16:09 /blubber
(unstable-amd64-sbuild)fernst@fernst:~$ # CTRL+D here
exit

The only glitch I had so far with ZFS-based schroot I just reported in
<https://bugs.debian.org/1008616>, and there is a simple fix available.

Cheers,
Flo
signature.asc
0 new messages