OK, trying this overnight:

#!/bin/sh
set -e
set -x
# lxc-create -t ubuntu is kind of fragile, might need to retry on network error
#lxc-create -t ubuntu -n orig -- -r xenial

# Grant self sudo
#echo "ubuntu ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a
/var/lib/lxc/orig/rootfs/etc/sudoers

mkdir -p /shared
chmod 777 /shared

# ok, now try to reproduce the problem
n=0
while sleep 1
do
    n=`expr $n + 1`
    lxc-start-ephemeral \
             --orig orig \
             --name foo \
             --storage-type dir \
             --union-type aufs \
             --bdir /shared \
             --user ubuntu \
             -- \
             sudo sh -c "id; if ! rm -rf /foobar; then cat
/proc/mounts > mounts.txt; tar -czf /shared/bug$n.tgz mounts.txt
/sys/module/aufs; fi"
done

On Mon, May 23, 2016 at 8:56 AM,  <sf...@users.sourceforge.net> wrote:
>
> Hello Dan,
>
> Dan Kegel:
>> I recently started trying to mount ephemeral lxc containers on tmpfs,
>> and fairly often, a script inside the container launched by
>> lxc-start-ephemeral will fail early with
>>
>> rm: failed to get attributes of '/': Stale file handle
>
> Unfortunately I don't know much about LXC, particulary how LXC uses
> aufs. Instead of rm, run "cat /proc/mounts" and others to collect these
> info please.
>
> (from aufs README)
> ----------------------------------------------------------------------
> When you have any problems or strange behaviour in aufs, please let me
> know with:
> - /proc/mounts (instead of the output of mount(8))
> - /sys/module/aufs/*
> - /sys/fs/aufs/* (if you have them)
> - /debug/aufs/* (if you have them)
> - linux kernel version
>   if your kernel is not plain, for example modified by distributor,
>   the url where i can download its source is necessary too.
> - aufs version which was printed at loading the module or booting the
>   system, instead of the date you downloaded.
> - configuration (define/undefine CONFIG_AUFS_xxx)
> - kernel configuration or /proc/config.gz (if you have it)
> - behaviour which you think to be incorrect
> - actual operation, reproducible one is better
> - mailto: aufs-users at lists.sourceforge.net
> ----------------------------------------------------------------------
>
>
> J. R. Okajima

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j

Reply via email to