Repository navigation
Conversation
|
Please have a look! Without this, we can't make progress in Icinga DB Icinga/icingadb#1112. |
Why that though? If Icinga Notifications requires some minimal version of Icinga 2 anyway, why can't/shouldn't this just be ≥ v2.16.x (for some x)? This doesn't sound like a security/critical/important fix to me (which should usually be the rule of thumb for the older support branch). |
Because Icinga DB v1.4.0 already bumped the required version to v2.15 due to the dependencies support and we don't want to force users to v2.16.x just for this.
It is important! After all, the event correlation will be one of the major features available with Icinga Notifications v1.0. |
I've checked this and we can't do that as that would require changing the response format.
Quote from #11006 (comment):
EDIT: See also Icinga/icingadb-web#1419. |
3c712c6 to
eab186e
Compare
eab186e to
38e245a
Compare
|
Sorry, I had to change the last ACK change check to make it exclusive, i.e., reject timestamp ≤ last ACK time. |
38e245a to
9efe8fb
Compare
9efe8fb to
5972265
Compare
5972265 to
b9a977e
Compare
|
Ok, just the changes the previous version of this PR aren't enough for Icinga DB, so I had to add more info to the
|
|
See also Icinga/icingadb#1193 to see how these are going to be used in Icinga DB. |
b9a977e to
b665733
Compare
|
I've now changed the queuing code to use an explicit trigger bits instead of the previously used useless state attributes. |
|
Sorry, still not working as expected. |
f9c79f7 to
c73ae21
Compare
|
That should be it, I think now :). |
c73ae21 to
53bb5b4
Compare
|
Fixed one last discovered bug while testing it. The |
1e4c5e2 to
98a0eb0
Compare
|
I've also dropped the metadata from the initial config dump since there's no way to tell there which state to use instead of a blatant lie claiming that it's a state change, which caused sometimes an event ID to be generated that doesn't and wasn't ever generated by Icinga 2, causing a foreign key violation errors. |
jschmidt-icinga
left a comment
There was a problem hiding this comment.
This looks almost good to me now.
One clarification and one nitpick about the internal interface next.
98a0eb0 to
c91bdc8
Compare
jschmidt-icinga
left a comment
There was a problem hiding this comment.
This looks good to me now.
One thing I noticed on my second read is that the status code returned when set_time is out of bounds is 400, which IMHO is correct, but for an out of bounds expiry timestamp 409 (conflict?!) is returned. Just as a note, I don't want you to change either.
However, I think this PR would justify another review from @julianbrost too since he has more experience here and might want to have a say on the broader architecture questions.
I noticed that too, and was confused and had to really re-check whether 409 is maybe another code for 400 but na, and I don't know why it uses 409 in that case and I didn't change it because I didn't want to argue about it in this PR. |
What is this for? I didn't see an explanation for this even after going over linked issues and comments.
What does that mean?
Is there anything in v2.16.x that should stop you from updating? I mean users will have to update anyway. so if they have to update to v2.15.42 or v2.16.23 shouldn't make much of a difference? According to https://icinga.com/docs/icinga-2/latest/doc/16-upgrading-icinga-2/#upgrading-to-v216, that should be an easy upgrade in that you would only get some deprecation warnings, but no need to change anything.
Overall, Icinga Notifications sounds more like a feature than a bug fix for me. So for me, backporting it to 2.16 is already an exception and backporting to 2.15 would be very odd. Edit: Also, are you aware that backporting this to 2.15 would be very nasty given the reworks in Icinga DB in v2.16.0? |
Really #11035 (comment)? I think, I've explained this more than enough and provided enough sources for it, so I don't know what else should I include to make that clear.
It means, only Icinga 2 knows the ACK set time since it just uses NOW() when acknowledging the checkable. Now, Icinga DB as well as Icinga DB Web needs that timestamp, so I've extended the API action to optionally provide own set time, so Icinga DB Web knows which ACK set is Icinga 2 going to use.
Nothing, except, well, they are two different major versions. Aren't you guys currently struggling to help a customer upgrade from v2.13.x or something to v2.15.x instead of directly to v2.16.x because of some problems v2.16 had/has while v2.15 doesn't? I don't really care whether this should really be back ported to v2.15 because ultimately I'm not the one who has/will have the last word on this, so 🤷♂️. //cc @nilmerg
No, I actually wasn't aware of that, but see my previous paragraph. |
Most of this PR adds information to a Redis stream. What makes this particular value special so that it needs this additional treatment? Nothing in that comment explains the big picture.
Why does it need to hijack something? What exactly does that mean? As in: if I click this thing in Icinga Web, this is supposed to cause action A, B, and C in the future. The linked issues are very sparse on information unfortunately.
Ah, I was reading that as "access to that API" and "clients other than Icinga Web". |
akcnowledge-problem API actionacknowledge-problem API action
If you didn't forget that already, but ACKing a host/service problem promotes the very same Icinga Web 2 user also to an Incident manager in Icinga Notifications, and causes a one time notification to be sent to all existing incident recipients stating that the incident has been ACKed and that they won't receive any new notifications about that anymore until the manager is demoted. Now, we want to correlate the resulting notifications with corresponding Icinga 2/Icinga DB ACK set history entry, and that will only work if Icinga DB Web uses the actual In short, when using compatible Icinga DB and Icinga Notifications, then the ACK quick action in Icinga DB Web will indeed cause two separate actions, one to send the actual ACK request to Icinga 2, and second, a separate event to enqueue a special event to the Icinga Notifications queue. |
|
So that thing is basically special because Icinga Web wants to trigger related actions in Icinga 2 and directly in Icinga Notifications, instead of the action in Icinga Notifications being triggered from the Redis stream (as it's the case for all other actions that involve Icinga 2)? |
Yes. Because there's only one way to promote a user to manager, and that's from within Icinga Notifications Web, which Icinga DB Web makes use of through some kind of hooks, I guess. Though, Icinga DB will still the related event to Icinga Notifications, but only to mute an existing incident and nothing more. |
This PR sends two additional properties as part of the state runtime updates in the
icinga:runtime:stateRedis stream, which are needed by the Icinga Notifications component in Icinga DB (Go) to be able to reconstruct the related history IDs sent as part of theicinga:history:stream:statepipeline.The
acknowledgement_set_timecolumn will be used by Icinga DB Web for the same reasons as above when transmitting ACK clear events. Apart from that, I have also extended theacknowledge-problemAPI action to allow Icinga DB Web to provide custom ACK set time instead of having to always use now, which no other clients have access to.Both changes are non-breaking, so no Redis schema version bump is required, and thus, this can safely be backported to both active support branches since we want to require Icinga 2 v2.15.x or v2.16.x that will contain these changes in Icinga DB (Go).
resolves #11006