osixia / docker-keepalived

Keepalived container image 🐳🌴
MIT License
395 stars 143 forks source link

Singals are ignored, breaking monitoring systems #50

Open sbienkow opened 3 years ago

sbienkow commented 3 years ago

Monitoring exporters, like this one: https://github.com/cafebazaar/keepalived-exporter rely on being able to send signal to docker container in order for keepalived to dump its stats/data files.

Because in this image the PID1 is merely a startup process (it doesn't exec keepalived), it is the one that receives the signals. It ignores those signals completely, causing it to fail. I believe fixing it might require allowing containers to register custom signal handlers here: https://github.com/osixia/docker-light-baseimage/blob/master/image/tool/run#L892-L894

TL;DR: I'd expect running docker kill -s 12 keepalived to cause it to create /tmp/keepalived.stats.

nser77 commented 1 year ago

HI, working fine for me with this PR: #60

Send signal:

 docker kill -s 10 keepalived

Result:

[...]
Fri Apr 21 06:51:48 2023: Printing parent data for process(1) on signal
Fri Apr 21 06:51:48 2023: Printing VRRP data for process(7) on signal
[...]