che icon indicating copy to clipboard operation
che copied to clipboard

Detect and stop/remove Machines not counted by API (regression)

Open skryzhny opened this issue 10 years ago • 1 comments

We have a job run by timer that clears containers which are not counted by API - these still consume resources. After introducing ability to launch multimachine workspaces in 5.0.0-M5 we changed the naming scheme of containers and these job stops functioning.

Need to fix it and make some tests. Probably we need new property with regexp for detecting containers launched by che/codenvy, so that regexp can be changed without need to modify code.

Reproduction Steps:

  1. Start che/codenvy and let it run for a while(several hours/days), launching different kind of workspaces
  2. Stop che/codenvy
  3. Run a docker ps -a, you will probably see some containers that were launched by che/codenvy and not stopped/removed properly.

There are more probability of seeing such problem when runing multiple MachineNodes.

Expected behavior: All containers belonged to che/codenvy that are not counted by API stopped/removed.

Observed behavior: Containers belonged to che/codenvy that are not counted by API are still running or not removed

Che version: 5.0.0-M5
OS and version: Centos 7.2 Docker version: 1.11.2 Che install: Codenvy

Additional information:

  • Problem started happening recently, didn't happen in an older version of Che: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: Yes

skryzhny avatar Oct 28 '16 07:10 skryzhny

I checked jobs DockerContainerCleaner on Che and Codenvy. It works normal. I can't reproduce this bug. I will add logs for containers which were checked by DockerContainerCleaner, but job didn't clean up them, because they are active for our API.

AndrienkoAleksandr avatar Oct 31 '16 16:10 AndrienkoAleksandr