Path /projects as shared volume does not work
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 can you share the entire ws-config please?
/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
@toorog did @garagatyi answered your question? Can we close this issue?
@skabashnyuk I believe this is a bug, which has a workaround.
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"
}
}
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.