Skip to content
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

Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones #6820

Merged
merged 1 commit into from
Dec 5, 2018

Conversation

dnsmichi
Copy link
Contributor

@dnsmichi dnsmichi commented Dec 4, 2018

From a discussion with @Al2Klimov we came to the conclusion that
a ScheduledDowntime "does something" in HA enabled cluster zones,
similar to Checkable and Notification objects. As such, they can
be balanced.

scheduled_downtimes_ha_cluster

Since we already have the HA & UpdateObjectAuthority functionality
available, we just need to ensure that only the active SD object
calls CreateNextDowntime() thus leaving the paused SD object
"doing nothing".

That way generated downtimes from SD objects only happen once,
and the cluster syncs just that one downtime to both nodes.
No more duplicates, tests attached.

fixes #2844

@dnsmichi dnsmichi added bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels Dec 4, 2018
@dnsmichi dnsmichi added this to the 2.11.0 milestone Dec 4, 2018
@dnsmichi
Copy link
Contributor Author

dnsmichi commented Dec 4, 2018

SDs paused

scheduled_downtime_ha_cluster_paused

Downtimes just once

scheduled_downtime_ha_cluster_just_one_downtime

@dnsmichi dnsmichi modified the milestones: 2.11.0, 2.10.3 Dec 5, 2018
@dnsmichi dnsmichi merged commit 0cc559b into master Dec 5, 2018
@dnsmichi dnsmichi deleted the bugfix/scheduled-downtime-ha-duplicates branch December 5, 2018 10:33
@Al2Klimov
Copy link
Member

@dnsmichi What if my config master doesn't accept config?

@dnsmichi dnsmichi added the backported Fix was included in a bugfix release label Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) backported Fix was included in a bugfix release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dev.icinga.com #8897] Duplicated scheduled downtimes created in cluster HA zone
2 participants