-
Notifications
You must be signed in to change notification settings - Fork 423
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
When a docker container is stopped within docker, it can't be deleted afterwards #2181
Comments
The three solution at the end will not be possible because it will require too much permission and Linux distributions will complaint about that. I think the only solution is when we want to delete a node with permission issues we start / stop it. |
The move to a temporary directory needs no elevated permissions on GNS3 (both the node directory and the temp directory are owned by GNS3), only on the cleanup script. The ACL solution needs no elevated privilege at all. The trick is, when the persistent directory is initially created, to additionally set an ACL, that allows gns3 access independently from the normal permissions ( start / stop is fine as long the user doesn't do some extended stuff on startup. Maybe a special start with just a busybox shell is more efficient. When a whole project is deleted, quite some nodes might have to started / stopped. |
Forget the ACL solution, that doesn't work always. |
The start / stop with a special script is a good idea |
The init script of the user should not have an impact because we will start/stop without waiting it |
If a container is exited we quickly start it to fix the permissions. Fix GNS3/gns3-gui#2181
If a container is exited we quickly start it to fix the permissions. Fix GNS3/gns3-gui#2181
GNS3 version 2.0.4dev1 on Darwin (64-bit) with Python 3.5.2 Qt 5.6.0 and PyQt 5.6, official GNS3 VM with latest 2.0.4dev1.
https://www.gns3.com/discussions/cannot-delete-ubuntu-docker-node
You get an error message like "Internal server error http://192.168.1.99:3080/v2/compute/projects/d5450942-c737-48b3-94e6-6c2ba562896d/docker/nodes/33c86a81-074b-4785-8b0a-37c92716739b". The reason is, that the permissions of the persistent directories haven't be restored, so they are owned by root. Therefore GNS3 can't delete them.
Afterwards the node in the project is in an inconsistent state, you have close and then re-open the project, then start and stop the docker node by GNS3 to restore the permissions. Now the node can be deleted.
A similar issue arises, when you delete the whole project. The deletion is done, without any error message, but because of the permissions, there are some leftovers on the server.
I have the following ideas to make that more user friendly:
The text was updated successfully, but these errors were encountered: