Skip to content

dev: Do not trap EXIT signal when starting grafana container

Administrator requested to merge dev/grafana-exit into master

Created by: mrnugget

Without this change, when I stop the dev server or ./dev/grafana.sh with Ctrl-C I get something like this:

$ ./dev/grafana.sh
^Ctrapped CTRL-C: stopping docker grafana container
eeb46861c179752a8b7b5d7aaaf990b38ccbfdd5ee491eef0800b1799a1f40e0
Error: No such container: grafana

That happens every time, without fail.

I don't know why and why it's different from the Prometheus container, but it looks to me like the Grafana container handles Ctrl-C.

With the changes in this PR applied, when I hit Ctrl-C I get this:

$ ./dev/grafana.sh
^C%                                                                                                                                                                       ~/work/sourcegraph dev/grafana-exit X λ docker ps | grep grafna                                                                                                     -129-

And the container is cleaned up:

$ docker ps | grep grafana
[no output]

Do with this what you will: take it as a fix or as a bug report that's looking for a proper solution :)

Merge request reports

Loading