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

K8SPSMDB-754 update logs level #1683

Merged
merged 6 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/apis/psmdb/v1/psmdb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (m *MultiAZ) WithSidecarVolumes(log logr.Logger, volumes []corev1.Volume) [

for _, v := range m.SidecarVolumes {
if _, ok := names[v.Name]; ok {
log.Info("Wrong sidecar volume name, it is skipped", "volumeName", v.Name)
log.Error(errors.New("Wrong sidecar volume name, it is skipped"), "volumeName", v.Name)
continue
}

Expand All @@ -431,7 +431,7 @@ func (m *MultiAZ) WithSidecarPVCs(log logr.Logger, pvcs []corev1.PersistentVolum

for _, p := range m.SidecarPVCs {
if _, ok := names[p.Name]; ok {
log.Info("Wrong sidecar PVC name, it is skipped", "PVCName", p.Name)
log.Error(errors.New("Wrong sidecar PVC name, it is skipped"), "PVCName", p.Name)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/perconaservermongodb/finalizers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (r *ReconcilePerconaServerMongoDB) deletePSMDBPods(ctx context.Context, cr
rsDeleted = false
switch err {
case errWaitingTermination, errWaitingFirstPrimary:
log.Info(err.Error(), "rs", rs.Name)
log.Error(err, "rs", rs.Name)
continue
default:
log.Error(err, "failed to delete rs pods", "rs", rs.Name)
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/perconaservermongodb/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (r *ReconcilePerconaServerMongoDB) reconcileUsers(ctx context.Context, cr *
}

if !cr.Spec.PMM.HasSecret(&sysUsersSecretObj) && cr.Spec.PMM.Enabled {
log.Info(fmt.Sprintf(`Can't enable PMM: "%s" or "%s" with "%s" keys don't exist in the secrets, or secrets and internal secrets are out of sync`,
api.PMMAPIKey, api.PMMUserKey, api.PMMPasswordKey), "secrets", cr.Spec.Secrets.Users, "internalSecrets", api.InternalUserSecretName(cr))
log.Error(errors.New(fmt.Sprintf(`Can't enable PMM: "%s" or "%s" with "%s" keys don't exist in the secrets, or secrets and internal secrets are out of sync`,
api.PMMAPIKey, api.PMMUserKey, api.PMMPasswordKey)), "secrets", cr.Spec.Secrets.Users, "internalSecrets", api.InternalUserSecretName(cr))
}

secretName := api.InternalUserSecretName(cr)
Expand Down
2 changes: 1 addition & 1 deletion pkg/psmdb/tls/certmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (c *certManagerController) Check(ctx context.Context, config *rest.Config,
case cmapichecker.ErrCertManagerCRDsNotFound:
return ErrCertManagerNotFound
case cmapichecker.ErrWebhookCertificateFailure, cmapichecker.ErrWebhookServiceFailure, cmapichecker.ErrWebhookDeploymentFailure:
log.Info("cert-manager is not ready", "error", cmapichecker.TranslateToSimpleError(err))
log.Error(cmapichecker.TranslateToSimpleError(err), "cert-manager is not ready")
return ErrCertManagerNotReady
}
return err
Expand Down
Loading