[lxc-users] udevadm trigger corrupts the container
Christoph Mathys
eraserix at gmail.com
Wed Aug 5 08:31:30 UTC 2015
On Mon, Aug 3, 2015 at 5:09 PM, Christoph Mathys <eraserix at gmail.com> wrote:
> I'll try to reproduce it tomorrow and provide a small script.
I've been struggling to reproduce this again on anything but a full
PREEMPT_RT_FULL kernel (lxc 1.0.7, Trusty). As guests in the container
I tried Debian Jessie and Ubuntu Precise.
- For Ubuntu Precise, the error occurs very quick when using
lxc.autodev on a preempt rt kernel. I have not seen it on an ubuntu or
a mainline kernel during my last test runs.
- For Debian Jessie, the error did not occur at all (lxc.autodev is
the default).
So it seems that when using the default settings for lxc for the
respective distributions, one should be fine.
Below the script I used for testing. On my preempt rt kernels and
using a ubuntu precise, this usually fails on the very first
invocation with:
start: Job failed to start
--------------- script start ----------------
set -o errexit
set -o nounset
# 0 use debian jessie inside the container
# 1 use ubuntu precise inside the container
use_ubuntu=1
cont=tmpdev
sudo lxc-destroy -n $cont -f || true
if [ $use_ubuntu -eq 0 ] ; then
sudo lxc-create -n $cont -t debian -- -r jessie
else
sudo lxc-create -n $cont -t ubuntu -- -r precise
echo "lxc.autodev = 1" | \
sudo tee -a /var/lib/lxc/$cont/config > /dev/null
fi
echo starting test
testcount=0
while true; do
sudo lxc-start -n $cont -d
sudo lxc-wait -n $cont -s'RUNNING'
sudo udevadm trigger --action=change
sudo lxc-attach -n $cont --clear-env -- /etc/init.d/procps restart
sudo lxc-stop -n $cont
testcount=$((testcount + 1))
echo "completed test $testcount"
sleep 0.5
done
More information about the lxc-users
mailing list