nestybox / sysbox

An open-source, next-generation "runc" that empowers rootless containers to run workloads such as Systemd, Docker, Kubernetes, just like VMs.
Apache License 2.0
2.78k stars 152 forks source link

sysbox-fs --mountpoint flag seems to be ignored #310

Closed sreya closed 3 years ago

sreya commented 3 years ago

Repro steps:

# sysbox-mgr --data-root /home/coder/sysbox
# sysbox-fs --mountpoint /home/coder/sysboxfs
# sysbox-runc run test
ERRO[0000] failed to create lib container mount: failed to stat mount source at /var/lib/sysboxfs/test/sys/module/nf_conntrack/parameters/hashsize: stat /var/lib/sysboxfs/test/sys/module/nf_conntrack/parameters/hashsize: no such file or directory
rodnymolina commented 3 years ago

Thanks for reporting this one @sreya.

In regards to the mountpoint knob sysbox-fs seems to be working as expected. Problem appears to be with sysbox-runc which is hard-coding the path on which the rootfs components are mounted (i.e. /var/lib/sysboxfs).

Ideally, sysbox-runc should dynamically extract this information from sysbox-fs during the container initialization. However, the container oci-spec's handling stage (which is the one at which the mountpoints are defined) takes place before sysbox-runc has a chance to interact with sysbox-fs, so at first glance looks like the solution would need to rely on the creation of a new grpc interaction between these two components.

Will think about the best course of action and provide an update asap.

ctalledo commented 3 years ago

Issue fixed via the following PRs:

https://github.com/nestybox/sysbox-runc/pull/53 https://github.com/nestybox/sysbox-fs/pull/46 https://github.com/nestybox/sysbox-ipc/pull/19

Closing!