Bug #9836
closedOpenBGPD package deamon starts twice
100%
Description
After reboot with OpenBGPD package
the bgpd starts twice.
logfile:
Oct 20 11:44:50 router bgpd53729: startup
Oct 20 11:44:50 router bgpd54011: session engine ready
Oct 20 11:44:50 router bgpd53907: route decision engine ready
Oct 20 11:44:50 router bgpd56386: startup
Oct 20 11:44:50 router bgpd56492: route decision engine ready
Oct 20 11:44:50 router bgpd56586: session engine ready
Oct 20 11:44:50 router bgpd56386: rereading config
Oct 20 11:44:50 router bgpd53729: rereading config
Oct 20 11:44:50 router bgpd53729: cannot bind to 0.0.0.0:179: Address already in use
Oct 20 11:44:50 router bgpd56386: control_init: chmod: /var/run/bgpd.sock: No such file or directo
ry
Oct 20 11:44:50 router bgpd56386: fatal in parent: control socket setup failed
Oct 20 11:44:50 router bgpd56586: fatal in SE: session_dispatch_imsg: pipe closed
Oct 20 11:44:50 router bgpd56492: fatal in RDE: rde_dispatch_imsg_parent: pipe closed
Oct 20 11:44:50 router bgpd54011: SE reconfigured
The sessions with neighbors that have set "local-address" gets establised,
but the the socket for bgpdctl "/var/run/bgpd.sock" is missing,
Shell and WEB-UI reports:
bgpctl: connect: /var/run/bgpd.sock: No such file or directory
openbgpd_restart();
is faiing in this case.
Suggested fixes:
a) avoid to start the deamon twice.
b) check the exitcode of "bgpctl", it fails then kill and restart it.
c) check the presense /var/run/bgpd.sock, if missing then kill and restart it.
as as workaround I added a "restartbgpd" for the PWP shell.
Files