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

nomad.nomad.plan.queue_depth metric missing #15128

Closed
clobrox opened this issue Nov 3, 2022 · 1 comment · Fixed by #15134
Closed

nomad.nomad.plan.queue_depth metric missing #15128

clobrox opened this issue Nov 3, 2022 · 1 comment · Fixed by #15134

Comments

@clobrox
Copy link

clobrox commented Nov 3, 2022

Nomad version

Nomad v1.3.6-zd84215+ent (fe6f9f9ed302ea13fffa4417375d2b89824a6ea8)

Issue

We no longer get the nomad.nomad.plan.queue_depth metric since our upgrade from 1.2.6+ent.

I believe the bug was introduced here:

https://github.com/hashicorp/nomad/pull/11983/files#diff-e76df9f1d1a93123add63e2828b97cbf4d55bd7fa0c42bb97d788bfe2fb598d0

In nomad/plan_queue.go we are missing a call to timer.Reset(period).

It is also not clear to me if calls to https://pkg.go.dev/time#Timer.Reset are being done safely. From those docs: "For a Timer created with NewTimer, Reset should be invoked only on stopped or expired timers with drained channels."

I do not completely understand why this has led to us not seeing the metric, as I'd have expected to still get a single point when the process started, even if the timer was not reset.

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants