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

Add staged_root to submit.yml.erb's rendering context #864

Closed
johrstrom opened this issue Jan 26, 2021 · 2 comments · Fixed by #1159
Closed

Add staged_root to submit.yml.erb's rendering context #864

johrstrom opened this issue Jan 26, 2021 · 2 comments · Fixed by #1159

Comments

@johrstrom
Copy link
Contributor

A discourse topic about error paths came in, and while folks are able to set script.error_path in their submit yml, they have no way of using the staged_root where everything else is.

So my thinking is we may want to add staged_root to the app#submit_opts context's so that folks can do something like this in their submit.yml.erb.

script:
  error_path: "<%= staged_root %>/error.log"

Incidentally - this is why the k8s adapter has to use a special way of passing back connection information. If the staged root is known up front in the submit.yml.erb then we may be able to write the connection.yml in an init container (if the $HOME directory is being mounted which is not a guarantee).

@treydock
Copy link
Contributor

If staged_root is available we could also write the connection YAML in regular template ERB scripts like the regular HPC batch connect apps do. There is no need to use init containers since the main container can do it just the same if $HOME is mounted into the pod.

@johrstrom
Copy link
Contributor Author

Yea. #605 means that folks can't use partition as a field name. This solves that partially, but if someone did that, they would not be able to use context.partion in the template/script.sh.erb.

In any case, yea I'm thinking we should fix #948 with a more simple change and pick up #605 at some other point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment