@cryptotaxi247 / netdata-1 / commits / 293351b46

Remove PrivateMounts (#9619)

Since commit #9234 the following has been showing up in my journal logs: > /lib/systemd/system/netdata.service:63: Unknown lvalue 'PrivateMounts' in section 'Service' Running `systemd-analyze verify netdata.service` > /lib/systemd/system/netdata.service:63: Unknown lvalue 'PrivateMounts' in section 'Service' > Attempted to remove disk file system, and we can't allow that. It would appear that the `Attempted to remove disk file system, and we can't allow that.` message is due to a [bug](https://github.com/systemd/systemd/issues/8592) in version 237 of systemd, which is what my Ubuntu 18.04 is currently running. But that doesn't explain the "PrivateMounts" issue. Looking at the [systemd man page](https://www.freedesktop.org/software/systemd/man/systemd.exec.html) for PrivateMounts it would seem that we do not need the `PrivateMounts=true` setting because the service file has `ProtectSystem=full` set: > Other file system namespace unit settings — PrivateMounts=, PrivateTmp=, PrivateDevices=, ProtectSystem=, ProtectHome=, ReadOnlyPaths=, InaccessiblePaths=, ReadWritePaths=, … — also enable file system namespacing in a fashion equivalent to this option. Hence it is primarily useful to explicitly request this behaviour if none of the other settings are used. I have tested this on Ubuntu 18.04 and everything seems to be working fine.

Steve8291 committed Aug 25, 2020 at 07:08 UTC 293351b4618bdb943b63238c16ced94a9242bdec
1 file changed -1
system/netdata.service.in
-1
@@ -61,7 +61,6 @@ ProtectHome=read-only
61 # PrivateTmp break netdatacli functionality. See - https://github.com/netdata/netdata/issues/7587
62 #PrivateTmp=true
63 ProtectControlGroups=true
64 -PrivateMounts=true
64 # We whitelist this because it's the standard location to listen on a UNIX socket.
65 ReadWriteDirectories=/run/netdata
66