Skip to content

Commit 4e1b009

Browse files
authored
Data Movement: Added core dump documentation (#240)
Signed-off-by: Blake Devcich <blake.devcich@hpe.com>
1 parent 9483d8d commit 4e1b009

1 file changed

Lines changed: 84 additions & 7 deletions

File tree

docs/guides/data-movement/readme.md

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ authors: Blake Devcich <blake.devcich@hpe.com>
33
categories: provisioning
44
---
55

6-
# Data Movement Overview
7-
8-
## Configuration
6+
# Data Movement Configuration
97

108
Data Movement can be configured in multiple ways:
119

@@ -17,7 +15,7 @@ particular `NnfDataMovementProfile` (or the default). The second is done per the
1715
which allows for some configuration on a per-case basis, but is limited in scope. Both methods are
1816
meant to work in tandem.
1917

20-
### Data Movement Profiles
18+
## Data Movement Profiles
2119

2220
The server side configuration is controlled by creating `NnfDataMovementProfiles` resources in
2321
Kubernetes. These work similar to `NnfStorageProfiles`. See [here](../storage-profiles/readme.md)
@@ -30,7 +28,7 @@ referring to the following resources:
3028
- [Sample](https://github.com/NearNodeFlash/nnf-sos/blob/master/config/samples/nnf_v1alpha1_nnfdatamovementprofile.yaml) for `NnfDataMovementProfile`
3129
- [Online Examples](https://github.com/NearNodeFlash/nnf-sos/blob/master/config/examples/nnf_v1alpha1_nnfdatamovementprofile.yaml) for `NnfDataMovementProfile`
3230

33-
### Copy Offload API Daemon
31+
## Copy Offload API Daemon
3432

3533
The `CreateRequest` API call that is used to create Data Movement with the Copy Offload API has some
3634
options to allow a user to specify some options for that particular Data Movement operation. These
@@ -47,7 +45,7 @@ daemon in the case where the WLM will run it only on demand.
4745
See the [DataMovementCreateRequest API](copy-offload-api.html#datamovement.DataMovementCreateRequest)
4846
definition for what can be configured.
4947

50-
### SELinux and Data Movement
48+
## SELinux and Data Movement
5149

5250
Careful consideration must be taken when enabling SELinux on compute nodes. Doing so will result in
5351
SELinux Extended File Attributes (xattrs) being placed on files created by applications running on
@@ -62,7 +60,7 @@ option.
6260
See the [`dcp` documentation](https://mpifileutils.readthedocs.io/en/latest/dcp.1.html) for more
6361
information.
6462

65-
### `sshd` Configuration for Data Movement Workers
63+
## `sshd` Configuration for Data Movement Workers
6664

6765
The `nnf-dm-worker-*` pods run `sshd` in order to listen for `mpirun` jobs to perform data movement.
6866
The number of simultaneous connections is limited via the sshd configuration (i.e. `MaxStartups`).
@@ -72,3 +70,82 @@ start rejecting connections once the limit is reached.
7270

7371
The `sshd_config` is stored in the `nnf-dm-worker-config` `ConfigMap` so that it can be changed on
7472
a running system without needing to roll new images. This also enables site-specific configuration.
73+
74+
## Enabling Core Dumps
75+
76+
### Mounting core dump Volumes
77+
78+
First, you must determine how your nodes handle core dumps. For example, if `systemd-coredump` is
79+
used, then core dumps inside containers will be moved to the host node automatically. If that is
80+
not the case, then a directory on the host nodes will need to be mounted into the Data Movement
81+
containers. This directory will contain any core dumps collected by data movement operations, mainly
82+
`mpirun` or `dcp`.
83+
84+
For Data Movement, the pods are running on two types of Kubernetes nodes:
85+
86+
- `nnf-dm-worker` pods on Rabbit nodes
87+
- `nnf-dm-controller` pods on Kubernetes worker nodes
88+
89+
For all of these nodes, a core dump directory will need to be present and consistent across the
90+
nodes. Once in place, we can then edit the Kubernetes configuration to mount this directory from
91+
the host node to the containers using a [`hostPath`
92+
Volume](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).
93+
94+
Adding this configuration will be done via the gitops repository for the system. Patches will be used
95+
to patch the `nnf-dm` containers to mount the core dump directory via a `hostPath` volume.
96+
97+
An example of this configuration is provided in
98+
[`argocd-boilerplate`](https://github.com/NearNodeFlash/argocd-boilerplate/tree/main/environments/example-env/nnf-dm).
99+
There are two patch files that add Volumes to mount `/localdisk/dumps` from the host node at the
100+
same location inside the containers.
101+
102+
- [`dm-controller-coredumps.yaml`](https://github.com/NearNodeFlash/argocd-boilerplate/blob/main/environments/example-env/nnf-dm/dm-controller-coredumps.yaml)
103+
- [`dm-manager-coredumps.yaml`](https://github.com/NearNodeFlash/argocd-boilerplate/blob/main/environments/example-env/nnf-dm/dm-manager-coredumps.yaml)
104+
105+
[`kustomization.yaml`](https://github.com/NearNodeFlash/argocd-boilerplate/blob/main/environments/example-env/nnf-dm/kustomization.yaml#L13C1-L24C29)
106+
then applies these patches to the correct resources.
107+
108+
### Editing the Data Movement Command
109+
110+
Once the volume is in place, the Data Movement command must be updated to first `cd` into this
111+
directory. This ensures that the core dump is placed in that directory, making it accessible on the
112+
host node.
113+
114+
To achieve this, update the Data Movement profiles in your gitops repository to include a preceding
115+
`cd /localdisk/dumps && ...` in the `command` before the Data Movement command. For example, the default profile in `environments/<system>/nnf-sos/default-nnfdatamovementprofile.yaml` would look like the following:
116+
117+
```yaml
118+
kind: NnfDataMovementProfile
119+
metadata:
120+
name: default
121+
namespace: nnf-system
122+
data:
123+
command: ulimit -n 2048 && cd /localdisk/dumps && mpirun --allow-run-as-root --hostfile $HOSTFILE dcp --progress
124+
1 --uid $UID --gid $GID $SRC $DEST
125+
```
126+
127+
Note that core patterns for containers are inherited from the host and that Linux containers do not
128+
support a container-only core pattern without also affecting the host node. This is why we must use
129+
a preceding `cd <dir>` in the Data Movement command.
130+
131+
### Data Movement Debug Images
132+
133+
To help with debugging symbols, it is a good idea to use the `debug` version of the two images used by the Data Movement containers:
134+
135+
- `nnf-mfu-debug`
136+
- `nnf-dm-debug`
137+
138+
Both of these images include debugging symbols for [Open MPI](https://www.open-mpi.org/) and [mpiFileUtils](https://mpifileutils.readthedocs.io/en/v0.11.1/).
139+
140+
To use these images, edit the `environments/<system>/nnf-dm/kustomization.yaml` in your gitops repository and add the following:
141+
142+
```yaml
143+
# Use images with mpifileutils/mpirun debug symbols
144+
images:
145+
- name: ghcr.io/nearnodeflash/nnf-dm
146+
newName: ghcr.io/nearnodeflash/nnf-dm-debug
147+
- name: ghcr.io/nearnodeflash/nnf-mfu
148+
newName: ghcr.io/nearnodeflash/nnf-mfu-debug
149+
```
150+
151+
This will override the default images and use the debug symbols instead.

0 commit comments

Comments
 (0)