Description of problem: While preparing documentation for restraint, I observed that rstrnt-backup/rstrnt-restore are using ${HARNESS_PREFIX}RUNPATH))/backup as a default path. There does not exist an environment variable ${HARNESS_PREFIX}RUNPATH so you end up creating a directory /backup. Perhaps it would be better to put it in another well known restraint subdirectory. Minimally remove reference to directories in the scripts which do not exist. 2) When running the backup script with 'bash -x rstrnt-backup', I observed the following error. Let's fix this. rstrnt-restore should also be reviewed. + mkdir -p /backup/tmp + true + cp -fac /tmp/cbouchar.txt /backup/tmp cp: warning: option '-c' is deprecated, please use '--preserve=context' instead Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. These anomalies can be observed with the following tasks (the 2nd task in particular): <task name="/distribution/command" role="STANDALONE"> <params> <param name="CMDS_TO_RUN" value="set +x ; echo "this is a test" >> /tmp/cbouchar.txt"/> </params> </task> <task name="/distribution/command" role="STANDALONE"> <params> <param name="CMDS_TO_RUN" value="set +x ; bash -x rstrnt-backup /tmp/cbouchar.txt; echo $RSTRNT_RUNPATH; rm /tmp/cbouchar.txt"/> </params> </task> <task name="/distribution/command" role="STANDALONE"> <params> <param name="CMDS_TO_RUN" value="set +x ; cat /tmp/cbouchar.txt"/> </params> </task> Actual results: Expected results: Additional info:
Regarding "${HARNESS_PREFIX}RUNPATH))/backup", as it looks like very legacy thing, and we don't know if there is anybody relying on it, I would suggest to keep it as it is, and in documentation state that: The default path for backup and restore is "/backup". To use a different path the "RSTRNT_BACKUP_DIR" environment variable must be set.
I agree. I grepped the rhts scripts and didn't find anything but you don't know what introduced it in the first place. I'll add it to my rhts conversion documentation. I'm next focusing on environment variables like this. This will be difficult to identify but I'll do my best. Closing with 'WONT FIX'. I'd like to change this but I don't think we can.