Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrometheus 2: sighup not handled gracefully during initialization phase #2699
Comments
This comment has been minimized.
This comment has been minimized.
|
Do you recall an issue for Prometheus 1.x on that? The signal handler registration has always been more towards the bottom. However, the storage was initialized asynchronously whereas TSDB does all initialization blocking in the constructor as it is generally expected to not take longer than a couple of seconds. (Unlike P1 crash recovery IIRC) Would just moving our signal handler registration to the start of |
This comment has been minimized.
This comment has been minimized.
|
@fabxc There was definitely a bug related to crash-recovery and It seems to me that moving at least the registration of a signal handler from: prometheus/cmd/prometheus/main.go Line 163 in 5890619 localstorage init will be both safe and would work around the issue.
|
mwitkow
added a commit
to improbable-io/prometheus
that referenced
this issue
May 9, 2017
fabxc
added a commit
that referenced
this issue
May 10, 2017
This comment has been minimized.
This comment has been minimized.
|
Closed with the merge of #2700. |
mwitkow
closed this
May 10, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
mwitkow commentedMay 9, 2017
What did you do?
Ran P2 from checkout ff0ee26.
We have an external job that SIGHUPs prometheus when config reloads. There is a potential race condition between the first SIGHUP and prometheus being ready. That bug was fixed in P1, but seems to be back in P2.
What did you see instead? Under which circumstances?
The
error: signal: hangupshouldn't happen. Note: this is after Prometheus starts with an existing volume and existing data, so the issue may be in the code initializing the TSDB.@fabxc