Skip to content

Commit

Permalink
Merge pull request #5970 from EnterpriseDB/release/2024-08-21a
Browse files Browse the repository at this point in the history
Production Release: 2024-08-21a
  • Loading branch information
gvasquezvargas authored Aug 21, 2024
2 parents a4f5609 + 85f5d62 commit 200f00c
Show file tree
Hide file tree
Showing 48 changed files with 406 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ redirects:
{{ super() }}
{% endblock product_prerequisites %}
{% block postinstall %}
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

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 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ redirects:

In default run mode, if a primary Failover Manager process fails, there's no failover protection until the agent restarts. To avoid this case, you can set up the primary node through `systemd` to cause a failover when the primary agent exits, which is called Eager Failover.

You can set up Eager Failover by performing the following steps. The example uses EDB Postgres Advanced Server version 12 and Failover Manager version 4.5.
You can set up Eager Failover by performing the following steps. The example uses EDB Postgres Advanced Server. Replace `<x>` with the appropriate version numbers in the following.

<div id="enabling_the_eager_failover" class="registered_link"></div>

Expand All @@ -29,17 +29,17 @@ You can set up Eager Failover by performing the following steps. The example us

- Ensure that the database server and the local Failover Manager agent are running.

- As root, edit the service `edb-as-12.service` file using the command:
- As root, edit the service `edb-as-<x>.service` file using the command:

```shell
systemctl edit edb-as-12.service
systemctl edit edb-as-<x>.service
```

- Add the following lines into the text editor, then save:

```ini
[Unit]
BindsTo=edb-efm-4.5.service
BindsTo=edb-efm-4.<x>.service
```

With these changes, when the Failover Manager agent is stopped or ended, the rest of the cluster treats this situation as a failure and attempts a failover.
Expand All @@ -48,9 +48,9 @@ With these changes, when the Failover Manager agent is stopped or ended, the res

## Disabling Eager Failover

- If you want to stop Failover Manager without stopping the database, comment out the following line in `/etc/systemd/system/edb-as-12.service`:
- If you want to stop Failover Manager without stopping the database, comment out the following line in `/etc/systemd/system/edb-as-<x>.service`:
```ini
BindsTo=edb-efm-4.5.service
BindsTo=edb-efm-4.<x>.service
```
- Run the following command to reload the configuration files:
```shell
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
```
13 changes: 13 additions & 0 deletions product_docs/docs/efm/4/efm_rel_notes/01_efm_410_rel_notes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Version 4.10"
---

Enhancements, bug fixes, and other changes in EFM 4.10 include:

| Type | Description |
| ---- |------------ |
| Enhancement | Failover Manager was upgraded to use the Bouncy Castle cryptographic library version 1.0.2.5. |
| Bug Fix | Improve handling of rare case where the standby to promote becomes unavailable during a switchover. [Support ticket: #37266] |
| Bug Fix | The `efm upgrade-conf` command will not lose .nodes file information when the `-source` and destination directories are the same. [Support ticket: #37479] |
| Bug Fix | Fixed an issue where the `efm cluster-status` command hid connection errors if every database connection failed. [Support ticket: #39108] |
| Bug Fix | At startup, if an agent with a primary database sees that there is already a primary in the cluster, it will drop the VIP if applicable when fencing off the database. |
1 change: 1 addition & 0 deletions product_docs/docs/efm/4/efm_rel_notes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cover what was new in each release.

| Version | Release Date |
| ------- | ------------ |
| [4.10](01_efm_410_rel_notes) | 21 Aug 2024|
| [4.9](01_efm_49_rel_notes) | 14 May 2024|
| [4.8](02_efm_48_rel_notes) | 15 Nov 2023|
| [4.7](03_efm_47_rel_notes) | 20 Jun 2023|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Before you begin the installation process:
sudo apt-get -y install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Before you begin the installation process:
sudo dnf -y install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Before you begin the installation process:
sudo dnf -y install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Before you begin the installation process:
sudo zypper -n install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Before you begin the installation process:
sudo zypper -n install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Before you begin the installation process:
sudo apt-get -y install edb-efm<4x>
```

Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.9, the package name is `edb-efm49`.
Where `<4x>` is the version of Failover Manager that you're installing. For example, if you're installing version 4.10, the package name is `edb-efm410`.

The installation process creates a user named efm that has privileges to invoke scripts that control the Failover Manager service for clusters owned by enterprisedb or postgres.

Expand Down
Loading

2 comments on commit 200f00c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://66c627d2c5d53c5983945c9e--edb-docs.netlify.app

Please sign in to comment.