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

Ping can now optionally filter by workload ID or name #187

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

autodidaddict
Copy link
Contributor

You can now use a different WPING endpoint to have nodes only reply to a ping if they're currently running the indicated workload, which can be the workload ID or the workload name.

So if you specify a workload ID, you should expect 0 or 1 nodes.
If you specify a workload name, you might get multiple nodes if that workload is scaled out.

Added the --workload option to the node ls command, so the end user doesn't need to know that this is a different ping subject under the hood.

@autodidaddict autodidaddict requested a review from a team as a code owner April 18, 2024 18:00
@autodidaddict
Copy link
Contributor Author

autodidaddict commented Apr 18, 2024

I had a variant of this where we reused the same PING endpoint and the optional workload filter was in the payload. I ended up not liking how this turned out because the regular pings actually return errors to the client, and the workload ping is silent on error... and the regular ping can be targeted at a host while the workload probe shouldn't/can't.

jordan-rash
jordan-rash previously approved these changes Apr 19, 2024
Copy link
Contributor

@jordan-rash jordan-rash left a comment

Choose a reason for hiding this comment

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

Thanks Kevin!

control-api/client.go Outdated Show resolved Hide resolved
nex/nex.go Show resolved Hide resolved
Signed-off-by: Kevin Hoffman <autodidaddict@users.noreply.github.com>
@autodidaddict autodidaddict merged commit c91a77f into main Apr 19, 2024
4 checks passed
@autodidaddict autodidaddict deleted the feat/workloadping branch April 19, 2024 13:03
jordan-rash pushed a commit that referenced this pull request Apr 19, 2024
* can now ping a nexus to find where a workload Id is running

* can use either workload ID or workload name for filter

* Update client.go

Signed-off-by: Kevin Hoffman <autodidaddict@users.noreply.github.com>

---------

Signed-off-by: Kevin Hoffman <autodidaddict@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants