Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Add docker image volume to mongo container in java-mongo devfile #188

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

amisevsk
Copy link
Contributor

What does this PR do?

The mongodb container in the java-mongo devfile mounts a volume, which causes it to be unrunnable on Hosted Che.

This PR adds a volume for the mongodb container to make it runnable, but there's no way to force a volume such as this to be emptyDir, so we do introduce all the risks of storing more data in a PV (slow writes, potentially, etc.).

What issues does this PR fix or reference?

Fixes eclipse-che/che#15850

The mongodb container in the java-mongo devfile mounts a volume, which
causes it to be unrunnable on some OpenShift configurations. For now, we
add an explicit volume mount to allow the workspace to start.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@nickboldt nickboldt mentioned this pull request Jan 28, 2020
15 tasks
Copy link

@Katka92 Katka92 left a comment

Choose a reason for hiding this comment

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

Thank you for a quick fix :)

@sleshchenko
Copy link
Member

but there's no way to force a volume such as this to be emptyDir, so we do introduce all the risks of storing more data in a PV (slow writes, potentially, etc.).

In my understanding each volume should be transformed to emptyDir if a workspace is configured to use temporary storage(new wording for ephemeral mode). So, it would slow down only workspaces without temporary storage, right or do I miss something?

BTW I suppose it might be useful to configure specific volume to be temporary in addition to configuring it on Devfile level globally.

@nickboldt nickboldt merged commit 1a21460 into eclipse-che:master Jan 29, 2020
@amisevsk
Copy link
Contributor Author

In my understanding each volume should be transformed to emptyDir if a workspace is configured to use temporary storage(new wording for ephemeral mode). So, it would slow down only workspaces without temporary storage, right or do I miss something?

Yeah, my main issue is that there's no reason to actually mount this as a persistent volume; there's no hard requirement that data in the testing db is persisted (and might make some things more confusing if there's a "configure database" command). Ideally, I'd like to see devfile volumes to be extended along the lines of

  volumes:
  - name: mongodb_data
    containerPath: /var/lib/mongodb/data
    persistent: false

to force that specific volume to be created as emptyDir, regardless of the default. persistent: true would be default and would be overridden by Che server settings (if workspace is set as ephemeral overall).

sparkoo pushed a commit to sparkoo/che-devfile-registry that referenced this pull request Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java with MongoDB not starting
5 participants