]> git.proxmox.com Git - mirror_ovs.git/commit
ovs-lib.in: Cleanup old socket and pidfiles in stop_daemon
authorTimothy Redaelli <tredaelli@redhat.com>
Mon, 11 Feb 2019 16:22:53 +0000 (17:22 +0100)
committerBen Pfaff <blp@ovn.org>
Mon, 11 Feb 2019 16:44:04 +0000 (08:44 -0800)
commit1f6daa7311bfe683cb563278a2776d21b8564d8f
tree234ab31234be5462ed35e27ae804c21954c1ff2a
parenta8b12ea59c7e7c32bb041480776c032fe341a0ef
ovs-lib.in: Cleanup old socket and pidfiles in stop_daemon

Currently if a client crashes (signal 11) the unix socket (.ctl) and the
pidfile may not be deleted when you use ovs-ctl stop or restart.

Moreover since ovs-appctl is used on a closed socket some warnings are
printed.

This commit deletes the pidfile and the unix socket then returns without
running ovs-appctl if the pidfile point to a not-existing pid.

Reported-at: https://bugzilla.redhat.com/1667845
Reported-by: Candido Campos <ccamposr@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/ovs-lib.in