che icon indicating copy to clipboard operation
che copied to clipboard

Path /projects as shared volume does not work

Open toorog opened this issue 8 years ago • 6 comments

Description

I want to share /projects between two machines in the same workspace. To do so, I defined the following section for both machines in the stack:

"volumes": {
              "sharedvolume": {
                "path": "/projects"
              }
            }

If I do that, the deployment fails with the message shown in the diagnostics section. Every other path seems to work fine.

Reproduction Steps

OS and version:
Kubernetes, Che 6.7.0

Diagnostics:

Failed to start Kubernetes runtime of workspace workspace09ucf6avc19qid0w. Cause: Failure executing: POST at: https://kubernetes.default.svc/api/v1/namespaces/che-workspace/pods. Message: Pod "workspace09ucf6avc19qid0w.mypod" is invalid: spec.containers[1].volumeMounts[2].mountPath: Invalid value: "/projects": must be unique. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.containers[1].volumeMounts[2].mountPath, message=Invalid value: "/projects": must be unique, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=Pod, name=workspace09ucf6avc19qid0w.mypod, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Pod "workspace09ucf6avc19qid0w.mypod" is invalid: spec.containers[1].volumeMounts[2].mountPath: Invalid value: "/projects": must be unique, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).

toorog avatar Aug 28 '18 13:08 toorog

@toorog can you share the entire ws-config please?

ghost avatar Aug 28 '18 14:08 ghost

/projects is already added automatically to the deployment, so by adding it explicitly, you break the deployment. We must check it and not try to deploy such a deployment. So I would classify this issue as bug

garagatyi avatar Aug 28 '18 20:08 garagatyi

@toorog did @garagatyi answered your question? Can we close this issue?

skabashnyuk avatar Sep 10 '18 08:09 skabashnyuk

@skabashnyuk I believe this is a bug, which has a workaround.

garagatyi avatar Sep 10 '18 09:09 garagatyi

It actually works but one can not add the volume manually to the dev-machine (this is done automatically). For other machines one can:

"volumes": {
            "projects": {
              "path": "/projects"
            }
}

diogosaad avatar Dec 05 '18 15:12 diogosaad

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Sep 07 '19 13:09 che-bot