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

operator debug throws away all but last node profile #20151

Closed
tgross opened this issue Mar 18, 2024 · 0 comments · Fixed by #20206
Closed

operator debug throws away all but last node profile #20151

tgross opened this issue Mar 18, 2024 · 0 comments · Fixed by #20206
Assignees
Milestone

Comments

@tgross
Copy link
Member

tgross commented Mar 18, 2024

The nomad operator debug command saves a CPU profile for each interval, and names these files based on the interval (ref operator_debug.go#L1017). The same functions takes a goroutine profile, heap profile, etc. but is missing the logic to interpolate the file name with the interval (ref operator_debug.go#L1037-L1052).

This results in the operator debug command making potentially many expensive profile requests, and then overwriting the data.

@tgross tgross self-assigned this Mar 22, 2024
@tgross tgross added this to the 1.7.x milestone Mar 22, 2024
tgross added a commit that referenced this issue Mar 22, 2024
The `nomad operator debug` command saves a CPU profile for each interval, and
names these files based on the interval. The same functions takes a goroutine
profile, heap profile, etc. but is missing the logic to interpolate the file
name with the interval. This results in the operator debug command making
potentially many expensive profile requests, and then overwriting the data.

Update the command to save every profile it scrapes, and number them similarly
to the existing CPU profile.

Fixes: #20151
tgross added a commit that referenced this issue Mar 22, 2024
The `nomad operator debug` command saves a CPU profile for each interval, and
names these files based on the interval.

The same functions takes a goroutine profile, heap profile, etc. but is missing
the logic to interpolate the file name with the interval. This results in the
operator debug command making potentially many expensive profile requests, and
then overwriting the data. Update the command to save every profile it scrapes,
and number them similarly to the existing CPU profile.

Additionally, the command flags for `-pprof-interval` and `-pprof-duration` were
validated backwards, which meant that we always coerced the `-pprof-interval` to
be the same as the `-pprof-duration`, which always resulted in a single profile
being taken at the start of the bundle. Correct the check as well as change the
defaults to be more sensible.

Fixes: #20151
tgross added a commit that referenced this issue Mar 25, 2024
The `nomad operator debug` command saves a CPU profile for each interval, and
names these files based on the interval.

The same functions takes a goroutine profile, heap profile, etc. but is missing
the logic to interpolate the file name with the interval. This results in the
operator debug command making potentially many expensive profile requests, and
then overwriting the data. Update the command to save every profile it scrapes,
and number them similarly to the existing CPU profile.

Additionally, the command flags for `-pprof-interval` and `-pprof-duration` were
validated backwards, which meant that we always coerced the `-pprof-interval` to
be the same as the `-pprof-duration`, which always resulted in a single profile
being taken at the start of the bundle. Correct the check as well as change the
defaults to be more sensible.

Fixes: #20151
philrenaud pushed a commit that referenced this issue Apr 18, 2024
The `nomad operator debug` command saves a CPU profile for each interval, and
names these files based on the interval.

The same functions takes a goroutine profile, heap profile, etc. but is missing
the logic to interpolate the file name with the interval. This results in the
operator debug command making potentially many expensive profile requests, and
then overwriting the data. Update the command to save every profile it scrapes,
and number them similarly to the existing CPU profile.

Additionally, the command flags for `-pprof-interval` and `-pprof-duration` were
validated backwards, which meant that we always coerced the `-pprof-interval` to
be the same as the `-pprof-duration`, which always resulted in a single profile
being taken at the start of the bundle. Correct the check as well as change the
defaults to be more sensible.

Fixes: #20151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant