CIFS-backed volumes don't work inside a Sysbox container with Shiftfs
@ctalledo is already working on this.
Since Feb 24, 2021.
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
I have detected a suspicious behavior around CIFS shares:
I used portainer UI to create the volume with the following options:
type: cifs
device: //127.0.0.1/dev/legacy
o: username=dev,password=dev,vers=3.1.1,uid=1000,gid=1000,cifsacl,mfsymlinks,cache=none
but the problem is reproduced with default configuration too.
If I mount such share are read-only, it works fine, when used by a user with ID 1000 inside the container run via sysbox-runc.
However, when I switch to the read-write mode, I see the following behavior:
- Attempt to create a file is successful(for example
echo 33 > 42.txt) - Attempt to copy a file from outside of the volume results in
File exists - Attempt to copy a file from within the volume results in
File exists - As a result of operation above, file is created anyway but has size = 0. When I repeat copy operation, it succeeds(size matches, content too)
- The issue is not reproduced if I stop all containers that used the volume via
sysbox-runc(to getshiftfsoff it) and then attach it to a container ran by casual, defaultrunc
This is likely related to shiftfs but I have no idea how to debug the issue - kernel module seems to have no options whatsoever.
I am on:
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
and I used latest release of sysbox, portainer and docker.
Any ideas how to deal with it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.