-
Notifications
You must be signed in to change notification settings - Fork 727
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
Pods upgrade: log a summary of failed predicates #2128
Conversation
"Nodes can't be upgraded", | ||
"namespace", ctx.es.Namespace, | ||
"es_name", ctx.es.Name, | ||
"failedPredicates", groupByPredicates(failedPredicates)) |
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.
Nit: maybe stay in snake case to be consistent with the other fields: failed_predicates
.
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.
LGTM
// the user to understand why. | ||
if len(failedPredicates) > 0 { | ||
log.Info( | ||
"Nodes can't be upgraded", |
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.
Can we rephrase this? Something like "Cannot proceed with upgrade of some nodes at this time" Something that makes it sound less final?
predicate string | ||
} | ||
|
||
func newFailedPredicate(pod, predicate string) *failedPredicate { |
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.
Not sure if the non-exported constructor on a non-exported trivial struct adds much?
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.
Sorry for the drive-by comments!
Follow up of #2099
This pr reduces the verbosity of the logs when nodes can't be restarted because of some failing predicates:
before:
with the pr: