src-d / engine-deprecated

[DISCONTINUED] Go to https://github.com/src-d/sourced-ce/
https://docs.sourced.tech/engine
Apache License 2.0
217 stars 26 forks source link

`web sql` does not clean up gitbase container #59

Open vmarkovtsev opened 6 years ago

vmarkovtsev commented 6 years ago

I run srcd web sql, do some stuff and then Ctrl-C it. Then docker ps shows:

CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                    NAMES
e5b4e1f45aa9        srcd/gitbase           "/tini -- /bin/sh -c…"   2 hours ago         Up 2 hours          0.0.0.0:3306->3306/tcp   srcd-cli-gitbase
1a8417b883f1        pilosa/pilosa:v0.9.0   "/pilosa server --da…"   2 hours ago         Up 2 hours          10101/tcp                srcd-cli-pilosa
25b70c99ed8c        srcd/cli-daemon        "/srcd-server --work…"   2 hours ago         Up 2 hours          0.0.0.0:4242->4242/tcp   srcd-cli-daemon

the last one is OK, Pilosa one is removed in the most recent gitbase so can be ignored. However, gitbase is left running while it should not.

erizocosmico commented 6 years ago

There is no cleanup implemented. It only stops the direct container, not its dependencies

vmarkovtsev commented 6 years ago

Another observation: if you run a long query, there is no way to kill it, and ctrl-c leaves orphaned containers eating 100% CPU.

campoy commented 6 years ago

Doing srcd kill should kill all remaining containers.

@erizocosmico do you think cleaning up the dependencies would be very hard?

erizocosmico commented 6 years ago

srcd kill does remove everything. Stopping the web app with ctrl+c does not kill, though.

Sent from Astro https://www.astro.ai for iOS

On 25 Sep 2018 at 18:15, Francesc Campoy notifications@github.com wrote:

Doing srcd kill should kill all remaining containers.

@erizocosmico https://github.com/erizocosmico do you think cleaning up the dependencies would be very hard?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/src-d/engine/issues/59#issuecomment-424404177, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQFF_iutWYsyihIlyzm3eorNmXPqN_Vks5uelakgaJpZM4W4VHQ .

vmarkovtsev commented 6 years ago

@campoy srcd kill ATM is way too brutal https://github.com/src-d/engine/issues/61

campoy commented 6 years ago

something @erizocosmico didn't answer

@erizocosmico do you think cleaning up the dependencies would be very hard?