From 7cdc2e62aff0eab9541a0b7439815fda8d5bd6d5 Mon Sep 17 00:00:00 2001 From: Arthur Nascimento Date: Thu, 7 Sep 2023 17:06:38 -0300 Subject: [PATCH 1/2] Update 05_using_efm.mdx This changes the instructions on how to customize systemd service files. The instructions were directing the reader to edit files in /usr/lib/systemd/system, which is not the adequate location. Whenever a system administrator edits service files, they should always do so in /etc/systemd/system, either with systemctl edit or editing the files directly, but never editing anything in /lib or /usr. --- product_docs/docs/efm/4/05_using_efm.mdx | 30 ++++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/product_docs/docs/efm/4/05_using_efm.mdx b/product_docs/docs/efm/4/05_using_efm.mdx index fe797d2ee82..0ade30d911d 100644 --- a/product_docs/docs/efm/4/05_using_efm.mdx +++ b/product_docs/docs/efm/4/05_using_efm.mdx @@ -265,27 +265,37 @@ After creating the `acctg.properties` and `sales.properties` files, create a ser ### RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x -If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the `edb-efm-4.` unit file to a new file with a name that is unique for each cluster. For example, if you have two clusters named acctg and sales, the unit file names might be: +If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the service file `/usr/lib/systemd/system/edb-efm-4..service` to `/etc/systemd/system` with a new name that is unique for each cluster. -```text -/usr/lib/systemd/system/efm-acctg.service +For example, if you have two clusters named `acctg` and `sales` managed by EFM 4.7, the unit file names might be `efm-acctg.service` and `efm-sales.service`, and they can be created with: -/usr/lib/systemd/system/efm-sales.service +```shell +cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-acctg.service +cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-sales.service ``` -Then, edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name. For example, for a cluster named `acctg`, the value specifies: +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. +Also update the value of the `PIDfile` parameter to match the new cluster name. -```text +In our example, edit the `acctg` cluster by running `systemctl edit efm-acctg.service` and write: + +```ini +[Service] Environment=CLUSTER=acctg +PIDFile=/run/efm-4.7/acctg.pid ``` -Also update the value of the `PIDfile` parameter to specify the new cluster name. For example: +And edit the `sales` cluster by running `systemctl edit efm-sales.service` and write: ```ini -PIDFile=/var/run/efm-4.7/acctg.pid +[Service] +Environment=CLUSTER=sales +PIDFile=/run/efm-4.7/sales.pid ``` -After copying the service scripts, enable the services: +Note: You could also have edited the files in `/etc/systemd/system` directly, but then you'll have to run `systemctl daemon-reload`, which is unecessary when using `systemd edit` to change the override files. + +After saving the changes, enable the services: ```text # systemctl enable efm-acctg.service @@ -296,7 +306,7 @@ After copying the service scripts, enable the services: Then, use the new service scripts to start the agents. For example, to start the `acctg` agent: ```text -# systemctl start efm-acctg` +# systemctl start efm-acctg ``` For information about customizing a unit file, see [Understanding and administering systemd](https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html). From 49497d5ac592ac1ebfc294bfbe1607c66a83e6a9 Mon Sep 17 00:00:00 2001 From: Dee Dee Rothery <83650384+drothery-edb@users.noreply.github.com> Date: Fri, 8 Sep 2023 06:29:56 -0400 Subject: [PATCH 2/2] minor copyedits --- product_docs/docs/efm/4/05_using_efm.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product_docs/docs/efm/4/05_using_efm.mdx b/product_docs/docs/efm/4/05_using_efm.mdx index 0ade30d911d..6a7c7601131 100644 --- a/product_docs/docs/efm/4/05_using_efm.mdx +++ b/product_docs/docs/efm/4/05_using_efm.mdx @@ -267,7 +267,7 @@ After creating the `acctg.properties` and `sales.properties` files, create a ser If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the service file `/usr/lib/systemd/system/edb-efm-4..service` to `/etc/systemd/system` with a new name that is unique for each cluster. -For example, if you have two clusters named `acctg` and `sales` managed by EFM 4.7, the unit file names might be `efm-acctg.service` and `efm-sales.service`, and they can be created with: +For example, if you have two clusters named `acctg` and `sales` managed by Failover Manager 4.7, the unit file names might be `efm-acctg.service` and `efm-sales.service`, and they can be created with: ```shell cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-acctg.service @@ -293,7 +293,9 @@ Environment=CLUSTER=sales PIDFile=/run/efm-4.7/sales.pid ``` -Note: You could also have edited the files in `/etc/systemd/system` directly, but then you'll have to run `systemctl daemon-reload`, which is unecessary when using `systemd edit` to change the override files. +!!!Note +You could also have edited the files in `/etc/systemd/system` directly, but then you'll have to run `systemctl daemon-reload`, which is unecessary when using `systemd edit` to change the override files. +!!! After saving the changes, enable the services: