Skip to content

Commit

Permalink
Manual version changes.
Browse files Browse the repository at this point in the history
(as opposed to the template-based changes in a previous commit)
  • Loading branch information
EFM-Bobby authored and josh-heyer committed Aug 21, 2024
1 parent 2052ea9 commit 3e0e8c6
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Each node in a Failover Manager cluster has a properties file (by default, named
After completing the Failover Manager installation, make a working copy of the template before modifying the file contents:

```text
# cp /etc/edb/efm-4.9/efm.properties.in /etc/edb/efm-4.9/efm.properties
# cp /etc/edb/efm-4.10/efm.properties.in /etc/edb/efm-4.10/efm.properties
```

After copying the template file, change the owner of the file to efm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This example shows using the `encrypt` utility to encrypt a password for the `ac
# efm encrypt acctg
This utility will generate an encrypted password for you to place in
your Failover Manager cluster property file:
/etc/edb/efm-4.9/acctg.properties
/etc/edb/efm-4.10/acctg.properties
Please enter the password and hit enter:
Please enter the password again to confirm:
The encrypted password is: 516b36fb8031da17cfbc010f7d09359c
Expand All @@ -49,8 +49,8 @@ db.password.encrypted=516b36fb8031da17cfbc010f7d09359c
After receiving your encrypted password, paste the password into the properties file and start the Failover Manager service. If there's a problem with the encrypted password, the Failover Manager service doesn't start:

```text
[witness@localhost ~]# systemctl start edb-efm-4.9
Job for edb-efm-4.9.service failed because the control process exited with error code. See "systemctl status edb-efm-4.9.service" and "journalctl -xe" for details.
[witness@localhost ~]# systemctl start edb-efm-4.10
Job for edb-efm-4.10.service failed because the control process exited with error code. See "systemctl status edb-efm-4.10.service" and "journalctl -xe" for details.
```

If you receive this message when starting the Failover Manager service, see the startup log `/var/log/efm-4.<x>/startup-efm.log` for more information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Each node in a Failover Manager cluster has a cluster members file (by default n
After completing the Failover Manager installation, make a working copy of the template:

```shell
cp /etc/edb/efm-4.9/efm.nodes.in /etc/edb/efm-4.9/efm.nodes
cp /etc/edb/efm-4.10/efm.nodes.in /etc/edb/efm-4.10/efm.nodes
```

After copying the template file, change the owner of the file to efm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `sudoers` file contains entries that allow the user efm to control the Failo
The `efm-49` file is located in `/etc/sudoers.d` and contains the following entries:

```text
# Copyright EnterpriseDB Corporation, 2014-2021. All Rights Reserved.
# Copyright EnterpriseDB Corporation, 2014-2024. All Rights Reserved.
#
# Do not edit this file. Changes to the file may be overwritten
# during an upgrade.
Expand All @@ -36,18 +36,18 @@ The `efm-49` file is located in `/etc/sudoers.d` and contains the following entr
# If you run your db service under a non-default account, you will need to copy
# this file to grant the proper permissions and specify the account in your efm
# cluster properties file by changing the 'db.service.owner' property.
efm ALL=(postgres) NOPASSWD: /usr/edb/efm-4.9/bin/efm_db_functions
efm ALL=(enterprisedb) NOPASSWD: /usr/edb/efm-4.9/bin/efm_db_functions
efm ALL=(postgres) NOPASSWD: /usr/edb/efm-4.10/bin/efm_db_functions
efm ALL=(enterprisedb) NOPASSWD: /usr/edb/efm-4.10/bin/efm_db_functions
# Allow user 'efm' to sudo efm_root_functions as 'root' to write/delete the PID file,
# validate the db.service.owner property, etc.
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.9/bin/efm_root_functions
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.10/bin/efm_root_functions
# Allow user 'efm' to sudo efm_address as root for VIP tasks.
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.9/bin/efm_address
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.10/bin/efm_address
# Allow user 'efm' to sudo efm_pgpool_functions as root for pgpool tasks.
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.9/bin/efm_pgpool_functions
efm ALL=(ALL) NOPASSWD: /usr/edb/efm-4.10/bin/efm_pgpool_functions
# relax tty requirement for user 'efm'
Defaults:efm !requiretty
Expand Down Expand Up @@ -89,17 +89,17 @@ To run Failover Manager without sudo, you must select a database process owner w
```shell
su - enterprisedb

cp /etc/edb/efm-4.9/efm.properties.in <directory/cluster_name>.properties
cp /etc/edb/efm-4.10/efm.properties.in <directory/cluster_name>.properties

cp /etc/edb/efm-4.9/efm.nodes.in <directory>/<cluster_name>.nodes
cp /etc/edb/efm-4.10/efm.nodes.in <directory>/<cluster_name>.nodes
```

Then, modify the cluster properties file, providing the name of the user in the `db.service.owner` property. Also make sure that the `db.service.name` property is blank. Without sudo, you can't run services without root access.

After modifying the configuration, the new user can control Failover Manager with the following command:

```shell
/usr/edb/efm-4.9/bin/runefm.sh start|stop <directory/cluster_name>.properties
/usr/edb/efm-4.10/bin/runefm.sh start|stop <directory/cluster_name>.properties
```

Where `<directory/cluster_name.properties>` specifies the full path of the cluster properties file. The user provides the full path to the properties file whenever the nondefault user is controlling agents or using the `efm` script.
Expand Down
10 changes: 5 additions & 5 deletions product_docs/docs/efm/4/05_using_efm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ After creating the `acctg.properties` and `sales.properties` files, create a ser

If you're using RHEL/Rocky Linux/AlmaLinux 8.x or later, copy the service file `/usr/lib/systemd/system/edb-efm-4.<x>.service` to `/etc/systemd/system` with a new name that's unique for each cluster.

For example, if you have two clusters named `acctg` and `sales` managed by Failover Manager 4.9, the unit file names might be `efm-acctg.service` and `efm-sales.service`. You can create them with:
For example, if you have two clusters named `acctg` and `sales` managed by Failover Manager 4.10, the unit file names might be `efm-acctg.service` and `efm-sales.service`. You can create them with:

```shell
cp /usr/lib/systemd/system/edb-efm-4.9.service /etc/systemd/system/efm-acctg.service
cp /usr/lib/systemd/system/edb-efm-4.9.service /etc/systemd/system/efm-sales.service
cp /usr/lib/systemd/system/edb-efm-4.10.service /etc/systemd/system/efm-acctg.service
cp /usr/lib/systemd/system/edb-efm-4.10.service /etc/systemd/system/efm-sales.service
```

Then use `systemctl edit` to edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name.
Expand All @@ -286,15 +286,15 @@ In this example, edit the `acctg` cluster by running `systemctl edit efm-acctg.s
```ini
[Service]
Environment=CLUSTER=acctg
PIDFile=/run/efm-4.9/acctg.pid
PIDFile=/run/efm-4.10/acctg.pid
```

Edit the `sales` cluster by running `systemctl edit efm-sales.service` and write:

```ini
[Service]
Environment=CLUSTER=sales
PIDFile=/run/efm-4.9/sales.pid
PIDFile=/run/efm-4.10/sales.pid
```

!!!Note
Expand Down
12 changes: 6 additions & 6 deletions product_docs/docs/efm/4/08_controlling_efm_service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Stop the Failover Manager on the current node. This command must be invoked by r
The `status` command returns the status of the Failover Manager agent on which it is invoked. You can invoke the status command on any node to instruct Failover Manager to return status and server startup information.

```text
[root@ONE ~]}> systemctl status edb-efm-4.9
edb-efm-4.9.service - EnterpriseDB Failover Manager 4.9
Loaded: loaded (/usr/lib/systemd/system/edb-efm-4.9.service; disabled; vendor preset: disabled)
[root@ONE ~]}> systemctl status edb-efm-4.10
edb-efm-4.10.service - EnterpriseDB Failover Manager 4.10
Loaded: loaded (/usr/lib/systemd/system/edb-efm-4.10.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2024-04-11 11:02:31 EDT; 4h 11min ago
Process: 58125 ExecStart=/bin/bash -c /usr/edb/edb-efm-4.9/bin/runefm.sh start ${CLUSTER} (code=exited, status=0/SUCCESS)
Process: 58125 ExecStart=/bin/bash -c /usr/edb/edb-efm-4.10/bin/runefm.sh start ${CLUSTER} (code=exited, status=0/SUCCESS)
Main PID: 58180 (java)
CGroup: /system.slice/edb-efm-4.9.service
└─58180 /usr/lib/jvm/java-11-openjdk-11.0.20.0.8-1.el7_9.x86_64/bin/java -cp /usr/edb/efm-4.9/lib/EFM-4.9.jar -Xmx128m...
CGroup: /system.slice/edb-efm-4.10.service
└─58180 /usr/lib/jvm/java-11-openjdk-11.0.20.0.8-1.el7_9.x86_64/bin/java -cp /usr/edb/efm-4.10/lib/EFM-4.10.jar -Xmx128m...
```
18 changes: 9 additions & 9 deletions product_docs/docs/efm/4/efm_quick_start/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Start the configuration process on a primary or standby node. Then, copy the con
1. Create working configuration files. Copy the provided sample files to create Failover Manager configuration files, and correct the ownership and version number if you are installing a different version:

```shell
cd /etc/edb/efm-4.9
cd /etc/edb/efm-4.10

cp efm.properties.in efm.properties

Expand All @@ -45,7 +45,7 @@ Start the configuration process on a primary or standby node. Then, copy the con
1. Create an [encrypted password](/efm/latest/04_configuring_efm/02_encrypting_database_password/) needed for the properties file:

```shell
/usr/edb/efm-4.9/bin/efm encrypt efm
/usr/edb/efm-4.10/bin/efm encrypt efm
```

Follow the onscreen instructions to produce the encrypted version of your database password.
Expand Down Expand Up @@ -83,38 +83,38 @@ Start the configuration process on a primary or standby node. Then, copy the con

The Failover Manager agent doesn't validate the addresses in the `efm.nodes` file. The agent expects that some of the addresses in the file can't be reached (for example, that another agent hasn’t been started yet).

1. Configure the other nodes. Copy the `efm.properties` and `efm.nodes` files to `/etc/edb/efm-4.9` on the other nodes in your sample cluster. After copying the files, change the file ownership so the files are owned by efm:efm. The `efm.properties` file can be the same on every node, except for the following properties:
1. Configure the other nodes. Copy the `efm.properties` and `efm.nodes` files to `/etc/edb/efm-4.10` on the other nodes in your sample cluster. After copying the files, change the file ownership so the files are owned by efm:efm. The `efm.properties` file can be the same on every node, except for the following properties:

- Modify the `bind.address` property to use the node’s local address.

- Set `is.witness` to `true` if the node is a witness node. If the node is a witness node, the properties relating to a local database installation are ignored.

1. Start the Failover Manager cluster. On any node, start the Failover Manager agent. The agent is named `edb-efm-4.9`; you can use your platform-specific service command to control the service. For example, on a RHEL 7.x or Rocky Linux/AlmaLinux/RHEL 8.x host, use the command:
1. Start the Failover Manager cluster. On any node, start the Failover Manager agent. The agent is named `edb-efm-4.10`; you can use your platform-specific service command to control the service. For example, on a RHEL 7.x or Rocky Linux/AlmaLinux/RHEL 8.x host, use the command:

```shell
systemctl start edb-efm-4.9
systemctl start edb-efm-4.10
```

1. After the agent starts, run the following command to see the status of the single-node cluster. The addresses of the other nodes appear in the `Allowed node host` list.

```shell
/usr/edb/efm-4.9/bin/efm cluster-status efm
/usr/edb/efm-4.10/bin/efm cluster-status efm
```

1. Start the agent on the other nodes. Run the `efm cluster-status efm` command on any node to see the cluster status.

If any agent fails to start, see the startup log for information about what went wrong:

```shell
cat /var/log/efm-4.9/startup-efm.log
cat /var/log/efm-4.10/startup-efm.log
```

## Perform a switchover

If the cluster status output shows that the primary and standby nodes are in sync, you can perform a switchover:

```shell
/usr/edb/efm-4.9/bin/efm promote efm -switchover
/usr/edb/efm-4.10/bin/efm promote efm -switchover
```

The command promotes a standby and reconfigures the primary database as a new standby in the cluster. To switch back, run the command again.
Expand All @@ -124,5 +124,5 @@ The command promotes a standby and reconfigures the primary database as a new st
For quick access to online help, use:

```shell
/usr/edb/efm-4.9/bin/efm --help
/usr/edb/efm-4.10/bin/efm --help
```
24 changes: 12 additions & 12 deletions product_docs/docs/efm/4/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ legacyRedirectsGenerated:

Failover Manager provides a utility to assist you when upgrading a cluster managed by Failover Manager. To upgrade an existing cluster, you must:

1. Install Failover Manager 4.9 on each node of the cluster. For detailed information about installing Failover Manager, see [Installing Failover Manager](installing).
1. Install Failover Manager 4.10 on each node of the cluster. For detailed information about installing Failover Manager, see [Installing Failover Manager](installing).

2. After installing Failover Manager, invoke the efm upgrade-conf utility to create the `.properties` and `.nodes` files for Failover Manager 4.9. The Failover Manager installer installs the upgrade utility ([efm upgrade-conf](07_using_efm_utility/#efm_upgrade_conf)) to the `/usr/edb/efm-4.9/bin` directory. To invoke the utility, assume root privileges, and invoke the command:
2. After installing Failover Manager, invoke the efm upgrade-conf utility to create the `.properties` and `.nodes` files for Failover Manager 4.10. The Failover Manager installer installs the upgrade utility ([efm upgrade-conf](07_using_efm_utility/#efm_upgrade_conf)) to the `/usr/edb/efm-4.10/bin` directory. To invoke the utility, assume root privileges, and invoke the command:

```shell
efm upgrade-conf <cluster_name>
```

The `efm upgrade-conf` utility locates the `.properties` and `.nodes` files of preexisting clusters and copies the parameter values to a new configuration file for use by Failover Manager. The utility saves the updated copy of the configuration files in the `/etc/edb/efm-4.9` directory.
The `efm upgrade-conf` utility locates the `.properties` and `.nodes` files of preexisting clusters and copies the parameter values to a new configuration file for use by Failover Manager. The utility saves the updated copy of the configuration files in the `/etc/edb/efm-4.10` directory.

3. Modify the `.properties` and `.nodes` files for Failover Manager 4.9, specifying any new preferences. Use your choice of editor to modify any additional properties in the properties file (located in the `/etc/edb/efm-4.9` directory) before starting the service for that node. For detailed information about property settings, see [The cluster properties file](04_configuring_efm/01_cluster_properties/#cluster_properties).
3. Modify the `.properties` and `.nodes` files for Failover Manager 4.10, specifying any new preferences. Use your choice of editor to modify any additional properties in the properties file (located in the `/etc/edb/efm-4.10` directory) before starting the service for that node. For detailed information about property settings, see [The cluster properties file](04_configuring_efm/01_cluster_properties/#cluster_properties).

4. If you're using Eager Failover, you must disable it before stopping the Failover Manager cluster. For more information, see [Disabling Eager Failover](04_configuring_efm/06_configuring_for_eager_failover/#disabling-eager-failover).

Expand All @@ -36,15 +36,15 @@ Failover Manager provides a utility to assist you when upgrading a cluster manag
!!! Note
The primary agent doesn't drop the virtual IP address (if used) when it's stopped. The database remains up and accessible on the VIP during the EFM upgrade. See also [Using Failover Manager with virtual IP addresses](04_configuring_efm/05_using_vip_addresses.mdx).

6. Start the new [Failover Manager service](08_controlling_efm_service/#controlling_efm_service) (`edb-efm-4.9`) on each node of the cluster.
6. Start the new [Failover Manager service](08_controlling_efm_service/#controlling_efm_service) (`edb-efm-4.10`) on each node of the cluster.

The following example shows invoking the upgrade utility to create the `.properties` and `.nodes` files for a Failover Manager installation:

```text
[root@hostname ~]# /usr/edb/efm-4.9/bin/efm upgrade-conf efm
Checking directory /etc/edb/efm-4.8
[root@hostname ~]# /usr/edb/efm-4.10/bin/efm upgrade-conf efm
Checking directory /etc/edb/efm-4.9
Processing efm.properties file
Checking directory /etc/edb/efm-4.8
Checking directory /etc/edb/efm-4.9
Processing efm.nodes file
Upgrade of files is finished. The owner and group for properties and nodes files have been set as 'efm'.
Expand Down Expand Up @@ -73,24 +73,24 @@ Summary:
!!! Note
If you are using custom scripts, check to see if they are calling any Failover Manager scripts. For example, a script that runs after promotion to perform various tasks and then calls Failover Manager's `efm_address` script to acquire a virtual IP address. If you have any custom scripts calling Failover Manager scripts, update the custom scripts to use the newly installed version of the Failover Manager script before uninstalling the older version of the Failover Manager script.

After upgrading to Failover Manager 4.9, you can use your native package manager to remove previous installations of Failover Manager. For example, use the following command to remove Failover Manager 4.8 and any unneeded dependencies:
After upgrading to Failover Manager 4.10, you can use your native package manager to remove previous installations of Failover Manager. For example, use the following command to remove Failover Manager 4.9 and any unneeded dependencies:

- On RHEL/Rocky Linux/AlmaLinux 8.x or later:

```shell
dnf remove edb-efm48
dnf remove edb-efm49
```

- On Debian or Ubuntu:

```shell
apt-get remove edb-efm48
apt-get remove edb-efm49
```

- On SLES:

```shell
zypper remove edb-efm48
zypper remove edb-efm49
```

## Performing a maintenance task
Expand Down

0 comments on commit 3e0e8c6

Please sign in to comment.