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

Use emptyDir for '/tmp' inside containers #62

Merged
merged 3 commits into from
Mar 20, 2019
Merged

Conversation

dleehr
Copy link
Member

@dleehr dleehr commented Mar 20, 2019

  • Updates KubernetesVolumeBuilder to support a list of named emptyDir volumes
  • Updates CalrissianCommandLineJob.create_kubernetes_runtime to use an emptyDir volume for '/tmp' inside the container

Upon implementation, I don't think this will conflict with any of the special cases mentioned in #30 (writable files being copied into /tmp). These files are copied on the calrissian host and mounted later (via add_volumes()). This change will mount the base /tmp as an emptyDir but additional direct mounts to files placed by calrissian shouldn't be impacted.

tl;dr - this is a simple fix for #30 that shouldn't break the existing special cases (that we don't use anyway)

Fixes #30

- Updates KubernetesVolumeBuilder to support a list of named emptyDir volumes
- Updates CalrissianCommandLineJob.create_kubernetes_runtime to use an emptyDir volume for '/tmp' inside the container

Upon implementation, I don't think this will conflict with any of the special cases mentioned in #30 (writable files being copied into /tmp). These files are copied on the calrissian host and mounted later (via `add_volumes()`). This change will mount the base `/tmp` as an `emptyDir` but additional direct mounts to files placed by calrissian shouldn't be impacted.

Fixes #30
@dleehr dleehr requested a review from johnbradley March 20, 2019 14:36
Copy link
Contributor

@johnbradley johnbradley left a comment

Choose a reason for hiding this comment

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

LGTM

What purpose does the volume we pass via the calrissian --tmpdir-prefix option serve now?

- "--tmpdir-prefix"
- "/calrissian/tmptmp/"

When using calrissian do we even need to create a "tmpdir" volume and pass it now?

@dleehr
Copy link
Member Author

dleehr commented Mar 20, 2019

When using calrissian do we even need to create a "tmpdir" volume and pass it now?

In most cases, no. I'll document the exceptions in an issue, since there's still places it makes sense but it's not typical and not necessary for any of our workflows. Let me update the examples to remove the tmpdir volume claim.

@dleehr
Copy link
Member Author

dleehr commented Mar 20, 2019

Discussion about --tmpdir-prefix and side effects in #65

@dleehr dleehr merged commit c4e1da4 into master Mar 20, 2019
@dleehr dleehr deleted the 30-tmpdir-as-emptydir branch March 20, 2019 17:37
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

Successfully merging this pull request may close these issues.

Reconsider mounting /tmp as a shared PersistentVolumeClaim
2 participants