Skip to content

Commit 4f723bc

Browse files
add documentation for which variables are available during user command execution
Signed-off-by: Matt Richerson <matthew.richerson@hpe.com>
1 parent f26afaf commit 4f723bc

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

docs/guides/storage-profiles/readme.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,96 @@ For system storage allocations:
744744
|----------|-------------|
745745
| `$COMPUTE_HOSTNAME` | Hostname of the compute node using the allocation |
746746

747+
### User Command Variables
748+
749+
Different variables are available depending on which user command hook is being executed.
750+
751+
#### Block Device User Commands
752+
753+
The following variables are available to `blockDeviceCommands.rabbitCommands.userCommands` and `blockDeviceCommands.computeCommands.userCommands` (preActivate, postActivate, preDeactivate, postDeactivate):
754+
755+
| Variable | Description |
756+
|----------|-------------|
757+
| `$JOBID` | Job ID from the Workflow |
758+
| `$USERID` | User ID of the job submitter |
759+
| `$GROUPID` | Group ID of the job submitter |
760+
| `$VG_NAME` | Volume group name |
761+
| `$LV_NAME` | Logical volume name |
762+
763+
#### File System User Commands
764+
765+
The following variables are available to `fileSystemCommands.rabbitCommands.userCommands` and `fileSystemCommands.computeCommands.userCommands` (preMount, postMount, preUnmount, postUnmount):
766+
767+
| Variable | Description |
768+
|----------|-------------|
769+
| `$JOBID` | Job ID from the Workflow |
770+
| `$USERID` | User ID of the job submitter |
771+
| `$GROUPID` | Group ID of the job submitter |
772+
| `$DEVICE` | Device path being mounted |
773+
| `$MOUNT_PATH` | Path where the file system is mounted |
774+
775+
#### Storage-Level User Commands
776+
777+
The following variables are available to `userCommands` at the storage level (postSetup, preTeardown, postActivate, preDeactivate):
778+
779+
| Variable | Description |
780+
|----------|-------------|
781+
| `$JOBID` | Job ID from the Workflow |
782+
| `$USERID` | User ID of the job submitter |
783+
| `$GROUPID` | Group ID of the job submitter |
784+
| `$MOUNT_PATH` | Path where the file system is mounted |
785+
786+
#### Lustre Target User Commands
787+
788+
The following variables are available to Lustre target commands (mgtCommandlines, mdtCommandlines, mgtMdtCommandlines, ostCommandlines) for postActivate and preDeactivate:
789+
790+
| Variable | Description |
791+
|----------|-------------|
792+
| `$JOBID` | Job ID from the Workflow |
793+
| `$MOUNT_PATH` | Path where the target is mounted |
794+
| `$FS_NAME` | Lustre file system name |
795+
| `$TARGET_NAME` | Target name (e.g., `mylus-OST0003`) |
796+
797+
#### Lustre Client User Commands
798+
799+
The following variables are available to `clientCommandLines` user commands:
800+
801+
**For rabbitPreMount, rabbitPostMount, rabbitPreUnmount, rabbitPostUnmount, computePreMount, computePostMount, computePreUnmount, computePostUnmount:**
802+
803+
| Variable | Description |
804+
|----------|-------------|
805+
| `$JOBID` | Job ID from the Workflow |
806+
| `$USERID` | User ID of the job submitter |
807+
| `$GROUPID` | Group ID of the job submitter |
808+
| `$MGS_NID` | NID of the MGS |
809+
| `$FS_NAME` | Lustre file system name |
810+
| `$MOUNT_PATH` | Path where the client is mounted |
811+
812+
**For rabbitPostSetup and rabbitPreTeardown:**
813+
814+
| Variable | Description |
815+
|----------|-------------|
816+
| `$JOBID` | Job ID from the Workflow |
817+
| `$USERID` | User ID of the job submitter |
818+
| `$GROUPID` | Group ID of the job submitter |
819+
| `$MGS_NID` | NID of the MGS |
820+
| `$FS_NAME` | Lustre file system name |
821+
| `$MOUNT_PATH` | Path where the client is mounted |
822+
| `$NUM_MDTS` | Number of MDTs |
823+
| `$NUM_MGTS` | Number of MGTs |
824+
| `$NUM_MGTMDTS` | Number of combined MGT/MDTs |
825+
| `$NUM_OSTS` | Number of OSTs |
826+
| `$NUM_NNFNODES` | Number of NNF nodes |
827+
828+
#### Lustre preMountMGTCommands
829+
830+
The following variables are available to `preMountMGTCommands`:
831+
832+
| Variable | Description |
833+
|----------|-------------|
834+
| `$JOBID` | Job ID from the Workflow |
835+
| `$FS_NAME` | Lustre file system name |
836+
747837
## Advanced Configuration
748838

749839
### External MGS

0 commit comments

Comments
 (0)