devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Permission denied when a try to start existing workspace

Open darkterra opened this issue 2 years ago • 7 comments

What happened?
After successfully creating a workspace, I can no longer start it again if it has been stopped.

image (1)~2.png

image (2)~3.png

image (3)~2.png


What did you expect to happen instead?
I expect to be able to start an already created workspace without any permission issue.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Create a docker provider with default values
  2. Create a workspace from a remote git repo (without .devcontainer.json file) => devpod up ..../lora.git
  3. Stop the workspace=> devpod stop lora
  4. Start again the workspace=> devpod up lora

My devcontainer.json:

{
    "image": "mrc.microsoft.com/de containers/javascript-node"
}

Local Environment:

  • DevPod Version: [use v0.5.16]
  • Operating System: Linux (Ubuntu 20.04)
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker | ssh

Anything else we need to know?
I only use the CLI version of DevPod because on my machine (Ubuntu 20.04) the graphical version does not work I will possibly make another ticket later to try to find a solution.

Otherwise, everything seems to work correctly with the CLI version apart from this permission error when I start an already existing workspace stopped.

I also specify that I am starting from an existing project that does not have an existing .devcontainer.json file in the project. So DevPod adds it when creating the workspace.

darkterra avatar Sep 18 '24 12:09 darkterra

This should now be fixed in 0.5.21 :)

bkneis avatar Sep 30 '24 08:09 bkneis

Thank you very much for your help and the PR! However, I tried again today after updating DevPod, but from what I see the problem is still present:

image

I specify that I deleted all the workspaces then I retrieved from gitlab the repo which does not contain a .devcontainer.json file

darkterra avatar Oct 01 '24 20:10 darkterra

Hi @darkterra could you perform devpod delete instead of devpod stop and try again? I can see in the logs it's using the existing workspace so this may cause an issue

bkneis avatar Oct 02 '24 10:10 bkneis

I was off to a good start with all workspaces deleted as mentioned in my previous post. But it's true that I showed a condensed version of the actions I performed with the previous image.

Here's an image that shows all the steps of steps.

DevPod_Issue_#1271.png

I hope it will be clearer like this 😇

darkterra avatar Oct 02 '24 11:10 darkterra

@darkterra thank you for this, yes that made the issue much clearer thank you. I manage to reproduce the issue properly this time and this is fixed in my PR - https://github.com/loft-sh/devpod/pull/1294

bkneis avatar Oct 02 '24 15:10 bkneis

I'll ping you once we release 0.5.22

bkneis avatar Oct 02 '24 15:10 bkneis

Thank you so much !

I have a second issue to report. I'll take care of it quickly, so if it's a real bug (and not a usability problem on my part) the fix can be shipped with version 0.5.22 ?

darkterra avatar Oct 02 '24 15:10 darkterra