r3kzi / clamav-prometheus-exporter

Prometheus-Exporter for ClamAV
Apache License 2.0
26 stars 21 forks source link

Container does not terminate on host reboot/shutdown #10

Open logopk opened 2 years ago

logopk commented 2 years ago

Apparently clamav-prometheus-exporter does not react properly to kill -SIGTERM

So far with old containerd < v1.5 this did not matter, as containerd did not react properly on reboot when used in docker v20.10.x with live-restore. (https://github.com/containerd/containerd/issues/5502)

Now that this is fixed, clamav-prometheus-exporter is the last container hanging.

When I enter the container and send kill -SIGTERM nothing happens.

Can you try and clarify, if that is something I can fix on my side?

Thank You!

logopk commented 2 years ago

I have to say that I run this with amd64 emulation via qemu on an mac m1 pro

▶ docker exec -ti clamav-exporter sh
/bin $ ps -aef
PID   USER     TIME  COMMAND
    1 promethe  0:00 {clamav-promethe} /usr/bin/qemu-x86_64 /bin/clamav-prometheus-exporter --clamav-address=clamav
   16 promethe  0:00 {sh} /usr/bin/qemu-x86_64 /bin/sh
   23 promethe  0:00 /bin/ps -aef
logopk commented 2 years ago

The host on the console logs

systemd-shutdown[1]: Waiting for process: clamav-promethe