Skip to content
Snippets Groups Projects
Commit 741ae650 authored by John-Paul Robinson's avatar John-Paul Robinson
Browse files

Create a base implementation of parsable files

The policy file has both a LIST generation rule and a EXTERNAL LIST
consumer rule.  It uses the ESCAPE term to URL encode the ouput
generated by the LIST.
The external target script simply concats LIST files sent to it.
The mmapplypolicy command adds an additonal variable JOBID to
allow that to be passed as an OPT to the external script.
This let's us distinguish the ouput of one job from the next.
parent c59e637d
No related branches found
No related tags found
1 merge request!2Feat parsable file names
#!/bin/bash
# debug the calling convetion of the script
echo $@ >> data/call.log
case $1 in
LIST)
# just concat all file list files into a single file
# use opt parameter $3 as a tag to label the files
cat $2 >> data/listfile-${3}.log
rc=0
;;
TEST) # Respond with success
rc=0
;;
*) # Command not supported by this script
rc=1
;;
esac
exit $rc
/* list of files to include */
define( include_list,
(PATH_NAME LIKE 'FILEPATH%')
)
/* define access_age */
define(access_age,
(DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME))
)
RULE 'gather-exec' EXTERNAL LIST 'gather-info' EXEC '/data/rc/gpfs-policy/gather-info.sh' OPTS 'JOBID' ESCAPE '%'
RULE 'list-path' LIST 'gather-info'
SHOW ('|size=' || varchar(FILE_SIZE) ||
'|kballoc='|| varchar(KB_ALLOCATED) ||
'|access=' || varchar(ACCESS_TIME) ||
'|create=' || varchar(CREATION_TIME) ||
'|modify=' || varchar(MODIFICATION_TIME) ||
'|uid=' || varchar(USER_ID) ||
'|gid=' || varchar(GROUP_ID) ||
'|heat=' || varchar(FILE_HEAT) ||
'|pool=' || varchar(POOL_NAME) ||
'|mode=' || varchar(MODE) ||
'|misc=' || varchar(MISC_ATTRIBUTES) ||
'|'
)
WHERE include_list
......@@ -24,6 +24,7 @@ cmd="mmapplypolicy ${filesystem} -I prepare \
-g $tmpglobal \
-s $tmpscratch \
-M FILEPATH=${filesystem} \
-M JOBID=${SLURM_JOBID} \
-N ${nodes} -n ${cores}"
# report final command in job log
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment