Im trying to get icinga2 to work inside our kubernetes setup. Changing files e.g inside zones.d is a non-option, so instance needs to be talked to exclusively via the API (config packages). The issue is the reload icinga2 does after validating a new config item.
Here is my limited understanding of whats happening: The reload seems to be triggered by a SIGHUP, after which StartReloadProcess() (in /lib/base/application.cpp) is run and a new process is forked (process->Run(&ReloadProcessCallback) ). This process parent PID will be the PID of its creator. This new process will get an additional flag --reload-internal . The parent processes terminate soon after and on a centos VM, systemd becomes the new parent (PID 1) of the icinga2 process. This reparenting doesn’t seem to work inside a docker container, so the container exits as soon as icinga2 terminates.
I assume the “new” icinga2 process shortly exists as a zombie process and gets SIGKILL . This issue is usually solved by running a init process such as dumb-init or tini inside the container. In this case tough i simply can’t get it to work. No matter the setup, the container simply dies.
This is probably just as much a docker question but if you guys have got a icinga2 docker setup running, help would be greatly appreciated.