We are trying to mount lustre filesystem inside running container, and have successfully done this via containers which are running in priviledged mode.
However for those containers which are running in non-privilidged mode, mounting lustre failed, even if all capabilites linux provides -- tens of capabilities -- were included!
Then
- what is difference between "priviledged: True" and "cap_add: all capabilites"?
- Why mounting lustre still fails when all capabilities were added to the container?
Non-Privileged Mode Container:
version: "3"
services:
aiart:
cap_add:
- AUDIT_CONTROL
- AUDIT_READ
- AUDIT_WRITE
- BLOCK_SUSPEND
- CHOWN
- DAC_OVERRIDE
- DAC_READ_SEARCH
- FOWNER
- FSETID
- IPC_LOCK
- IPC_OWNER
- KILL
- LEASE
- LINUX_IMMUTABLE
- MAC_ADMIN
- MAC_OVERRIDE
- MKNOD
- NET_ADMIN
- NET_BIND_SERVICE
- NET_BROADCAST
- NET_RAW
- SETGID
- SETFCAP
- SETPCAP
- SETUID
- SYS_ADMIN
- SYS_BOOT
- SYS_CHROOT
- SYS_MODULE
- SYS_NICE
- SYS_PACCT
- SYS_PTRACE
- SYS_RAWIO
- SYS_RESOURCE
- SYS_TIME
- SYS_TTY_CONFIG
- SYSLOG
- WAKE_ALARM
image: test_lustre:1.1
#privileged: true
ports:
- "12345:12345"
volumes:
- /home/wallace/test-lustre/docker/lustre-client:/lustre/lustre-client