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

cz-pulsar: Fix problems with Java tmp dir #930

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/galaxy/tpv/destinations.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ destinations:
params:
jobs_directory: "/storage/praha5-elixir/home/galaxyeu/pulsar-eu/files/staging"
persistence_directory: "/storage/praha5-elixir/home/galaxyeu/pulsar-eu/files/persistent"
singularity_volumes: "$job_directory:rw,$tool_directory:ro,$job_directory/outputs:rw,$working_directory:rw,/cvmfs/data.galaxyproject.org:ro,$SCRATCHDIR,/storage/praha5-elixir/home/galaxyeu:/home/galaxyeu,/cvmfs/data.galaxyproject.org/managed/:/data/db/data_managers/:ro"
singularity_volumes: "$job_directory:rw,$tool_directory:ro,$job_directory/outputs:rw,$working_directory:rw,/cvmfs/data.galaxyproject.org:ro,$SCRATCHDIR:rw,/storage/praha5-elixir/home/galaxyeu:/home/galaxyeu:rw,/cvmfs/data.galaxyproject.org/managed/:/data/db/data_managers/:ro,$SCRATCHDIR:/tmp:rw"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are mounting SCRATCHDIR twice as it seems. And Singularity was picky about /tmp afaik. Maybe you can check the documentation if mounting to /tmp is safe for Singularity.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, that's precisely why I am trying this solution cause, from what I have read, singularity is always binding some system locations (e.g., /tmp), but we don't want that. That's why I have set all the TMP, TMPDIR, TEMP to point to SCRATCHDIR, but JVM is ignoring this and tries to use bound /tmp inside the container pointing to /tmp outside. That was fine a few weeks ago, but now I noticed that something has changed, and singularity calls now contain --no-mount tmp parameter, and for example, FastQC is not working because of that. So I hope this direct bind of SCRATCHDIR to be used as /tmp inside the container is just another way of forcing tools to use SCRATCHDIR, if I'm not wrong. I tested such a singularity call and it finished without error. Do you think it may cause some security issues?

Copy link
Member

@bgruening bgruening Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, maybe this is a super stupid proposal, but have you tried setting:

_JAVA_OPTIONS: -Djava.io.tmpdir=/foo/bar/something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it crossed my mind, and it works. I just wanted to solve this on a bigger scale than just for JAVA apps, originally. However, if you think it's not a good idea, let's try this solution and time will tell what other tools need a patch.

scheduling:
require:
- cz-pulsar
Expand Down
Loading