Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workdir is not TMPDIR #542

Open
gaponenko opened this issue Feb 28, 2024 · 4 comments
Open

workdir is not TMPDIR #542

gaponenko opened this issue Feb 28, 2024 · 4 comments

Comments

@gaponenko
Copy link

Hello,

jobsub_submit uses the current working directory to place temporary
files. This introduces unnecessary restriction that the submission
directory has to be writable and has to have sufficient free space.
Also, the files are routinely left over when the submission process is
interrupted, another annoyance. Please use mkstemp() or equivalent to
make temporary files end up in TMPDIR or /tmp.

Andrei

@marcmengel
Copy link
Contributor

We tried that, but while experienced UNIX/Linux users are aware of setting TMPDIR and/or XDG_CACHE_HOME, many users are not, and the /tmp on many systems is quite frequently full or near full, causing launch errors.

So most of the submit files are placed in $XDG_CACHE_HOME, which defaults to $HOME/.cache, and we tried
putting tarfiles in TMPDIR defaulting to /tmp, but as mentioned this got lots of complaints with /tmp being
full, then we tried putting the tarfiile directory (for tardir: particularly) next to the directory being tar-ed up, but
many users were tar-ing up directories they didn't own, so they couldn't write there; then we finally settled on
the current directory, which is where the old jobsub scripts have put the tarfiles (for tardir: at least) for many years, and thus is backwards compatible, and many users seem to be more comfortable changing directories to submit than remembering to set TMPDIR.

Besides which the tarfile conversion is usually quite quick; I suspect yours isn't because you are using dropbox: on a /pnfs/.../persistent file .

@kutschke
Copy link

@marcmengel i want to understand your reply to Andrei - since RCDS, I normally send tarfiles that are located on /exp/mu2e/data. I believe that's prefered over /pnfs, right? In the old days we had to use /pnfs but those days are long past. Right?

@kutschke
Copy link

XDG_CACHE_HOME is not defined on our machines. Is it used for anything else? Depending on the answer, it might make sense for us to define it in our /cvmfs/mu2e.opensciencegrid.org/init.sh which is scheduled to replace /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh as soon as we are up and running on AL9. This will cover all use cases except people who want to use bare jobsub_submit outside of the Mu2e environment.

@shreyb
Copy link
Collaborator

shreyb commented Mar 1, 2024

In response to your last question, @kutschke: In implementing this, we followed the XDG Base Directory Specification, so that if $XDG_CACHE_HOME is not defined, then $HOME/.cache is used for the submit files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants