pumba icon indicating copy to clipboard operation
pumba copied to clipboard

pumba rm not working if the containers are already stopped

Open ghost opened this issue 7 years ago • 2 comments
trafficstars

If I try to delete some containers with pumba rm, the command fails if the containers are already stopped.

Steps to reproduce the issue:

  1. Create some containers.
  2. Kill the containers via pumba kill command.
  3. Run pumba rm command to delete the killed containers

screenshot from 2018-10-22 13-57-38 screenshot from 2018-10-22 13-58-32

ghost avatar Oct 22 '18 11:10 ghost

@bmilescu thank you for bug report. will take a look.

alexei-led avatar Oct 22 '18 14:10 alexei-led

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 :

  1. all running containers only - as it is happening now

  2. All docker containers

  3. 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?

nirave avatar Mar 27 '19 01:03 nirave