Skip to content

Commit 4af2b60

Browse files
authored
Update Containers RFC (#19)
- 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>
1 parent 9011d13 commit 4af2b60

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

docs/rfcs/0002/readme.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The proposal below might take a couple of read-throughs; I've also added a concr
5151
Example
5252
-------
5353

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.
5555

5656
Working with an administrator, my application's storage requirements and pod specification are placed in an NNF Container Profile `foo`:
5757

@@ -64,9 +64,9 @@ metadata:
6464
spec:
6565
storages:
6666
- name: JOB_DW_foo-local-storage
67-
type: gfs2
67+
optional: false
6868
- name: PERSISTENT_DW_foo-persistent-storage
69-
type: lustre
69+
optional: false
7070
template:
7171
metadata:
7272
name: foo
@@ -98,6 +98,8 @@ Say Peter wants to use `foo` as part of his job specification. Peter would submi
9898
PERSISTENT_DW_foo-persistent-storage=some-lustre
9999
```
100100
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+
101103
Peter submits the job to the WLM. WLM guides the job through the workflow states:
102104
103105
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
149151
- name: nnf-config
150152
configMap:
151153
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
152160
```
153161
3. Rabbit software starts the pods on Rabbit nodes
154162
163+
Security
164+
--------
155165
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.
156167
157168
Special Note: Indexed-Mount Type
158169
--------------------------------
159170
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.
161172
162173
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.
163174
164175
If we continue the example from above, the `foo` application would expect the foo-local-storage path of `/foo/local` to contain several directories
165176

166-
```
177+
```shell
167178
# ls /foo/local/*
168179
169180
node-0
@@ -175,4 +186,6 @@ node-N
175186

176187
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.
177188

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+
178191
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

Comments
 (0)