-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add support for 'Dependency Redundancy Groups' #2860
base: master
Are you sure you want to change the base?
Conversation
ref/NC/805863 |
@Donien Please rebase with master and resolve conflicts |
4feb84f
to
13b93d1
Compare
@raviks789 Should be okay now. |
ALTER TABLE icinga_dependency ADD COLUMN redundancy_group character varying(255); | ||
ALTER TABLE branched_icinga_dependency ADD COLUMN redundancy_group character varying(255); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of updating the upgrade file of the previous version, please add this to a new sql file with upgrade_189.sql
as its name. Also add the below at the end of the file.
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (189, NOW());
@@ -2781,4 +2783,4 @@ CREATE INDEX branched_dependency_search_object_name ON branched_icinga_dependenc | |||
|
|||
INSERT INTO director_schema_migration | |||
(schema_version, migration_time) | |||
VALUES (187, NOW()); | |||
VALUES (188, NOW()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the schema version to 189 which is the number of latest upgrade file.
@@ -2446,4 +2448,4 @@ CREATE TABLE branched_icinga_dependency ( | |||
|
|||
INSERT INTO director_schema_migration | |||
(schema_version, migration_time) | |||
VALUES (187, NOW()); | |||
VALUES (188, NOW()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the version number to 189
to maintain same version for this change across both MySQL and Postgres databases.
|
||
INSERT INTO director_schema_migration | ||
(schema_version, migration_time) | ||
VALUES (188, NOW()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the version to 189
to maintain same the version for this change across databases and also change the file name to upgrade_189.sql
.
->from('icinga_dependency', 'redundancy_group') | ||
->where('redundancy_group IS NOT NULL') | ||
->order('redundancy_group'); | ||
return $db->fetchCol($query); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line before this return statement.
Icinga2 version 2.14.0 introduced dependency redundancy groups which allow for more flexiblity when it comes to determining the "reachability" of a host (e.g. multiple DNS servers as redundant dependencies).
This PR adds a new attribute "redundancy_group" to dependencies and adjusts the web forms accordingly.
If any changes need to be made, please let me know.