From 8f8691d0942eae4210543cca3bd03206a6288d6c Mon Sep 17 00:00:00 2001 From: Cedric Meschin Date: Thu, 2 Apr 2026 16:27:30 +0200 Subject: [PATCH 1/2] Add Debian 12 OS --- .../upgrade/centreon-ha/upgrade-from-24-04.md | 194 ++++++++++++++++-- 1 file changed, 172 insertions(+), 22 deletions(-) diff --git a/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md b/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md index d356a7278cc2..2584fd42b728 100644 --- a/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md +++ b/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md @@ -156,6 +156,41 @@ You should have a result like this: -rw------- 1 root root 2777 May 3 17:49 centreon_cluster.tar.bz2 ``` +### Modifying php service version on Debian +On Debian the php service contain the version of the package, so we need to change this value in the cluster configuration. +No needed in EL distributions because the servicename is "php-fpm" only. +To do this we'll use the cibadmin tool to modify the configuration and reimport it. + + + + + Update the name of the service in the xml configuration file. + ```bash + sed -i.bak 's#php8.1#php8.2#' export_cluster.xml + ``` + Then reimport de cluster configuration. + ```bash + cibadmin -R --xml-file export_cluster.xml + ``` + + + + + + + Update the name of the service in the xml configuration file. + ```bash + sed -i.bak 's#php8.1#php8.2#' export_cluster.xml + ``` + Then reimport de cluster configuration. + ```bash + cibadmin -R --xml-file export_cluster.xml + ``` + + + + + ### Modifying order of resources on centreon group To optimize managment of resources and to avoid restart cbd-sql when we just want to restart gorgone, we must change there order in the group. @@ -276,6 +311,53 @@ pcs constraint colocation add master "ms_mysql-clone" with "centreon" pcs constraint colocation add master "centreon" with "ms_mysql-clone" ``` + + + +First extract all contraint IDs: + +```bash +pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' +``` + +You should have a similar result: + +```text +order-centreon-ms_mysql-clone-mandatory +colocation-ms_mysql-clone-centreon-INFINITY +colocation-centreon-ms_mysql-clone-INFINITY +``` + +and delete **all** constraints, **adapt IDs with your own** + +```bash +pcs constraint delete order-centreon-ms_mysql-clone-mandatory +pcs constraint delete colocation-ms_mysql-clone-centreon-INFINITY +pcs constraint delete colocation-centreon-ms_mysql-clone-INFINITY +``` + +Verify if all constraint are well deleted: + +```bash +pcs constraint +``` + +You should have a result like this: + +```text +Location Constraints: +Ordering Constraints: +Colocation Constraints: +Ticket Constraints: +``` + +If it's OK, then recreate only needed constraints + +```bash +pcs constraint colocation add master "ms_mysql-clone" with "centreon" +pcs constraint colocation add master "centreon" with "ms_mysql-clone" +``` + @@ -292,14 +374,14 @@ pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/. You should have a similar result depending of your host names: ```text -location-cbd_rrd-clone-cc-ha-bdd1-2210-alma8--INFINITY -location-cbd_rrd-clone-cc-ha-bdd2-2210-alma8--INFINITY -location-centreon-cc-ha-bdd1-2210-alma8--INFINITY -location-centreon-cc-ha-bdd2-2210-alma8--INFINITY -location-ms_mysql-clone-cc-ha-web1-2210-alma8--INFINITY -location-ms_mysql-clone-cc-ha-web2-2210-alma8--INFINITY -location-php-clone-cc-ha-bdd1-2210-alma8--INFINITY -location-php-clone-cc-ha-bdd2-2210-alma8--INFINITY +location-cbd_rrd-clone-cc-ha-bdd1-alma8--INFINITY +location-cbd_rrd-clone-cc-ha-bdd2-alma8--INFINITY +location-centreon-cc-ha-bdd1-alma8--INFINITY +location-centreon-cc-ha-bdd2-alma8--INFINITY +location-ms_mysql-clone-cc-ha-web1-alma8--INFINITY +location-ms_mysql-clone-cc-ha-web2-alma8--INFINITY +location-php-clone-cc-ha-bdd1-alma8--INFINITY +location-php-clone-cc-ha-bdd2-alma8--INFINITY order-centreon-ms_mysql-clone-mandatory colocation-ms_mysql-clone-vip_mysql-INFINITY colocation-centreon-vip-INFINITY @@ -308,9 +390,9 @@ colocation-centreon-vip-INFINITY and delete **all** constraints, **adapt IDs with your own** ```bash -pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-2210-alma8--INFINITY -pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd2-2210-alma8--INFINITY -pcs constraint delete location-centreon-cc-ha-bdd1-2210-alma8--INFINITY +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-alma8--INFINITY +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd2-alma8--INFINITY +pcs constraint delete location-centreon-cc-ha-bdd1-alma8--INFINITY ... ``` @@ -350,14 +432,72 @@ pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/. You should have a similar result depending of your host names: ```text -location-cbd_rrd-clone-cc-ha-bdd1-2210-alma8--INFINITY -location-cbd_rrd-clone-cc-ha-bdd2-2210-alma8--INFINITY -location-centreon-cc-ha-bdd1-2210-alma8--INFINITY -location-centreon-cc-ha-bdd2-2210-alma8--INFINITY -location-ms_mysql-clone-cc-ha-web1-2210-alma8--INFINITY -location-ms_mysql-clone-cc-ha-web2-2210-alma8--INFINITY -location-php-clone-cc-ha-bdd1-2210-alma8--INFINITY -location-php-clone-cc-ha-bdd2-2210-alma8--INFINITY +location-cbd_rrd-clone-cc-ha-bdd1-alma9--INFINITY +location-cbd_rrd-clone-cc-ha-bdd2-alma9--INFINITY +location-centreon-cc-ha-bdd1-alma9--INFINITY +location-centreon-cc-ha-bdd2-alma9--INFINITY +location-ms_mysql-clone-cc-ha-web1-alma9--INFINITY +location-ms_mysql-clone-cc-ha-web2-alma9--INFINITY +location-php-clone-cc-ha-bdd1-alma9--INFINITY +location-php-clone-cc-ha-bdd2-alma9--INFINITY +order-centreon-ms_mysql-clone-mandatory +colocation-ms_mysql-clone-vip_mysql-INFINITY +colocation-centreon-vip-INFINITY +``` + +and delete **all** constraints, **adapt IDs with your own** + +```bash +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-alma9--INFINITY +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd2-alma9--INFINITY +pcs constraint delete location-centreon-cc-ha-bdd1-alma9--INFINITY +... +``` + +Verify if all constraint are well deleted: + +```bash +pcs constraint +``` + +You should have a result like this: + +```text +Location Constraints: +Ordering Constraints: +Colocation Constraints: +Ticket Constraints: +``` + +If it's OK, then recreate only needed constraints. + +In order to glue the Primary Database role with the Virtual IP, define a mutual Constraint: + +```bash +pcs constraint colocation add "vip_mysql" with master "ms_mysql-clone" +pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql" +``` + + + + +First extract all contraint IDs: + +```bash +pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' +``` + +You should have a similar result depending of your host names: + +```text +location-cbd_rrd-clone-cc-ha-bdd1--INFINITY +location-cbd_rrd-clone-cc-ha-bdd2--INFINITY +location-centreon-cc-ha-bdd1--INFINITY +location-centreon-cc-ha-bdd2--INFINITY +location-ms_mysql-clone-cc-ha-web1--INFINITY +location-ms_mysql-clone-cc-ha-web2--INFINITY +location-php-clone-cc-ha-bdd1--INFINITY +location-php-clone-cc-ha-bdd2--INFINITY order-centreon-ms_mysql-clone-mandatory colocation-ms_mysql-clone-vip_mysql-INFINITY colocation-centreon-vip-INFINITY @@ -366,9 +506,9 @@ colocation-centreon-vip-INFINITY and delete **all** constraints, **adapt IDs with your own** ```bash -pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-2210-alma8--INFINITY -pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd2-2210-alma8--INFINITY -pcs constraint delete location-centreon-cc-ha-bdd1-2210-alma8--INFINITY +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1--INFINITY +pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd2--INFINITY +pcs constraint delete location-centreon-cc-ha-bdd1--INFINITY ... ``` @@ -421,6 +561,16 @@ pcs constraint location cbd_rrd-clone avoids @DATABASE_MASTER_NAME@=INFINITY @DA pcs constraint location php-clone avoids @DATABASE_MASTER_NAME@=INFINITY @DATABASE_SLAVE_NAME@=INFINITY ``` + + + +```bash +pcs constraint location centreon avoids @DATABASE_MASTER_NAME@=INFINITY @DATABASE_SLAVE_NAME@=INFINITY +pcs constraint location ms_mysql-clone avoids @CENTRAL_MASTER_NAME@=INFINITY @CENTRAL_SLAVE_NAME@=INFINITY +pcs constraint location cbd_rrd-clone avoids @DATABASE_MASTER_NAME@=INFINITY @DATABASE_SLAVE_NAME@=INFINITY +pcs constraint location php-clone avoids @DATABASE_MASTER_NAME@=INFINITY @DATABASE_SLAVE_NAME@=INFINITY +``` + From 634dce4e65ca57cb0064806ce1e076167ab99146 Mon Sep 17 00:00:00 2001 From: cg-tw <83637804+cg-tw@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:23:12 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: cg-tw <83637804+cg-tw@users.noreply.github.com> --- .../upgrade/centreon-ha/upgrade-from-24-04.md | 71 +++++++++++-------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md b/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md index 2584fd42b728..396d658cfe17 100644 --- a/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md +++ b/versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md @@ -157,35 +157,50 @@ You should have a result like this: ``` ### Modifying php service version on Debian -On Debian the php service contain the version of the package, so we need to change this value in the cluster configuration. -No needed in EL distributions because the servicename is "php-fpm" only. -To do this we'll use the cibadmin tool to modify the configuration and reimport it. + +On Debian, the php service contains the version of the package, so we need to change this value in the cluster configuration. +This is not needed for EL distributions because the servicename is **php-fpm** only. +Use the **cibadmin** tool to modify the configuration and reimport it. + + + Update the name of the service in the xml configuration file. + ```bash sed -i.bak 's#php8.1#php8.2#' export_cluster.xml ``` + Then reimport de cluster configuration. + ```bash cibadmin -R --xml-file export_cluster.xml ``` + + + + Update the name of the service in the xml configuration file. + ```bash sed -i.bak 's#php8.1#php8.2#' export_cluster.xml ``` + Then reimport de cluster configuration. + ```bash cibadmin -R --xml-file export_cluster.xml ``` + @@ -314,13 +329,13 @@ pcs constraint colocation add master "centreon" with "ms_mysql-clone" -First extract all contraint IDs: +1. First, extract all constraint IDs: ```bash pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' ``` -You should have a similar result: +The results should look like this: ```text order-centreon-ms_mysql-clone-mandatory @@ -328,7 +343,7 @@ colocation-ms_mysql-clone-centreon-INFINITY colocation-centreon-ms_mysql-clone-INFINITY ``` -and delete **all** constraints, **adapt IDs with your own** +2. Delete **all** constraints (replace the IDs with your own). ```bash pcs constraint delete order-centreon-ms_mysql-clone-mandatory @@ -336,13 +351,13 @@ pcs constraint delete colocation-ms_mysql-clone-centreon-INFINITY pcs constraint delete colocation-centreon-ms_mysql-clone-INFINITY ``` -Verify if all constraint are well deleted: +3. Check that all constraints have been correctly deleted: ```bash pcs constraint ``` -You should have a result like this: +The results should look like this: ```text Location Constraints: @@ -351,7 +366,7 @@ Colocation Constraints: Ticket Constraints: ``` -If it's OK, then recreate only needed constraints +4. If the results are OK, then recreate only the constraints you need. ```bash pcs constraint colocation add master "ms_mysql-clone" with "centreon" @@ -365,13 +380,13 @@ pcs constraint colocation add master "centreon" with "ms_mysql-clone" -First extract all contraint IDs: +1. First, extract all constraint IDs: ```bash pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' ``` -You should have a similar result depending of your host names: +You should have a similar result depending on your host names: ```text location-cbd_rrd-clone-cc-ha-bdd1-alma8--INFINITY @@ -387,7 +402,7 @@ colocation-ms_mysql-clone-vip_mysql-INFINITY colocation-centreon-vip-INFINITY ``` -and delete **all** constraints, **adapt IDs with your own** +2. Delete all constraints (replace the IDs with your own): ```bash pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-alma8--INFINITY @@ -396,13 +411,13 @@ pcs constraint delete location-centreon-cc-ha-bdd1-alma8--INFINITY ... ``` -Verify if all constraint are well deleted: +3. Check that all constraints have been correctly deleted: ```bash pcs constraint ``` -You should have a result like this: +The results should look like this: ```text Location Constraints: @@ -411,7 +426,7 @@ Colocation Constraints: Ticket Constraints: ``` -If it's OK, then recreate only needed constraints. +4. If the results are OK, then recreate only the constraints you need. In order to glue the Primary Database role with the Virtual IP, define a mutual Constraint: @@ -423,7 +438,7 @@ pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql" -First extract all contraint IDs: +1. First, extract all constraint IDs: ```bash pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' @@ -445,7 +460,7 @@ colocation-ms_mysql-clone-vip_mysql-INFINITY colocation-centreon-vip-INFINITY ``` -and delete **all** constraints, **adapt IDs with your own** +2. Delete all constraints (replace the IDs with your own). ```bash pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1-alma9--INFINITY @@ -454,13 +469,13 @@ pcs constraint delete location-centreon-cc-ha-bdd1-alma9--INFINITY ... ``` -Verify if all constraint are well deleted: +3. Check that all constraints have been correctly deleted: ```bash pcs constraint ``` -You should have a result like this: +The results should look like this: ```text Location Constraints: @@ -469,9 +484,9 @@ Colocation Constraints: Ticket Constraints: ``` -If it's OK, then recreate only needed constraints. +4. If the results are OK, then recreate only the constraints you need. -In order to glue the Primary Database role with the Virtual IP, define a mutual Constraint: +In order to glue the Primary Database role with the Virtual IP, define a mutual constraint: ```bash pcs constraint colocation add "vip_mysql" with master "ms_mysql-clone" @@ -481,7 +496,7 @@ pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql" -First extract all contraint IDs: +1. First, extract all constraint IDs: ```bash pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' @@ -503,7 +518,7 @@ colocation-ms_mysql-clone-vip_mysql-INFINITY colocation-centreon-vip-INFINITY ``` -and delete **all** constraints, **adapt IDs with your own** +2. Delete all constraints (replace the IDs with your own). ```bash pcs constraint delete location-cbd_rrd-clone-cc-ha-bdd1--INFINITY @@ -512,13 +527,13 @@ pcs constraint delete location-centreon-cc-ha-bdd1--INFINITY ... ``` -Verify if all constraint are well deleted: +3. Check that all constraints have been correctly deleted: ```bash pcs constraint ``` -You should have a result like this: +The results should look like this: ```text Location Constraints: @@ -527,9 +542,9 @@ Colocation Constraints: Ticket Constraints: ``` -If it's OK, then recreate only needed constraints. +4. If the results are OK, then recreate only the constraints you need. -In order to glue the Primary Database role with the Virtual IP, define a mutual Constraint: +In order to glue the Primary Database role with the Virtual IP, define a mutual constraint: ```bash pcs constraint colocation add "vip_mysql" with master "ms_mysql-clone" @@ -539,7 +554,7 @@ pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql" -Then recreate the Constraint that prevent Centreon Processes to run on Database nodes and vice-et-versa: +Then recreate the constraint that prevents Centreon processes to run on database nodes and vice-versa: