This PR makes manta capable of running scripts before and after each migrate restore or migrate backup operations. These optional scripts run in the same host where manta is running and with the same permissions of the user launching them, and can be used to inject additional operations in the workflow. For instance, one could consider the following workflow:
pre-restore.sh creates all the necessary pods and restores the DB. Also creates the required VLAN.
manta does its magic.
post-backup.sh starts up the cluster.
Clearly all of this could be done by running scripts before and after of calling the manta binary, but I think integrating it in the operations themselves improves the process and makes it more robust.
This PR makes
manta
capable of running scripts before and after each migrate restore or migrate backup operations. These optional scripts run in the same host wheremanta
is running and with the same permissions of the user launching them, and can be used to inject additional operations in the workflow. For instance, one could consider the following workflow:manta migrate backup -b <BOS> -d $PWD --pre-hook $PWD/pre-backup.sh --post-hook $PWD/post-backup.sh
pre-backup.sh
takes a backup of the Slurm DB.manta
does its magic.post-backup.sh
takes a snapshot of the configuration of Slurm, or maybe stops the cluster and removes the VLAN.manta migrate restore --bos-file <BOS.json> --cfs-file <CFS.json> --hsm-file <HSM.json> --ims-file <IMS>.json --image-dir <IMG_ID> --pre-hook $PWD/pre-restore.sh --post-hook $PWD/post-restore.sh
pre-restore.sh
creates all the necessary pods and restores the DB. Also creates the required VLAN.manta
does its magic.post-backup.sh
starts up the cluster.Clearly all of this could be done by running scripts before and after of calling the
manta
binary, but I think integrating it in the operations themselves improves the process and makes it more robust.