-
Notifications
You must be signed in to change notification settings - Fork 581
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
WIP: /var/run/icinga2/icinga2.s: reload on POST /v1/reload #7349
base: master
Are you sure you want to change the base?
Conversation
@dnsmichi I have something (this one) to show you and the rest of team Icinga core (one nice day). |
@N-o-X What about this sync reload trigger as alternative to the current async one? |
@cla-bot check |
@julianbrost about this solution: #8973 (comment) |
Feedback
|
I had a quick look at this to see if this could serve as basis for implementing one of the ideas I proposed in #9363, but for that, the listening socket is in the wrong process. General impression after looking at this:
|
Shall I fix this? |
Not right now, please focus on the reviews and comments on your Icinga DB PRs first. |
My question was Shall I fix this? Not Shall I fix this right now? |
Before fixing anything, we should first agree on the approach. Like if we can't come up with another useful purpose of the socket, all that extra HTTP handling might be overkill and something simpler could be done without that extra threading in the umbrella process. |
Overkill or not, it doesn’t reinvent the wheel and curl speaks it. |
My complaint isn't HTTP in itself but rather that in order to implement it, you have to add threads, which you have to tear down again in order to be able to fork, and then restore again. |
Would be not the first ones, would they? |
Given that
I'd rather try to get rid of any existing extra threads in the umbrella process rather than adding more. |
Well I could merge this new ASIO event loop with Application#RunEventLoop(). But this would make the still necessary teardown-fork(2)-setup parts even uglier. Shall I do this? |
Well the idea behind that idea was avoid having to tear down anything. So that doesn't sound like it would move into a direction I'd like to see. |
What about an early forked subprocess instead? Could communicate w/ umbrella via shared memory. |
Now as I saw #9136: What about an mmap(2)ed file in /run with some state and semaphores? This way a new CLI command icinga2 reload could communicate with the daemon w/o requiring it to have an extra thread or process. |
... and wait for the reload to complete before responding to let curl(?) block the reload command.
fixes #7301
resolves #8911
closes #8973