Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 200 additions & 35 deletions versioned_docs/version-25.10/upgrade/centreon-ha/upgrade-from-24-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Tabs groupId="sync">
<TabItem value="HA 2 Nodes" label="HA 2 Nodes">

<Tabs groupId="sync">
Comment thread
cg-tw marked this conversation as resolved.
<TabItem value="Debian 12" label="Debian 12">

Update the name of the service in the xml configuration file.
Comment thread
cg-tw marked this conversation as resolved.

```bash
sed -i.bak 's#php8.1#php8.2#' export_cluster.xml
```

Then reimport de cluster configuration.
Comment thread
cg-tw marked this conversation as resolved.

```bash
cibadmin -R --xml-file export_cluster.xml
```
</TabItem>
</Tabs>
Comment thread
cg-tw marked this conversation as resolved.

</TabItem>

<TabItem value="HA 4 Nodes" label="HA 4 Nodes">
Comment thread
cg-tw marked this conversation as resolved.

<Tabs groupId="sync">
<TabItem value="Debian 12" label="Debian 12">

Update the name of the service in the xml configuration file.
Comment thread
cg-tw marked this conversation as resolved.

```bash
sed -i.bak 's#php8.1#php8.2#' export_cluster.xml
```

Then reimport de cluster configuration.
Comment thread
cg-tw marked this conversation as resolved.

```bash
cibadmin -R --xml-file export_cluster.xml
```

</TabItem>
Comment thread
cg-tw marked this conversation as resolved.
</Tabs>
</TabItem>
</Tabs>

### 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.
Expand Down Expand Up @@ -276,51 +326,98 @@ pcs constraint colocation add master "ms_mysql-clone" with "centreon"
pcs constraint colocation add master "centreon" with "ms_mysql-clone"
```

</TabItem>
<TabItem value="Debian 12" label="Debian 12">

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"
```

</TabItem>
</Tabs>
</TabItem>
<TabItem value="HA 4 Nodes" label="HA 4 Nodes">
<Tabs groupId="sync">
<TabItem value="RHEL8 / Alma Linux 8 / Oracle Linux 8" label="RHEL8 / Alma Linux 8 / Oracle Linux 8">

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:
Expand All @@ -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:

Expand All @@ -341,7 +438,7 @@ pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql"
</TabItem>
<TabItem value="RHEL9 / Alma Linux 9 / Oracle Linux 9" label="RHEL9 / Alma Linux 9 / Oracle Linux 9">

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/.$//'
Expand All @@ -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:
Expand All @@ -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"
```

</TabItem>
<TabItem value="Debian 12" label="Debian 12">

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"
Expand All @@ -399,7 +554,7 @@ pcs constraint colocation add master "ms_mysql-clone" with "vip_mysql"
</TabItem>
</Tabs>

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:

<Tabs groupId="sync">
<TabItem value="RHEL8 / Alma Linux 8 / Oracle Linux 8" label="RHEL8 / Alma Linux 8 / Oracle Linux 8">
Expand All @@ -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
```

</TabItem>
<TabItem value="Debian 12" label="Debian 12">

```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
```

</TabItem>
</Tabs>
</TabItem>
Expand Down
Loading