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

Add support for 'Dependency Redundancy Groups' #2860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Donien
Copy link

@Donien Donien commented Jan 18, 2024

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.

form

rendered


If any changes need to be made, please let me know.

@cla-bot cla-bot bot added the cla/signed label Jan 18, 2024
@widhalmt
Copy link
Member

ref/NC/805863

@nilmerg nilmerg added this to the Dependencies milestone Nov 4, 2024
@raviks789
Copy link
Collaborator

raviks789 commented Feb 10, 2025

@Donien Please rebase with master and resolve conflicts

@Donien Donien force-pushed the add-dependency-redundancy-group branch from 4feb84f to 13b93d1 Compare February 10, 2025 10:17
@Donien
Copy link
Author

Donien commented Feb 10, 2025

@raviks789 Should be okay now.
I also made it one clean commit.

Comment on lines +3 to +4
ALTER TABLE icinga_dependency ADD COLUMN redundancy_group character varying(255);
ALTER TABLE branched_icinga_dependency ADD COLUMN redundancy_group character varying(255);
Copy link
Collaborator

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());
Copy link
Collaborator

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());
Copy link
Collaborator

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());
Copy link
Collaborator

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);
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants