API call to set downtime fails during reload

Hi all,

we are currently running the following setup to set downtimes for terminal servers in an auto-scaling:

The Shutdown script on the agent host makes an API call to a HAProxy running on the satellite which is a hop to the master.
This was necessary as the agent hosts can’t reach the master directly and the downtimes are rejected if the satellite is used as endpoint for the API call.

Now we occasionally have the problem that downtimes “don’t turn up” even though the API call returns returns a success like ts1002!06ad14a8-5xaf-4fa8-a986-a012c09429bd' for object 'ts1002 but with no downtime being actually active
Example where at 22:32 the downtime was set via the script:
image

It seems to be in sync with config reloads.

The questions that I’m asking myself is:
May this be a bug that the API returns a successful downtime set and actually does nothing?

Can I, in some way, make this more robust?
Versions used on the master and satellites is 2.13.2

Cheers :slight_smile:

Yes, it is a bug for sure as it should never show success if nothing happened. And it could really be connected to the reload as the reload will load objects in a specific order. I can think of it to be caused by the object already being loaded but downtimes not being ready, but it is only guessing as I never looked in this part of the code.

Thanks for your answer.
Pretty much my train of thought as well :slight_smile:

I have opened an issue: https://github.com/Icinga/icinga2/issues/9366