FS#53644 - [keepalived] Wrong PIDFile in systemd unit file.
Attached to Project:
Community Packages
Opened by ThecaTTony (ThecaTTony) - Tuesday, 11 April 2017, 19:53 GMT
Last edited by Sébastien Luttringer (seblu) - Saturday, 08 July 2017, 11:50 GMT
Opened by ThecaTTony (ThecaTTony) - Tuesday, 11 April 2017, 19:53 GMT
Last edited by Sébastien Luttringer (seblu) - Saturday, 08 July 2017, 11:50 GMT
|
Details
Description:
keepalived package as a wrong PIDFile in systemd unit file, pointing to /usr/var/run/keepalived.pid. Being that a non standard path for PID files and a non-writable path, the unit enters in failed status. Additional info: * Keepalived 1.3.5-3 Steps to reproduce: Start the default unit with systemctl start keepalived. Logs: abr 06 16:34:16 al01.xxxx.com.ar systemd[1]: Starting LVS and VRRP High Availability Monitor... abr 06 16:34:06 al01.xxxx.com.ar systemd[1]: keepalived.service: Failed with result 'timeout'. abr 06 16:34:06 al01.xxxx.com.ar systemd[1]: keepalived.service: Unit entered failed state. abr 06 16:34:06 al01.xxxx.com.ar systemd[1]: Failed to start LVS and VRRP High Availability Monitor. abr 06 16:34:06 al01.xxxx.com.ar systemd[1]: keepalived.service: Start operation timed out. Terminating. abr 06 16:32:36 al01.xxxx.com.ar systemd[1]: keepalived.service: PID file /usr/var/run/keepalived.pid not readable (yet?) after start: No such file or directory |
This task depends upon
Closed by Sébastien Luttringer (seblu)
Saturday, 08 July 2017, 11:50 GMT
Reason for closing: Fixed
Additional comments about closing: keepalived 1.3.5-5
Saturday, 08 July 2017, 11:50 GMT
Reason for closing: Fixed
Additional comments about closing: keepalived 1.3.5-5
[Unit]
Description=LVS and VRRP High Availability Monitor
After=syslog.target network-online.target
[Service]
Type=forking
PIDFile=@localstatedir@/run/keepalived.pid
KillMode=process
EnvironmentFile=-@sysconfdir@/sysconfig/keepalived
ExecStart=@sbindir@/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
Maybe adding --localstatedir=/var to the 27 line of the PKGBUILD fix the problem.
#27 ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin
systemd[1]: Starting LVS and VRRP High Availability Monitor...
Keepalived[887]: Starting Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2
keepalived.service: PID file /usr/var/run/keepalived.pid not readable (yet?) after start: No such file or directory
keepalived.service: Start operation timed out. Terminating.
Failed to start LVS and VRRP High Availability Monitor.
keepalived.service: Unit entered failed state.
keepalived.service: Failed with result 'timeout'.
Changing PIDFile on /usr/lib/systemd/system/keepalived.service now all it works like a charm.
My keepalived.service unit file now contains this:
[Unit]
Description=LVS and VRRP High Availability Monitor
After=syslog.target network-online.target
[Service]
Type=forking
PIDFile=/var/run/keepalived.pid
KillMode=process
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/bin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target