Open mcktr opened 4 years ago
Keep in mind that the Umbrella process was mainly invented for Linux/Unix. Windows already had this implemented with the exit 7 and reload handling. AFAIK this behavior on Windows is there for a long time.
You are right, this behavior did not come with the umbrella process handling.
The related code is sitting here:
This terminates the Icinga 2 daemon process without any prior shutdown/stop handling
Might be on purpose. I only remember that Windows services are a tricky beast.
Colleagues, do we care at all? After all only agents are on Windows and they're just command endpoints.
It looks like most tings needed are already there, i.e. you can notify the process and it shuts down. It's just that the wrapper service doesn't do that. Ideally that should only take a few lines of code change, so if someone figures out how to do this in the service and creates a PR to fix it, I'd accept it. It's just that this issue is something I'd prioritize for fixing ourselves.
Describe the bug
On Windows the Icinga 2 daemon does not stop gracefully. The log does not contain information about the shutdown i.e.
Received request to shut down.
is missing. The log just stops without any log message.To Reproduce
Stop the Icinga 2 daemon on Windows.
Powershell:
or
Shell:
or via graphical service manager.
Expected behavior
Having a look into the log file on Windows I would expect something like the following:
But the log just stops without any information about the shutdown.
Your Environment
icinga2 --version
): 2.11.2icinga2 feature list
):api
,checker
&mainlog
Additional context
Running the daemon in foreground mode and stopping it with
CTRL+C
triggers a gracefull shutdown. My guess is that stopping the Icinga 2 Windows service does not send the correct signal to the process to trigger a gracefull shutdown. This maybe is related to the new umbrella process handling.Another guess is that the logger to early on Windows.