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 crashes if it can't write logs to /tmp #4795
Comments
This comment has been minimized.
This comment has been minimized.
|
Related issue: kubernetes/kubernetes#61006 |
geekofalltrades
referenced this issue
Oct 26, 2018
Closed
Use of glog for logging is problematic #61006
This comment has been minimized.
This comment has been minimized.
|
It is possible to set the flag programmatically, so we should look into doing that, I think. |
This comment has been minimized.
This comment has been minimized.
|
Ah, glog |
This comment has been minimized.
This comment has been minimized.
|
Just a painkiller instead of a cure, but it will take a long time until we actually get to remove glog from Kubernetes, so a good option I think @simonpasquier. I'm all for doing that. |
simonpasquier
added
kind/bug
component/service discovery
labels
Oct 30, 2018
This comment has been minimized.
This comment has been minimized.
dims
commented
Nov 10, 2018
|
@brancz fyi, we have |
simonpasquier
referenced this issue
Nov 29, 2018
Merged
cmd/prometheus: replace glog by glog-gokit #4931
simonpasquier
closed this
in
#4931
Dec 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
geekofalltrades commentedOct 26, 2018
Bug Report
What did you do?
We copy the Prometheus binary into a from-scratch Docker container and run it as a non-root user to reduce our footprint and threat surface. This is a practice we follow with all applications we run in our Kubernetes environment. Recently we upgraded to prometheus v2.4.2 from v2.3.0, where in both cases we were running in containers using this method.
What did you expect to see?
Prometheus should run fine, as v2.3.0 seemed to.
What did you see instead? Under which circumstances?
Prometheus is repeatedly crashing with this error:
This seems to be a glog error message which occurs when glog can't write a logfile. However, I don't want glog writing to any files at all; it should write all logs to stderr, since we are running in a Docker container and want to delegate log management to Docker. However, I see no way to configure Prometheus or glog to not log to files.
glog apparently has a
--logtostderrflag, but it's not being exposed by Prometheus.Note that the crash is ALWAYS preceded by a warning log from Kubernetes service discovery, so this may be the source of the bug.
This error was also reported on coreos/prometheus-operator here: coreos/prometheus-operator#1932 Notice that the crash in that report is ALSO preceded by a warning from Kubernetes service discovery.
Environment
System information: no
unamein a scratch container.Prometheus version: