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..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 @@ -156,6 +156,56 @@ 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 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 + ``` + + + + + + ### 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 +326,53 @@ pcs constraint colocation add master "ms_mysql-clone" with "centreon" pcs constraint colocation add master "centreon" with "ms_mysql-clone" ``` + + + +1. First, extract all constraint IDs: + +```bash +pcs constraint config --full | grep "id:" | awk -F "id:" '{print $2}' | sed 's/.$//' +``` + +The results should look like this: + +```text +order-centreon-ms_mysql-clone-mandatory +colocation-ms_mysql-clone-centreon-INFINITY +colocation-centreon-ms_mysql-clone-INFINITY +``` + +2. Delete **all** constraints (replace the 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 +``` + +3. Check that all constraints have been correctly deleted: + +```bash +pcs constraint +``` + +The results should look like this: + +```text +Location Constraints: +Ordering Constraints: +Colocation Constraints: +Ticket 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" +pcs constraint colocation add master "centreon" with "ms_mysql-clone" +``` + @@ -283,44 +380,44 @@ 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-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 ``` -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-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 ... ``` -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: @@ -329,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: @@ -341,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/.$//' @@ -350,35 +447,35 @@ 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** +2. Delete all constraints (replace the 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-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: +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: @@ -387,9 +484,67 @@ 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" +pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql" +``` + + + + +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: + +```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 +``` + +2. Delete all constraints (replace the IDs with your own). + +```bash +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 +... +``` + +3. Check that all constraints have been correctly deleted: + +```bash +pcs constraint +``` + +The results should look like this: + +```text +Location Constraints: +Ordering Constraints: +Colocation Constraints: +Ticket 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: ```bash pcs constraint colocation add "vip_mysql" with master "ms_mysql-clone" @@ -399,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: @@ -421,6 +576,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 +``` +