Skip to content
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

Failed Environment Can't be Removed #8

Closed
jdhaines opened this issue Jun 25, 2021 · 15 comments
Closed

Failed Environment Can't be Removed #8

jdhaines opened this issue Jun 25, 2021 · 15 comments
Labels
bug Something isn't working

Comments

@jdhaines
Copy link

Describe the bug
I started an environment from the initial Dev Environments page and then tried to cancel/remove it while it was initializing. I didn't realize it was trying to start or I would have waited. Now that environment can't be removed.

To Reproduce
Steps to reproduce the behavior:

  1. Paste a github link in the top right box, and click "Create"
  2. As soon as the process starts, hit the trash icon
  3. Error Thrown:
    image
  4. One of the times it didn't lead to the Error state, it led to the Removing state which now can't be removed from the gui.

Expected behavior
Perhaps block the trash icon until it starts or reaches a point where deleting / trashing is safe? Perhaps find a way to remove a failed environment properly.

Screenshots
Sometimes it ends up in an "error" state and those can be removed.
image

At least once it's led to the "removing" state which can't be removed.
image

Desktop (please complete the following information):
image
It happened on 3.5.0
image
No change on 3.5.1
image

Additional context
It seems to still be working, just looks ugly in the UI.

Great work on this new feature everyone, I'm really excited about this new potential for our team.

@jdhaines jdhaines added the bug Something isn't working label Jun 25, 2021
@gtardif
Copy link
Contributor

gtardif commented Jun 25, 2021

Thx for the feedback @jdhaines
We've got this in our current sprint, I hope a fix will be shipped in our next release

@rafalfaro18
Copy link

I get the same behavior. You should test this in slow internet connections. If you stop it in the middle of downloading the images it doesn't really stop, you have to quit docker desktop and start it again.

@B-0-B-B-Y
Copy link

Seems appropriate for me to add this here, I managed to build a sample compose environment successfully, it was running correctly without issues. I stopped it. Once stopped, I hit the trash icon, and now it is stuck on removing as shown in OPs original comment. Not sure if what you're working on in your current sprint will account for this also or if it requires a new issue. Please let me know!

Running on Windows 10 LTSC Build 1809
Docker Desktop v3.5.1 (66090)
Docker Engine v20.10.7
Compose 2.0.0-beta.4

@rumpl
Copy link
Member

rumpl commented Jun 30, 2021

I get the same behavior. You should test this in slow internet connections.

We do! I'm working on a slowish 4G connection. The problem is that, since I implemented it I knew I had to wait so I never saw the problem. We did however fix this issue recently.

@B-0-B-B-Y is the environment still there if you close/reopen the dashboard?

@B-0-B-B-Y
Copy link

@rumpl yep, still there, I've restarted/quit docker desktop and the environment is still visible and stuck on removing. Clicking the log view for it just shows an empty panel. The images/containers are removed, so perhaps it's just a visual bug?

@rumpl
Copy link
Member

rumpl commented Jun 30, 2021

@B-0-B-B-Y ok so it's not a visual bug, it got stuck at some point, if you look at ~/.docker/devenvironments/data.json you should find the lingering environment. It would really help us debug your issue if you could upload a diagnostics report and give us the ID, info here: https://docs.docker.com/docker-for-windows/troubleshoot/#diagnose-and-feedback

Thanks

@B-0-B-B-Y
Copy link

B-0-B-B-Y commented Jun 30, 2021

@rumpl okay no worries, I've ran the steps, the docker diagnostics ID is as follows: BE8DBB72-5697-4343-9147-E0CB95B50B47/20210630190151.

Do you think it's safe to remove the working directory that is referenced inside that data.json file, and then remove the data.json file as well, or should I leave it as is for the time being?

@nebuk89
Copy link
Contributor

nebuk89 commented Jul 8, 2021

@B-0-B-B-Y thanks for all your feedback on this, if you would be interested in having a chat with the team directly and having a chat, drop me an email on bengotch@Docker.com :)

@sosensible
Copy link

sosensible commented Jul 21, 2021

Not only did the remove fail, but it is stuck there and the feature appears to not work ATM.

Error invoking remote method 'dev-envs-backend': Error: {"Message":"exit status 1"}

@glours
Copy link
Collaborator

glours commented Aug 12, 2021

@jdhaines @B-0-B-B-Y @sosensible we just released a new version of Docker Desktop 3.6.0, can you click on the Check for Updates menu, install the new version and check if you still have the issue, please?

@jdhaines
Copy link
Author

@glours

The initial issue seems partially resolved. I can't find a way to recreate the initial issue of the hanging environment being stuck and unable to be removed. That said, I still can't remove the original one I have. Perhaps it's stuck in limbo somewhere and will just be there for the next thousand years. 😄

@glours
Copy link
Collaborator

glours commented Aug 12, 2021

@jdhaines Ok, so let's remove it manually then.
Open the ~/.docker/devenvironments/data.json, find the record referencing your Dev Environment which is stuck, remove it, save the file and then navigate to the volumes panel for example and go back to the Dev Environments screen, your dev env should be gone.

@jdhaines
Copy link
Author

@glours

Yep, that fixed the ui part of the issue. I think this one can be closed from my perspective. Thanks for all the help everyone!

@glours glours closed this as completed Aug 12, 2021
@sosensible
Copy link

Works right ATM. :)

@ElderCodeQuester
Copy link

{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia",
"builder": {
"gc": {
"defaultKeepStorage": "100GB",
"enabled": true
}
},
"features": {
"buildkit": true
},
"experimental": false,
"debug": false,
"log-level": "info",
"resources": {
"cpus": "all", // Or specify the number of CPUs if you want to limit resource usage
"memory": "all" // Or specify the amount of memory if you want to limit resource usage
},
"storage-driver": "overlay2"
}

This configuration will enable Docker to use all available CPUs and memory, which should be appropriate for heavy workloads like AI and machine learning model training and inference. It also specifies the use of the NVIDIA container runtime, which is necessary for containers that need GPU acceleration.

Remember to adjust the cpus and memory settings if you do not wish to allocate all available resources to Docker and want to leave some for other processes on the host system. If you specify "all" for these settings, Docker will not limit the resource usage, which may not be suitable for all environments, especially if your host machine is shared with other services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants