Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker stop ends in container getting killed #168

Closed
1 of 3 tasks
jondoe1337 opened this issue Jan 26, 2022 · 5 comments
Closed
1 of 3 tasks

Docker stop ends in container getting killed #168

jondoe1337 opened this issue Jan 26, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@jondoe1337
Copy link

jondoe1337 commented Jan 26, 2022

What Git revision are you using?

Docker image (latest) with sha256:31747b3178dac8f378a8cf3fbd011fcbd2c849008c4803fde9e320620a40e5cc

What operating system are you using, and which version?

  • [ x] Linux / Ubuntu
  • Linux / Other
  • OSX
  • Windows

Describe what the problem is?

Executing docker stop on the container takes ages and ends in eventually getting killed by the docker daemon.

What should be the expected behavior?

The container should get stopped within a reasonable amount of time. A container getting killed externally could result in corrupting the database e.g.

@KtorZ
Copy link
Member

KtorZ commented Jan 26, 2022

@jondoe1337 what image are we talking about here? The standalone or the one coupled with cardano-node ?

@jondoe1337
Copy link
Author

Sorry - I was not aware of multiple images being existed:
cardanosolutions/cardano-node-ogmios:latest

@KtorZ KtorZ added the bug Something isn't working label Feb 10, 2022
@yorickdowne
Copy link

It ignores SIGTERM. Inside docker, but also from tty. If you docker run this image, Ctrl-C won't stop it.

@KtorZ
Copy link
Member

KtorZ commented Apr 6, 2022

@jondoe1337 I finally took the time to look into this a bit more, and found the issue. The node is actually properly terminated by the stop signal, but not the background ogmios server which keeps running (causing docker to wait and timeout, forcing the container to quit eventually with a SIGTERM).

I've now fixed that in the supervision script that's used by the cardano-node-ogmios image; I am rebuilding the image to try this out locally.


@yorickdowne this is incorrect, the container does react to signals and CTRL-C just fine, but you need to start the container in interactive mode with TTY (-it) for this to work. This has nothing to do with this image, but is a standard docker behavior.

@yorickdowne
Copy link

Good to know. In my testing with -it it looked like there was a missing exec in the wrapper script. Looking forward to the fix!

@KtorZ KtorZ closed this as completed in f41afc6 Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants