Add option to enable XRootD integrity script in the containers
Since the operators of most ATLAS and CMS XCaches use containers, we should allow operators to enable the XCache ROOT integrity script by setting an environment variable, which the container then takes to run the script. Since the script needs to be run periodically, we should add a cronfile to /etc/cron.d/ that respect the aforementioned environment variable.
See the stash-cache container for an example of cron jobs in a container: https://github.com/opensciencegrid/docker-xcache/tree/master/stash-cache
whelp, at least you’re now a world expert on XRootD cinfo files!
AFAIK nobody it is too slow to be useful and creates a lot of I/O pressure
this should be in all of the containers at this point. Do you know who’s using this?
Note that only the cms-xcache is ready for testing, since the same recipe used for the CMS container didn’t work as it is for the atlas one and needs further investigation.
The integration within the container seems fine, what I’ve done is:
Add a wrapper around the main script that sets PYTHONPATH and executes the script
add a cronjob to execute the wrapper above
add a script in image-config.d that saves the environment, so that the wrapper above can read the env var XC_XCACHE_CONSISTENCY_CHECK that enables the script
I’m still working out some issues found in the code during the integration process.
This is the draft PR with the changes listed above: