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

schema-salad LockFailed when running under Docker #47

Closed
dleehr opened this issue Feb 12, 2019 · 3 comments
Closed

schema-salad LockFailed when running under Docker #47

dleehr opened this issue Feb 12, 2019 · 3 comments
Labels
good first issue Good for newcomers

Comments

@dleehr
Copy link
Member

dleehr commented Feb 12, 2019

When running in Docker under openshift, the following error appears at the start of a calrissian run:

Could not load extension schema https://schema.org/docs/schema_org_rdfa.html: ('https://schema.org/docs/schema_org_rdfa.html', LockFailed('failed to create /.cache/salad/b/2/8/9/0/calrissian-gatk4-preprocessing-pkg-7rxg9-55dae700.13435938927651500254',))
Could not load extension schema https://schema.org/docs/schema_org_rdfa.html: ('https://schema.org/docs/schema_org_rdfa.html', LockFailed('failed to create /.cache/salad/b/2/8/9/0/calrissian-gatk4-preprocessing-pkg-7rxg9-55dae700.13435938927651500254',))

I suspect that schema-salad's home-dir lookup for caching is involved, and setting an environment variable on the pod would fix it.

@dleehr
Copy link
Member Author

dleehr commented Mar 7, 2019

Probably just a matter of setting an env var in the Dockerfile for HOME or TMPDIR

@dleehr dleehr added the good first issue Good for newcomers label Mar 7, 2019
@dleehr
Copy link
Member Author

dleehr commented Mar 7, 2019

The relevant code in schema_salad attempts to create a FileCache in $HOME if that variable exists.

At runtime, $HOME is set to / and the container user is a random UID (e.g. 1000320000)

$ whoami
whoami: cannot find name for user ID 1000320000
$ touch /file
touch: cannot touch '/file': Permission denied

@dleehr
Copy link
Member Author

dleehr commented Mar 7, 2019

This is a regression introduced in #42. The messages didn't appear with the S2I-built image. When using the centos/python-36-centos7 python image, $HOME is set to /opt/app-root/src/, and an arbitrary user has permissions to write there.

Remedy is to create a HOME directory in the Dockerfile, as the s2i image does:

  1. https://github.com/sclorg/s2i-base-container/blob/master/core/Dockerfile#L27 (Dockerfile entry to set ENV HOME)
  2. https://github.com/sclorg/s2i-base-container/blob/3c2b4d2e896a3fdea29f19580af1fe3d50c3db84/core/Dockerfile#L69-L72 (Dockerfile entry to make directory and change ownership)

@dleehr dleehr closed this as completed in 4271319 Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant