-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Volume sharing between init container and che-plugin container does not working #17102
Comments
Looking into workspace resulting yaml, here is mounts:
Pod Volumes (except secret):
So seems mount in init and plugin containers refers to different volumes of the pod. |
This issue blocks #17924 |
Per Eric's comments, setting milestone 7.21 for now |
@ericwill Can you please concretize a bit your exact usecase. I mean, how do you define init containers and volumes inside of it (is is an K8S component with volumes defined at it's recipe level or the volume is at the devile component level etc), what kind of dependable component etc. |
@mshaposhnik as described in #16851 (comment), we're trying to copy a directory from a container to an ephemeral volume so that we can reuse that directory in a plugin component. We don't really care what component that init container is attached to. |
@ericwill @tsmaeder we have a working solution prototype, but it is should be configured a bit differently.
|
@mshaposhnik will this create an ephemeral volume? That's the important part. |
@tsmaeder yep, nothing changed there. We just add provisioing of the devfile volumes into init containers. |
I just don't see how we can tell when to allocate a persistent volume and when to allocate local storage. |
what do you mean by "local storage"? Whole workspace storage can be persistent or ephemeral. it can't be specified per-component. |
@mshaposhnik if you read #16851 (comment) and later comments, it should become clear what the requirements are. Persistent volumes are 10x slower (at least on openshift.io) and therefore no good. |
It can ) Plugin metadata allows requiring ephemeral persistence independent from workspace storage type. https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/eclipse/che-theia/next/meta.yaml#L88 ( the PR where it was implemented on Che Server side #14539 ) |
Ok it can be different for particular che-plugin, but that's imo little out of the current context (IMO this check should have been implemented in the original PR). The main question for now is how to deal with volumes described directly in K8S/OS recipes and align them with other workspace volumes in terms of sharing, type etc... |
Fix is merged now. |
@mshaposhnik do we have reference documentation that shows the different ways I can define init containers in a devfile? Is there a way to define an init container for the whole workspace? |
When I add the "ephemeral" field to a volume I define in the devfile, che nightly complains that the devfile is not valid. |
|
The full monty:
|
So does the volume sharing between init container and che-plugin container working? |
When I add a volume to the java meta.yaml like so:
the init container has load of errors like this one:
|
@mshaposhnik please note that supporting ephemeral containers via the keyword |
I have tested it using |
@ericwill in fact what you requesting is completely another issue. You asking for ability so set |
Sorry, perhaps it wasn't clear. Yes this is a requirement as well. To summarize, we need to:
|
7.21 is done, slip to 7.22 |
So closing that in favor of #18271 @skabashnyuk @ericwill ? |
No objections! I do have a question though: when |
@ericwill should work (i just have no plugins with ephemeral volumes to test) |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
Describe the bug
Volume sharing between init container and che-plugin container seems does not working.
Che version
Steps to reproduce
Consider the following devfile, which fills some volume in init container, and want to read it contents
in chePlugin type component container:
devfile
Expected behavior
It's expected to see volule non-empty.
The text was updated successfully, but these errors were encountered: