Closed silvester747 closed 1 year ago
Docker compose configuration:
name: librenms
services:
db:
image: mariadb:latest
container_name: librenms_db
command:
- "mysqld"
- "--innodb-file-per-table=1"
- "--lower-case-table-names=0"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
volumes:
- "${DB_VOLUME}:/var/lib/mysql"
environment:
- "TZ=${TZ}"
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
- "MYSQL_USER=${MYSQL_USER}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
restart: always
redis:
image: redis:5.0-alpine
container_name: librenms_redis
environment:
- "TZ=${TZ}"
restart: always
rrdcached:
image: crazymax/rrdcached
container_name: librenms_rrdcached
volumes:
- "${RRD_VOLUME}:/data"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "LOG_LEVEL=LOG_INFO"
- "WRITE_TIMEOUT=1800"
- "WRITE_JITTER=1800"
- "WRITE_THREADS=4"
- "FLUSH_DEAD_DATA_INTERVAL=3600"
restart: always
msmtpd:
image: crazymax/msmtpd:latest
container_name: librenms_msmtpd
env_file:
- "stack.env"
restart: always
librenms:
image: librenms/librenms:latest
container_name: librenms
hostname: librenms
cap_add:
- NET_ADMIN
- NET_RAW
ports:
- target: 8000
published: 8000
protocol: tcp
depends_on:
- db
- redis
- rrdcached
- msmtpd
volumes:
- "${DATA_VOLUME}:/data"
env_file:
- "stack.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
restart: always
dispatcher:
image: librenms/librenms:latest
container_name: librenms_dispatcher
hostname: librenms-dispatcher
cap_add:
- NET_ADMIN
- NET_RAW
depends_on:
- librenms
- redis
volumes:
- "${DATA_VOLUME}:/data"
env_file:
- "stack.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "DISPATCHER_NODE_ID=dispatcher1"
- "SIDECAR_DISPATCHER=1"
restart: always
syslogng:
image: librenms/librenms:latest
container_name: librenms_syslogng
hostname: librenms-syslogng
cap_add:
- NET_ADMIN
- NET_RAW
depends_on:
- librenms
- redis
ports:
- target: 514
published: 514
protocol: tcp
- target: 514
published: 514
protocol: udp
volumes:
- "${DATA_VOLUME}:/data"
env_file:
- "stack.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SYSLOGNG=1"
restart: always
snmptrapd:
image: librenms/librenms:latest
container_name: librenms_snmptrapd
hostname: librenms-snmptrapd
cap_add:
- NET_ADMIN
- NET_RAW
depends_on:
- librenms
- redis
ports:
- target: 162
published: 162
protocol: tcp
- target: 162
published: 162
protocol: udp
volumes:
- "${DATA_VOLUME}:/data"
env_file:
- "stack.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SNMPTRAPD=1"
restart: always
I have opened a support case with Synology as well to get aufs replaced with overlay2. In the meantime I hope we can come up with a fix for these docker images to allow running the required commands on aufs. The setuid approach works, but I am not sure whether that is acceptable for everybody.
Synology has responded that currently they do not support overlay2 yet, but my request has been passed on to the development team. There seems to be support for the btrfs backend, but that requires a DiskStation with btrfs support and a btrfs volume. Migrating my current ext4 volumes is not something I plan to do on the short term.
Would adding the setuid
bits be acceptable for the Docker image? I can create a PR for it.
aufs
storage driver is deprecated for almost 6 years and has been removed in recent version of Docker: https://github.com/moby/moby/pull/45342
Behaviour
The dispatcher cannot run
fping
andfping6
on Synology devices. For some reason the version of Docker for Synology NAS devices is hardcoded to run with theaufs
storage backend. This backend does not supportsetcap
. Instead it is required to usesetuid
to allow runningfping
andfping6
. Would it be possible to adjust the images for this?Steps to reproduce this issue
Expected behaviour
Distributed polling should work.
Actual behaviour
Polling fails with a message that the host is not reachable. Validating the configuration of librenms indicates
fping
andfping6
cannot be executed without root.Configuration
docker --version
) : 20.10.3, build 55f0773docker-compose --version
) : 1.28.5, build 24fb474euname -a
) : Linux DS920 4.4.180+ #42962 SMP Tue Sep 20 22:35:56 CST 2022 x86_64 GNU/Linux synology_geminilake_920+docker-compose.yml
,.env
, ...Docker info
Logs