pumba
pumba copied to clipboard
pumba rm not working if the containers are already stopped
If I try to delete some containers with pumba rm, the command fails if the containers are already stopped.
Steps to reproduce the issue:
- Create some containers.
- Kill the containers via pumba kill command.
- Run pumba rm command to delete the killed containers

@bmilescu thank you for bug report. will take a look.
I can help with this, but I was wondering what the intended behavior is suppose to be. When pumba selects from a list of containers to remove, should it select from a list of :
-
all running containers only - as it is happening now
-
All docker containers
-
All containers that are running AND also all containers that were stopped / killed by pumba previously?
If it is choice 1, no changes are needed. I would suspect that this should be the expected behavior.
But if it is choice 2, then I have made the changes and can issue a pull request.
If it is choice 3, then there is further discussion involved and it can get quite complicated. What if there are two different pumba processes running - is there persistence storage needed to communicate between those processes on what was killed? What if there are two different kills? Should pumba remember all their stopped / killed containers?