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

Add missing space in error #1772

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all 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
8 changes: 4 additions & 4 deletions internal/controller/vrg_volrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ func (v *VRGInstance) addProtectedAnnotationForPVC(pvc *corev1.PersistentVolumeC
// v.updateProtectedPVCCondition(pvc.Name, PVCError, msg)
log.Error(err, "Failed to update PersistentVolumeClaim annotation")

return fmt.Errorf("failed to update PersistentVolumeClaim (%s/%s) annotation (%s) belonging to"+
return fmt.Errorf("failed to update PersistentVolumeClaim (%s/%s) annotation (%s) belonging to "+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out this log has

{"VolumeReplicationGroup": {"name":"appset-deploy-rbd-busybox","namespace":"e2e-appset-deploy-rbd-busybox"}, "rid": "93ab4d6f-3f56-402c-ba11-90c7793ee00e", "State": "primary"}

So we can remove the "belonging to VolumeReplicationGroup (%s/%s)" part instead of fixing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the log does not help since this error is logged from another logger that does not have the vrg info.

"VolumeReplicationGroup (%s/%s), %w",
pvc.Namespace, pvc.Name, pvcVRAnnotationProtectedKey, v.instance.Namespace, v.instance.Name, err)
}
Expand All @@ -1936,7 +1936,7 @@ func (v *VRGInstance) addArchivedAnnotationForPVC(pvc *corev1.PersistentVolumeCl
if err := v.reconciler.Update(v.ctx, pvc); err != nil {
log.Error(err, "Failed to update PersistentVolumeClaim annotation")

return fmt.Errorf("failed to update PersistentVolumeClaim (%s/%s) annotation (%s) belonging to"+
return fmt.Errorf("failed to update PersistentVolumeClaim (%s/%s) annotation (%s) belonging to "+
"VolumeReplicationGroup (%s/%s), %w",
pvc.Namespace, pvc.Name, pvcVRAnnotationArchivedKey, v.instance.Namespace, v.instance.Name, err)
}
Expand All @@ -1945,7 +1945,7 @@ func (v *VRGInstance) addArchivedAnnotationForPVC(pvc *corev1.PersistentVolumeCl
if err != nil {
log.Error(err, "Failed to get PV to add archived annotation")

return fmt.Errorf("failed to update PersistentVolume (%s) annotation (%s) belonging to"+
return fmt.Errorf("failed to update PersistentVolume (%s) annotation (%s) belonging to "+
"VolumeReplicationGroup (%s/%s), %w",
pv.Name, pvcVRAnnotationArchivedKey, v.instance.Namespace, v.instance.Name, err)
}
Expand All @@ -1958,7 +1958,7 @@ func (v *VRGInstance) addArchivedAnnotationForPVC(pvc *corev1.PersistentVolumeCl
if err := v.reconciler.Update(v.ctx, &pv); err != nil {
log.Error(err, "Failed to update PersistentVolume annotation")

return fmt.Errorf("failed to update PersistentVolume (%s) annotation (%s) belonging to"+
return fmt.Errorf("failed to update PersistentVolume (%s) annotation (%s) belonging to "+
"VolumeReplicationGroup (%s/%s), %w",
pvc.Name, pvcVRAnnotationArchivedKey, v.instance.Namespace, v.instance.Name, err)
}
Expand Down