[pkg-lxc-devel] Bug#961584: lxc-stop fails with exit code 1

Inaki Malerba inaki at malerba.space
Wed May 27 10:25:11 BST 2020


El 26/5/20 a las 23:35, Antonio Terceiro escribió:
> is there an easy/documented way of reproducing the salsa ci environment
> (i.e. lxc working under docker) locally? 

Attached is a Dockerfile. It should be sufficient to reproduce the problem.

Changing the FROM statement from debian:unstable to debian:testing is
enough to make it work. It needs to be run as privileged.

$ docker build -t autopkgtest - < Dockerfile
$ docker run --rm --privileged autopkgtest

-- 
- ina
-------------- next part --------------
FROM debian:unstable

ENV SALSA_CI_AUTOPKGTEST_LXC https://salsa.debian.org/salsa-ci-team/autopkgtest-lxc
ENV LXC_PATH /lxc

# Download and configure container.
RUN apt-get update && apt-get install -y wget
RUN wget --progress=dot:giga ${SALSA_CI_AUTOPKGTEST_LXC}/-/jobs/artifacts/master/raw/artifacts/lxc.tar?job=stable -O lxc.tar
RUN mkdir ${LXC_PATH} && tar xf lxc.tar -C ${LXC_PATH}
RUN sed -i "/lxc.rootfs.path/ s at dir:.*/lxc/@dir:${LXC_PATH}/@" ${LXC_PATH}/autopkgtest-stable-amd64/config

# Install lxc.
RUN apt-get update && apt-get install -y eatmydata
RUN eatmydata apt-get install -y lxc iptables

RUN echo "lxc.lxcpath=${LXC_PATH}" | tee -a /etc/lxc/lxc.conf
RUN echo 'USE_LXC_BRIDGE="true"' | tee /etc/default/lxc-net

RUN echo 'tmpfs /sys/fs/cgroup tmpfs rw,relatime,seclabel' | tee /etc/fstab
RUN echo 'cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset,x-mount.mkdir' | tee -a /etc/fstab
RUN echo 'cgroup /sys/fs/cgroup/devices cgroup rw,relatime,devices,x-mount.mkdir' | tee -a /etc/fstab

# This steps need to be run as privileged.
CMD umount -R /sys/fs/cgroup && mount -a && \
    /etc/init.d/lxc-net start && \
    /etc/init.d/lxc start && \
    lxc-start autopkgtest-stable-amd64 && \
    lxc-stop autopkgtest-stable-amd64 && \
    echo "ok"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-lxc-devel/attachments/20200527/de81cf95/attachment-0001.sig>


More information about the Pkg-lxc-devel mailing list