You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove type specification for storages
- Added `optional` flag to storages
- Added `securityContext` to pod spec to inherit workflow user/group ID
permissions
- Added symlinks for Indexed-Mount types
Signed-off-by: Blake Devcich <blake.devcich@hpe.com>
Copy file name to clipboardExpand all lines: docs/rfcs/0002/readme.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The proposal below might take a couple of read-throughs; I've also added a concr
51
51
Example
52
52
-------
53
53
54
-
Say I authored a simple application, `foo`, that requires Rabbit local GFS2 storage and a persistent Lustre storage volume. As the author, my program is coded to expect the GFS2 volume is mounted at `/foo/local` and the Lustre volume is mounted at `/foo/persistent`
54
+
Say I authored a simple application, `foo`, that requires Rabbit local GFS2 storage and a persistent Lustre storage volume. As the author, my program is coded to expect the GFS2 volume is mounted at `/foo/local` and the Lustre volume is mounted at `/foo/persistent`. In this case, the storages are not optional, so they are defined as such in the NNF Container Profile.
55
55
56
56
Working with an administrator, my application's storage requirements and pod specification are placed in an NNF Container Profile `foo`:
57
57
@@ -64,9 +64,9 @@ metadata:
64
64
spec:
65
65
storages:
66
66
- name: JOB_DW_foo-local-storage
67
-
type: gfs2
67
+
optional: false
68
68
- name: PERSISTENT_DW_foo-persistent-storage
69
-
type: lustre
69
+
optional: false
70
70
template:
71
71
metadata:
72
72
name: foo
@@ -98,6 +98,8 @@ Say Peter wants to use `foo` as part of his job specification. Peter would submi
98
98
PERSISTENT_DW_foo-persistent-storage=some-lustre
99
99
```
100
100
101
+
Since the NNF Container Profile has specified that both storages are not optional (i.e. `optional: false`), they must both be present in the #DW directives along with the `container` directive. Alternatively, if either was marked as optional (i.e. `optional: true`), it would not be required to be present in the #DW directives and therefore would not be mounted into the container.
102
+
101
103
Peter submits the job to the WLM. WLM guides the job through the workflow states:
102
104
103
105
1. Proposal: Rabbit software verifies the #DW directives. For the container directive `my-foo` with profile `foo`, the storage requirements listed in the NNF Container Profile are `foo-local-storage` and `foo-persistent-storage`. These values are correctly represented by the directive so it is valid.
@@ -149,21 +151,30 @@ Peter submits the job to the WLM. WLM guides the job through the workflow states
149
151
- name: nnf-config
150
152
configMap:
151
153
name: my-job-container-my-foo
154
+
155
+
# securityContext added by Rabbit software - values will be inherited from the workflow
156
+
securityContext:
157
+
runAsUser: 1000
158
+
runAsGroup: 2000
159
+
fsGroup: 2000
152
160
```
153
161
3. Rabbit software starts the pods on Rabbit nodes
154
162
163
+
Security
164
+
--------
155
165
166
+
Kubernetes allows for a way to define permissions for a container using a [Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/). This can be seen in the pod template spec above. The user and group IDs will be inherited from the Workflow's spec.
156
167
157
168
Special Note: Indexed-Mount Type
158
169
--------------------------------
159
170
160
-
When using a file system like XFS or GFS2, each compute is allocated its own Rabbit volume. The Rabbit software mounts a collection of mount paths with a common prefix and an ending indexed value.
171
+
When using a file system like XFS or GFS2, each compute is allocated its own Rabbit volume. The Rabbit software mounts a collection of mount paths with a common prefix and an ending indexed value.
161
172
162
173
Application AUTHORS must be aware that their desired mount-point really contains a collection of directories, one for each compute node. The mount point type can be known by consulting the config map values.
163
174
164
175
If we continue the example from above, the `foo` application would expect the foo-local-storage path of `/foo/local` to contain several directories
165
176
166
-
```
177
+
```shell
167
178
# ls /foo/local/*
168
179
169
180
node-0
@@ -175,4 +186,6 @@ node-N
175
186
176
187
Node positions are ***not*** absolute locations. WLM could, in theory, select 6 physical compute nodes at physical location 1, 2, 3, 5, 8, 13, which would appear as directories `/node-0` through `/node-5` in the container path.
177
188
189
+
Symlinks will be added to support the physical compute node names. Assuming a compute node hostname of `compute-node-1` from the example above, it would link to `node-0`, `compute-node-2` would link to `node-1`, etc.
190
+
178
191
Additionally, not all container instances could see the same number of compute nodes in an indexed-mount scenario. If 17 compute nodes are required for the job, WLM may assign 16 nodes to run one Rabbit, and 1 node to another Rabbit.
0 commit comments