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 upRace condition starting HEAD prometheus with static scrape configs #4551
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
at the moment this is to be expected. The main issue is that the Scrape manager blocks the Discovery manager's channel. Reverting the commit only removes the logging, otherwise the problem is still there. @csmarchbanks btw why do you think this is a Race condition? |
This comment has been minimized.
This comment has been minimized.
|
I called it a race condition, since sometimes the scrape configuration would load, and sometimes it would not. Usually I have found that to be due to two concurrent tasks not ending in the correct order. Maybe Race was not the best word, and instead I should have called it non-deterministic. Going through the code some more, it looks like the old way would block until it could send an update on #4526 Does fix it for me, so I will just use that commit for local development until it is merged |
This comment has been minimized.
This comment has been minimized.
|
yeah this change shouldn't change the old behaviour just add this additional debug logging.
how do you know that the config didn't load? In general until #4526 is tested and merged any scaling down of targets would be slow as it goes in serial instead of parallel as in #4526 |
krasi-georgiev
added
the
component/service discovery
label
Aug 28, 2018
This comment has been minimized.
This comment has been minimized.
|
I am pretty sure that by adding the default cases, behavior is changed: I know the scrape config didn't load properly because my /targets page is completely empty even though there should be two targets (prometheus and node-exporter). Since these are static targets, there shouldn't be any scaling down should there? |
krasi-georgiev
referenced this issue
Aug 28, 2018
Merged
tidy up the discovery logs,updating loops and selects #4556
This comment has been minimized.
This comment has been minimized.
|
yes, I see what you mean. Here is a PR #4556 that fixes the behaviour. I will look at it again tomorrow with fresh eyes, but will free to comment if you see anything suspicious |
This comment has been minimized.
This comment has been minimized.
|
|
brian-brazil
referenced this issue
Aug 31, 2018
Merged
discovery: coalesce identical SD configurations #3912
simonpasquier
added
the
kind/bug
label
Aug 31, 2018
This comment has been minimized.
This comment has been minimized.
|
I can repro same thing, from current master. (sha 674c76a)
And no "Target" for my static, local scrape target. Any progress on this? |
This comment has been minimized.
This comment has been minimized.
|
Ah, we need this potentially? #4526 Will help with review |
This comment has been minimized.
This comment has been minimized.
bwplotka
added a commit
to improbable-eng/thanos
that referenced
this issue
Sep 3, 2018
bwplotka
referenced this issue
Sep 3, 2018
Merged
e2e: Run Query Simple e2e tests against pinned version of Prometheus. #504
bwplotka
added a commit
to improbable-eng/thanos
that referenced
this issue
Sep 3, 2018
bwplotka
added a commit
to improbable-eng/thanos
that referenced
this issue
Sep 3, 2018
bwplotka
added a commit
to improbable-eng/thanos
that referenced
this issue
Sep 3, 2018
simonpasquier
referenced this issue
Sep 4, 2018
Closed
Alert labels are not changed after update rule file and reloading prometheus. #4571
gouthamve
closed this
in
#4556
Sep 5, 2018
This comment has been minimized.
This comment has been minimized.
|
Can anyone confirm this is not happening on master? |
This comment has been minimized.
This comment has been minimized.
|
@Bplotka master is working great for me now. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 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. |
csmarchbanks commentedAug 28, 2018
Bug Report
What did you do?
Ran prometheus locally, with some basic static configs
What did you expect to see?
Prometheus comes up and my targets are scraped.
What did you see instead? Under which circumstances?
Most of the time none of my static targets are scraped. Approximately 5-10% of the time my targets are scraped properly.
Environment
System information:
Darwin 17.7.0 x86_64
Prometheus version:
latest master (87f1dad)
Prometheus configuration file:
Appears to be related to #4523, if I revert that commit everything starts working. The "discovery receiver's channel was full" log only shows up in the failure case.