Dvlv / BoxBuddyRS

A Graphical Interface for Distrobox
MIT License
229 stars 24 forks source link

[Bug?] Removing a container breaks other containers #20

Closed VortexAcherontic closed 7 months ago

VortexAcherontic commented 7 months ago

Hello there, as I opened up the app for the first time, created a new distrobx after no other boxes where found see: #16 I then created a new box just to test how the app works.

Which lead to #19 and after removing the container my other distrobox containers volumes where all broken.

distrobox-enter
Error: no such container tumbleweed
Creating the container tumbleweed
Creating 'tumbleweed' using image registry.opensuse.org/opensuse/distrobox:latest   Error: creating container storage: the container name "tumbleweed" is already in use by a1b7b5887b84d7d92fc2d45b5fa5ae577fcfbb94da1576c80a0ce226c5f74833. You have to remove that container to be able to reuse that name: that name is already in use by an external entity, or use --replace to instruct Podman to do so.
 [ ERR ]
Error: no container with name or ID "tumbleweed" found: no such container

Additionally it broke m entire distrobox setup as I can not remove or create new container with the name of the containers which went broken by this:

distrobox-create develop --home /home/vortexacherontic/distrobox/develop_home 
Creating 'develop' using image registry.opensuse.org/opensuse/distrobox:latest  Error: creating container storage: the container name "develop" is already in use by 29f8b31c201a7244e3eaeecd02bf4ce5e8d6e22f12fe95a9f870c6023d925118. You have to remove that container to be able to reuse that name: that name is already in use by an external entity, or use --replace to instruct Podman to do so.
 [ ERR ]

distrobox-rm develop
Error: no such container develop
Cannot find container develop.

To recover I had podman to instruct to prune all the volumes and containers.

Dvlv commented 7 months ago

No idea how that happened, do you have existing rootful containers with the same name as one you tried to create?

VortexAcherontic commented 7 months ago

No idea how that happened, do you have existing rootful containers with the same name as one you tried to create?

After digging in a bit in the code to possibly provide an PR I am sure I made a mistake.
As BoxBuddy didn't found any of my existing containers I created a new one with a name I already hat. My bad.