[pve-devel] [PATCH cluster v2 1/7] pve-cluster service: remove $DAEMON_OPTS and environment file

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 17 15:02:21 CET 2017


"We use it to pass $DAEMON_OPTS variable to pmxcfs, which is empty per
default.

pmxcfs accepts following options at the moment:

> Usage:
>   pmxcfs [OPTION...]
>
> Help Options:
>   -h, --help           Show help options
>
> Application Options:
>   -d, --debug          Turn on debug messages
>   -f, --foreground     Do not daemonize server
>   -l, --local          Force local mode (ignore corosync.conf,
>   force quorum)

"help" can be safely ignored, as can "foreground" - it would break
the service as the Type is forking and thus systemd would expect that
the starting process returns rather quickly and kill it after the
timeout thinking the start failed when this is set.

Then there is "debug", while this is quite safe to use I do not
expect to find it in the wild. 1) it *spams* the logs in such a heavy
manner that it's useless for a user 2) if wished it can be
enabled/disable on the fly by writing 1/0 to /etc/pve/.debug (which
is what we tell people in docs, et al.  anyway) So this parameter is
also quite safe to ignore, IMO.

Then there is "local", now this can be enabled but is such evil
and wrong so that anybody setting it *permanently*, deserves to
be saved by not allowing him to do so. If somebody uses this we
should hope that he did out of not knowing better and is actually
thankful when he learns what this meant."
https://pve.proxmox.com/pipermail/pve-devel/2017-November/029527.html

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/maintscript         | 1 +
 debian/pve-cluster.service | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
 create mode 100644 debian/maintscript

diff --git a/debian/maintscript b/debian/maintscript
new file mode 100644
index 0000000..32e88ce
--- /dev/null
+++ b/debian/maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/default/pve-cluster 5.0-15 pve-cluster
diff --git a/debian/pve-cluster.service b/debian/pve-cluster.service
index 813b333..cebe4ee 100644
--- a/debian/pve-cluster.service
+++ b/debian/pve-cluster.service
@@ -16,8 +16,7 @@ Before=shutdown.target
 Conflicts=shutdown.target
 
 [Service]
-EnvironmentFile=-/etc/default/pve-cluster
-ExecStart=/usr/bin/pmxcfs $DAEMON_OPTS
+ExecStart=/usr/bin/pmxcfs
 ExecStartPost=-/usr/bin/pvecm updatecerts --silent
 KillMode=mixed
 TimeoutStopSec=10
-- 
2.11.0





More information about the pve-devel mailing list