-
Notifications
You must be signed in to change notification settings - Fork 124
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
Added logs to cluster extraction #428
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.
Is the desire to leave this in forever? I am concerned that there are healthy Rancher setups that will start spamming this message since we are not sure what causes it. Or can we assume that anytime clusterName is empty, something is not correct?
controller/cluster_check.go
Outdated
ns := getValue(obj, "Namespace") | ||
name := getValue(obj, "Name") | ||
kind := getValue(obj, "Kind") | ||
logrus.Debugf("failed to extract cluster that the object [%s:%s] of kind [%s] belongs to", ns, name, kind) |
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: I fear that this makes it into production, and a user sees the logs and assumes that something in rancher is failing, causing them to raise a ticket.
logrus.Debugf("failed to extract cluster that the object [%s:%s] of kind [%s] belongs to", ns, name, kind) | |
logrus.Debugf("unable to extract cluster that the object [%s:%s] of kind [%s] belongs to", ns, name, kind) |
controller/cluster_check.go
Outdated
@@ -17,6 +17,8 @@ func ObjectInCluster(cluster string, obj interface{}) bool { | |||
// Check if the object implements the interface, this is best case and | |||
// what objects should strive to be | |||
if o, ok := obj.(ObjectClusterName); ok { | |||
clusterName := o.ObjClusterName() | |||
debugLogsClusterExtraction(clusterName, obj) | |||
return o.ObjClusterName() == cluster |
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.
return o.ObjClusterName() == cluster | |
return clusterName == cluster |
@KevinJoiner We are trying to figure out how often this happens. If it happens frequently then that is a problem. I don't think spam will be much of an issue since it's debug. The handler also have a built in backoff so it should be throttled. |
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, since it is debug only. Sort of sucks it will run for every case, but should be minimal.
No description provided.