Closed ryanmark closed 1 year ago
Followup: When I get a shell in the container without running the entrypoint, I find it's impossible (somehow) to rm /var/lib/samba
. I don't receive any error messages, the volume is not mounted read-only, lsattr
and chattr
just complains that the directory is not a tty, there is no @
to suggest some ACL is applied.
So if /var/lib/samba
is somehow set to immutable, the entrypoint script would definitely accidentally create the /var/lib/samba/lib
symlink.
I wonder if there was some recent selinux change on arch that I run these containers on that causes this break, since it seems to affect older versions of this container image that used to work for me.
Interesting, what's the output of ls -al /data/ && ls -al /var/lib/
?
Btw do you use docker restart
or docker compose restart
? It might be the issue.
Was able to repro, will push a fix
@ryanmark Should be fixed with latest release, let me know it it looks good on your side.
@crazy-max thanks for the quick turnaround! I really appreciate it!
Unfortunately this doesn't fix the issue I reported in #48 for me. Instead, I had to make these changes to the entrypoint:
echo "Initializing files and folders"
mkdir -p /data/cache /data/lib
if [ -z "$(ls -A /data/lib)" ]; then
cp -r /var/lib/samba/* /data/lib/
fi
rm -rf /var/lib/cache /var/lib/samba/*
ln -sf /data/cache /var/cache/samba
ln -sf /data/lib/* /var/lib/samba/
For some reason rm -rf /var/lib/samba
does not remove the /var/lib/samba
directory, although it removes everything in the directory.
I haven't been able to figure out the problem, but I suspect the root cause here has something to do with my environment - Running docker on an arch LXC container on ProxMox with a ZFS file system. Apparently this combination of stuff can create issues, overlay fs and zfs don't always get along and ProxMox folks don't recommend using Docker in an LXC.
Gonna use my work around until I can retest in a supported configuration.
Thanks again for your attention!
I am also experiencing this issue. I have the /data
volume on a ZFS filesystem, but am not using ProxMox or LXC.
+1 on that issue I moved docker folder to ZFS and started to experience that issues
I have directory_create_or_exist: mkdir failed on directory /var/lib/samba/private/msg.sock: No such file or directory
line repeated in logs
I tried attach to container and create private directory but I have mkdir: cannot create directory ‘private’: Invalid argument
error
I mounted whole /var/lib/samba/private/
dir info ZFS, and issue resolved
Finaly, I turned zfs docker driver and all started to work as intended
+1 on that issue I moved docker folder to ZFS and started to experience that issues
I have
directory_create_or_exist: mkdir failed on directory /var/lib/samba/private/msg.sock: No such file or directory
line repeated in logsI tried attach to container and create private directory but I have
mkdir: cannot create directory ‘private’: Invalid argument
errorI mounted whole
/var/lib/samba/private/
dir info ZFS, and issue resolvedFinaly, I turned zfs docker driver and all started to work as intended
Sorry can you explain how did you solve this? I have everything on the same boot drive with a simple raspberry pi 4 It wa working and after restarting the pi I'm having the same issue
+1 on that issue I moved docker folder to ZFS and started to experience that issues I have
directory_create_or_exist: mkdir failed on directory /var/lib/samba/private/msg.sock: No such file or directory
line repeated in logs I tried attach to container and create private directory but I havemkdir: cannot create directory ‘private’: Invalid argument
error I mounted whole/var/lib/samba/private/
dir info ZFS, and issue resolved Finaly, I turned zfs docker driver and all started to work as intendedSorry can you explain how did you solve this? I have everything on the same boot drive with a simple raspberry pi 4 It wa working and after restarting the pi I'm having the same issue
if you use ZFS then enable driver in other case idk
Behaviour
I've been using this docker image for a while and it has worked great. When I pulled the last update, the container no longer starts. I tried to revert to some previous versions of the container, but I'm experiencing the same issues.
I believe the problem is related to these lines in the entrypoint.sh. On the created container, these lines seem to symlink
/data/lib
to/var/lib/samba/lib
when it appears the symlink should be to/var/lib/samba
. However the commands themselves appear correct, so I'm not sure why this started happening.Steps to reproduce this issue
Expected behaviour
Container should start samba and samba should run.
Actual behaviour
Samba does not start, failing with the message:
Configuration
docker --version
) : Docker version 20.10.23, build 715524332fdocker-compose --version
) : Docker Compose version 2.15.1uname -a
) : Linux cubert 5.15.83-1-pve #1 SMP PVE 5.15.83-1 (2022-12-15T00:00Z) x86_64 GNU/Linuxdocker-compose.yml
,.env
, ...I only used the files provided here: https://github.com/crazy-max/docker-samba/tree/master/examples/compose
Docker info
Logs