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

cli: Add event stream capture to nomad operator debug #11865

Merged
merged 13 commits into from
Jan 18, 2022
Merged

Conversation

davemay99
Copy link
Contributor

@davemay99 davemay99 commented Jan 17, 2022

Adds Event Stream capture to nomad operator debug. Enable -verbose output for realtime feedback on events as they are captured.

New CLI flags:

  • -event-filter
  • -verbose

Example usage:

nomad operator debug -event-filter="Evaluation:*" -verbose

See Events API documentation for more details on topic filtering.

Closes #11493

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a really nice addition to the bundles, thanks for much @davemay99!

In addition to the review comments, it would be nice to have names against the TODO items within the code. This isn't to point blame, rather if someone without context takes a look into updating this code, they can refer to you for addition information if needed.

Probably out of scope for this PR, but it would be great to have some real world examples of using the debug command that could be quickly referenced. People using this command are usually under pressure, so anything to help I feel would be useful.

Comment on lines 80 to 84
If event stream capture is enabled, the Job, Allocation, Deployment,
and Evaluation topics require 'namespace:read-job' capabilities, the Node
topic requires 'node:read'. A 'management' token is required to capture
ACLToken, ACLPolicy, or all all events.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to note that while giving this information in the CLI is very useful, there is a maintenance cost to pay whereby we will need to update this every time a new endpoint is added to the events stream that would be useful within the debug bundle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC all CLI commands include a mention of ACL requirements. Do you have a recommendation on how to reduce that maintenance cost?

command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Outdated Show resolved Hide resolved
command/operator_debug.go Show resolved Hide resolved
command/operator_debug.go Show resolved Hide resolved
command/operator_debug.go Show resolved Hide resolved
@davemay99
Copy link
Contributor Author

it would be nice to have names against the TODO items within the code

@jrasell Good idea -- I tagged myself on all the TODO items.

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@lgfa29 lgfa29 dismissed jrasell’s stale review January 18, 2022 02:17

Changes addressed

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: add eventstream to debug capture
3 participants