core: enhancement in debug logs

When DEBUG logging is enabled in the operator, there are a number of overwhelming messages in the log that are very overwhelming and don't seem useful, which makes debug mode difficult to use
Updated and Cutted down the messages that are not useful in debug mode

Closes: https://github.com/rook/rook/issues/7499
Signed-off-by: parth-gr <paarora@redhat.com>
This commit is contained in:
parth-gr committed 2021-04-28 22:28:10 +05:30
1 parent e115e0ada8
commit bb23622b72
4 files changed
+2 -5

No files matched your search

@@ -167,7 +167,6 @@ func (r *ReconcileNode) reconcile(request reconcile.Request) (reconcile.Result,
hasCephPods := false
for _, cephPod := range cephPods {
if cephPod.Spec.NodeName == request.Name {
logger.Debugf("cephPod.Spec.NodeName is %q and request.Name is %q", cephPod.Spec.NodeName, request.Name)
hasCephPods = true
for _, podToleration := range cephPod.Spec.Tolerations {
// Add toleration to the map
-1
View File
@@ -116,7 +116,6 @@ func watchControllerPredicate(rookContext *clusterd.Context) predicate.Funcs {
return true
},
UpdateFunc: func(e event.UpdateEvent) bool {
logger.Debug("update event from a CR")
// resource.Quantity has non-exportable fields, so we use its comparator method
resourceQtyComparer := cmp.Comparer(func(x, y resource.Quantity) bool { return x.Cmp(y) == 0 })
+2 -2
View File
@@ -100,7 +100,7 @@ func (s *Store) createOrUpdateMonHostSecrets(ctx context.Context, clusterInfo *c
_, err = clientset.CoreV1().Secrets(s.namespace).Get(ctx, StoreName, metav1.GetOptions{})
if err != nil {
if kerrors.IsNotFound(err) {
logger.Debugf("creating config secret %+v", secret)
logger.Debugf("creating config secret %q", secret.Name)
if _, err := clientset.CoreV1().Secrets(s.namespace).Create(ctx, secret, metav1.CreateOptions{}); err != nil {
return errors.Wrapf(err, "failed to create config secret %+v", secret)
}
@@ -109,7 +109,7 @@ func (s *Store) createOrUpdateMonHostSecrets(ctx context.Context, clusterInfo *c
}
}
logger.Debugf("updating config secret %+v", secret)
logger.Debugf("updating config secret %q", secret.Name)
if _, err := clientset.CoreV1().Secrets(s.namespace).Update(ctx, secret, metav1.UpdateOptions{}); err != nil {
return errors.Wrapf(err, "failed to update config secret %+v", secret)
}
@@ -335,7 +335,6 @@ func WatchCephClusterPredicate() predicate.Funcs {
return true
},
UpdateFunc: func(e event.UpdateEvent) bool {
logger.Debug("update event from a CR")
// resource.Quantity has non-exportable fields, so we use its comparator method
resourceQtyComparer := cmp.Comparer(func(x, y resource.Quantity) bool { return x.Cmp(y) == 0 })