Create a staging area for the upstream repo and the Cheaha config files
Create a staging area for the upstream repo and the Cheaha config files. I do this under `~/build/nhc` so that I can have files / directories other than just our repo under `~/build/nhc`, thus the git clone of our repo will end up as `~/build/nhc/nhc`
I have created two test files on `/data` and `/scratch` that are used by the `check_file_test` test in the [nhc.conf](nhc.conf) file. These will be used as a test to ensure that a file on GPFS is readable.
I have created two test files on `/data` and `/scratch` that are used by the `check_file_test` test in the [nhc.conf](nhc.conf) file. These will be used as a test to ensure that a file on GPFS is readable. This only has to be done once (i.e. I did it), unless we decide to perform a `check_file_test` on other file systems or paths on the same file system.
```shell
```shell
sudo touch /data/.nhc-test /scratch/.nhc-test
sudo touch /data/.nhc-test /scratch/.nhc-test
```
```
Install the [NHC RPM](https://github.com/mej/nhc/releases/tag/1.4.3) in the compute node image(s) (currently v1.4.3) and copy the config files.
(BrightCM Instructions) Install the [NHC RPM](https://github.com/mej/nhc/releases/tag/1.4.3) in the compute node image(s) (currently v1.4.3) and copy the config files. This is already done on the physical compute nodes and their images. If building an image/system not managed by BrightCM, install the appropriat package, depending on the OS (rpm, deb, from source, etc...), using the appropriate framework (Ansible, ...)
```shell
```shell
cd /cm/images
cd /cm/images
...
@@ -52,35 +51,38 @@ done
...
@@ -52,35 +51,38 @@ done
cd -
cd -
```
```
Deploy the RPM and Config files to the running compute nodes
(BrightCM Instructions) Instead of waiting for all of our nodes to reboot to pick up the changes, we'll deploy the RPM and Config files to the running compute nodes
Add the following lines to `/etc/slurm/slurm.conf`
Slurm Configuration
> `HealthCheckProgram`: Fully qualified pathname of a script to execute as user root periodically on all compute nodes that are not in the `NOT_RESPONDING` state. This program may be used to verify the node is fully operational and DRAIN the node or send email if a problem is detected. Any action to be taken must be explicitly performed by the program (e.g. execute "`scontrol update NodeName=foo State=drain Reason=tmp_file_system_full`" to drain a node). The execution interval is controlled using the `HealthCheckInterval` parameter. Note that the `HealthCheckProgram` will be executed at the same time on all nodes to minimize its impact upon parallel programs. This program will be killed if it does not terminate normally within 60 seconds. This program will also be executed when the `slurmd` daemon is first started and before it registers with the `slurmctld` daemon. By default, no program will be executed.
> `HealthCheckInterval`: The interval in seconds between executions of `HealthCheckProgram`. The default value is zero, which disables execution.
```shell
> `HealthCheckProgram`: Fully qualified pathname of a script to execute as user root periodically on all compute nodes that are not in the `NOT_RESPONDING` state. This program may be used to verify the node is fully operational and DRAIN the node or send email if a problem is detected. Any action to be taken must be explicitly performed by the program (e.g. execute "`scontrol update NodeName=foo State=drain Reason=tmp_file_system_full`" to drain a node). The execution interval is controlled using the `HealthCheckInterval` parameter. Note that the `HealthCheckProgram` will be executed at the same time on all nodes to minimize its impact upon parallel programs. This program will be killed if it does not terminate normally within 60 seconds. This program will also be executed when the `slurmd` daemon is first started and before it registers with the `slurmctld` daemon. By default, no program will be executed.
## 20230424 - MJH - Adding Node Health Check (NHC)
> `HealthCheckInterval`: The interval in seconds between executions of `HealthCheckProgram`. The default value is zero, which disables execution.
HealthCheckProgram=/usr/sbin/nhc-wrapper
HealthCheckInterval=300
HealthCheckNodeState=ANY,CYCLE
```
Instruct the `slurmd` clients to reread the `slurm.conf` file
- Add the following lines to `/etc/slurm/slurm.conf`. **SLURM ADMINISTRATOR ONLY**. I have already performed this step. `slurm.conf` along with the other files in `/etc/slurm` are symlinks that point to files under NFS mount `/cm/shared/apps/slurm/var/etc/`. Once the changes are made and the file saved, all of the Slurm nodes see the change and the daemons must be reloaded.
```shell
```shell
scontrol_admin reconfigure
## 20230424 - MJH - Adding Node Health Check (NHC)
```
HealthCheckProgram=/usr/sbin/nhc-wrapper
\ No newline at end of file
HealthCheckInterval=300
HealthCheckNodeState=ANY,CYCLE
```
- Instruct the `slurmd` clients to reread the `slurm.conf` file.