-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib, watchfrr: Add some additional status messages to systemd #5105
lib, watchfrr: Add some additional status messages to systemd #5105
Conversation
Allow systemd to be informed about operational state so operators can infer a bit about what is going on with FRR from the systemd status cli. sharpd@robot ~/frr4> systemctl status frr ● frr.service - FRRouting Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago Docs: https://frrouting.readthedocs.io/en/latest/setup.html Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS) Status: "FRR Operational" Tasks: 12 (limit: 4915) Memory: 76.5M CGroup: /system.slice/frr.service ├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd ├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000 ├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1 └─32500 /usr/lib/frr/staticd -d -A 127.0.0.1 Please note the `Status: ...` line above. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9129/ This is a comment from an automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base1 Static Analyzer issues remaining.See details at |
@@ -86,6 +86,7 @@ static int systemd_get_watchdog_time(int the_process) | |||
|
|||
void systemd_send_stopping(void) | |||
{ | |||
systemd_send_information("STATUS="); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "stopping %s"
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah. status stays there after you've stopped. so a systemct status frr
would have a status of stopping
after it was stopped, which I found confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah 🙂
@@ -86,6 +86,7 @@ static int systemd_get_watchdog_time(int the_process) | |||
|
|||
void systemd_send_stopping(void) | |||
{ | |||
systemd_send_information("STATUS="); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status == FRR operational indicate that all the daemons are successfully started and running. Also, if a particular daemon is down or continuously restarting, the status would be "restarting". Right ?
if two daemons are restarting at any given instance, does this show two daemons with status as restarting ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
say bgpd died you would see status==restarting bgpd
and on zebra death you would see status == restarting all
Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.
sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
Docs: https://frrouting.readthedocs.io/en/latest/setup.html
Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
Status: "FRR Operational"
Tasks: 12 (limit: 4915)
Memory: 76.5M
CGroup: /system.slice/frr.service
├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
└─32500 /usr/lib/frr/staticd -d -A 127.0.0.1
Please note the
Status: ...
line above.Signed-off-by: Donald Sharp sharpd@cumulusnetworks.com