keepalived停掉后,发现状态依然是running
查看keepalived的启动service文件systemctl cat keepalived
内容如下:
# /usr/lib/systemd/system/keepalived.service
Description=LVS and VRRP High Availability Monitor
After=syslog.target network-online.target
Type=forking
PIDFile=/var/run/keepalived.pid
KillMode=process
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
WantedBy=multi-user.target
把这一行(KillMode=process)注释掉即可,这行目前只会停止主进程而不会关闭子进程,所以才会出现这个情况
页:
[1]