Can't delete an exited Docker container in Crostini. |
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS x86_64 10539.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3383.0 Safari/537.36 Platform: 10539.0.0 (Official Build) dev-channel eve Steps to reproduce the problem: With Docker version 17.09.1-ce, build 19e2cf6, it is not possible to remove a container after it has exited. To reproduce: $ docker run -ti --name bug-demo alpine sh / # exit $ docker ps -a | grep bug-demo bf0a02dac8a6 alpine "sh" 10 seconds ago Exited (0) 7 seconds ago bug-demo $ docker rm bf0a02dac8a6 Error response from daemon: driver "btrfs" failed to remove root filesystem for bf0a02dac8a661f1bcf19432e141dfe887c455fae7ac5fc8e7772393f1273f0d: Failed to destroy btrfs snapshot /var/lib/docker/btrfs/subvolumes for 6c094edd04ca84811e17b35849d24d24279cf2510e7d7991c384c828f2977a76: operation not permitted What is the expected behavior? The exited container should be removed. What went wrong? According to the error message: Error response from daemon: driver "btrfs" failed to remove root filesystem for bf0a02dac8a661f1bcf19432e141dfe887c455fae7ac5fc8e7772393f1273f0d: Failed to destroy btrfs snapshot /var/lib/docker/btrfs/subvolumes for 6c094edd04ca84811e17b35849d24d24279cf2510e7d7991c384c828f2977a76: operation not permitted Did this work before? N/A Chrome version: 67.0.3383.0 Channel: dev OS Version: 10539.0.0 Flash Version: 29.0.0.140
,
Apr 19 2018
,
Apr 24 2018
,
Apr 24 2018
The moby issue happens when "docker in docker", we are using "docker in lxd" so I bet it's similar. According to the comments in the moby issue, we need this: https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-July/009881.html + dylan@ Anyone familiar with btrfs?
,
Apr 24 2018
Is the btrfs filesystem that LXD uses mounted with user_subvol_rm_allowed ? That would explain the error that you're seeing.
,
Apr 24 2018
re #4 - I'm familiar with btrfs - sadly.
,
Apr 24 2018
So this: mkfs.btrfs /dev/vdb || true # The disk may already be formatted. mount /dev/vdb /mnt/stateful || die "Failed to mount stateful disk" should be mkfs.btrfs /dev/vdb || true # The disk may already be formatted. mount -o user_subvol_rm_allowed /dev/vdb /mnt/stateful || die "Failed to mount stateful disk" in https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/project-termina/chromeos-base/termina-lxd-scripts/files/stateful_setup.sh#31
,
Apr 24 2018
That's fast. Thank you very much.
,
Apr 25 2018
np
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/4b362746ad3635468c86b3603e8ff2228c3dc355 commit 4b362746ad3635468c86b3603e8ff2228c3dc355 Author: Jingkui Wang <jkwang@google.com> Date: Thu Apr 26 03:16:55 2018 tatl: fix btrfs mount mount btrfs with user_subvol_rm_allowed. BUG= chromium:834611 TEST=build tatl image and run docker/docker rm Change-Id: Id7c86b6584cd2741dc5dd93e1fb3807b6076efc4 Reviewed-on: https://chromium-review.googlesource.com/1028989 Commit-Ready: Jingkui Wang <jkwang@google.com> Tested-by: Jingkui Wang <jkwang@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org> [rename] https://crrev.com/4b362746ad3635468c86b3603e8ff2228c3dc355/project-termina/chromeos-base/termina-lxd-scripts/termina-lxd-scripts-0.0.1-r17.ebuild [modify] https://crrev.com/4b362746ad3635468c86b3603e8ff2228c3dc355/project-termina/chromeos-base/termina-lxd-scripts/files/stateful_setup.sh
,
May 1 2018
I updated to Chrome/67.0.3396.26 (dev) and this issue is resolved. Lovely! Thanks, everyone.
,
May 1 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Apr 19 2018