-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
display messages from serf in cli #5236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! An example of what this looks like in practice in the PR description would be extra useful but this seems reasonable!
In case of too many keys it looks like that with 3 servers and 20 clients:
|
@@ -16,6 +16,9 @@ type KeyringResponse struct { | |||
// Segment has the network segment this request corresponds to. | |||
Segment string | |||
|
|||
// Messages has information or errors from serf | |||
Messages map[string]string `json:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter that these messages will be randomly ordered? If you stored them as something like [][]string
instead of map[string]string
then at least you could retain the ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Messages
are already in the response from
consul/agent/structs/structs.go
Lines 1337 to 1345 in 884b2e0
type KeyringResponse struct { | |
WAN bool | |
Datacenter string | |
Segment string | |
Messages map[string]string `json:",omitempty"` | |
Keys map[string]int | |
NumNodes int | |
Error string `json:",omitempty"` | |
} |
I only added it here so that it gets deserialized.
Since the results are collected in parallel from all the nodes, I wouldn't even be sure how to order them. The order of arrival could be different every time as well.
This PR shows the messages from serf when listing encryption keys. Needs hashicorp/serf#546.