From c18cd9b6250a8aa985d0bee407d7d13891c8b296 Mon Sep 17 00:00:00 2001 From: Cesar Talledo Date: Wed, 7 Jul 2021 00:55:01 +0000 Subject: [PATCH] Don't assume sysbox-fs FUSE dir is at /var/lib/sysboxfs. The location of the sysbox-fs FUSE dir is configurable via the sysbox-fs command line. Thus, do not assume it's under the default location ("/var/lib/sysboxfs") and instead let sysbox-fs determine its location. Related to sysbox issue #310. Signed-off-by: Cesar Talledo --- scr/sysbox | 2 -- tests/Dockerfile.centos-8 | 3 +-- tests/Dockerfile.debian-bullseye | 3 +-- tests/Dockerfile.debian-buster | 3 +-- tests/Dockerfile.fedora-31 | 3 +-- tests/Dockerfile.fedora-32 | 3 +-- tests/Dockerfile.ubuntu-bionic | 3 +-- tests/Dockerfile.ubuntu-focal | 3 +-- 8 files changed, 7 insertions(+), 16 deletions(-) diff --git a/scr/sysbox b/scr/sysbox index a1406b65..01ade31b 100755 --- a/scr/sysbox +++ b/scr/sysbox @@ -212,8 +212,6 @@ function sysbox_mgr_start() { function sysbox_fs_start() { - mkdir -p /var/lib/sysboxfs - declare -a fs_options=("--log /var/log/sysbox-fs.log") if [ $TEST_MODE -eq 1 ]; then diff --git a/tests/Dockerfile.centos-8 b/tests/Dockerfile.centos-8 index eab02943..348d4c6b 100644 --- a/tests/Dockerfile.centos-8 +++ b/tests/Dockerfile.centos-8 @@ -142,8 +142,7 @@ RUN go get github.com/go-delve/delve/cmd/dlv RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.debian-bullseye b/tests/Dockerfile.debian-bullseye index 18c7634a..88e6ccaa 100644 --- a/tests/Dockerfile.debian-bullseye +++ b/tests/Dockerfile.debian-bullseye @@ -166,8 +166,7 @@ RUN go get github.com/go-delve/delve/cmd/dlv RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.debian-buster b/tests/Dockerfile.debian-buster index 09c4f78d..10e64597 100644 --- a/tests/Dockerfile.debian-buster +++ b/tests/Dockerfile.debian-buster @@ -161,8 +161,7 @@ RUN go get github.com/go-delve/delve/cmd/dlv RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.fedora-31 b/tests/Dockerfile.fedora-31 index eca7f08f..56699847 100644 --- a/tests/Dockerfile.fedora-31 +++ b/tests/Dockerfile.fedora-31 @@ -143,8 +143,7 @@ RUN go get github.com/go-delve/delve/cmd/dlv RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.fedora-32 b/tests/Dockerfile.fedora-32 index 167f3a73..3b5ec688 100644 --- a/tests/Dockerfile.fedora-32 +++ b/tests/Dockerfile.fedora-32 @@ -144,8 +144,7 @@ RUN go get github.com/go-delve/delve/cmd/dlv RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.ubuntu-bionic b/tests/Dockerfile.ubuntu-bionic index 43ec8ee2..9d063afa 100644 --- a/tests/Dockerfile.ubuntu-bionic +++ b/tests/Dockerfile.ubuntu-bionic @@ -193,8 +193,7 @@ RUN curl -s https://api.github.com/repos/tomwright/dasel/releases/latest | grep RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin diff --git a/tests/Dockerfile.ubuntu-focal b/tests/Dockerfile.ubuntu-focal index a24a60e3..2a4d337b 100644 --- a/tests/Dockerfile.ubuntu-focal +++ b/tests/Dockerfile.ubuntu-focal @@ -193,8 +193,7 @@ RUN curl -s https://api.github.com/repos/tomwright/dasel/releases/latest | grep RUN sed -i 's/^#define SECCOMP_IOCTL_NOTIF_ID_VALID[ \t]*SECCOMP_IOW(2, __u64)/#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)/g' /usr/include/linux/seccomp.h # sysbox env -RUN useradd sysbox \ - && mkdir -p /var/lib/sysboxfs +RUN useradd sysbox # test scripts COPY scr/testContainerInit /usr/bin