diff --git a/pkg/services/baremetal/remediation/remediation.go b/pkg/services/baremetal/remediation/remediation.go index ad0cd6d51..9878f2345 100644 --- a/pkg/services/baremetal/remediation/remediation.go +++ b/pkg/services/baremetal/remediation/remediation.go @@ -60,7 +60,7 @@ func (s *Service) Reconcile(ctx context.Context) (res reconcile.Result, err erro record.Warn(s.scope.BareMetalRemediation, "FailedSettingConditionOnMachine", err.Error()) return res, err } - record.Eventf(s.scope.BareMetalRemediation, "ExitRemediation", "exit remediation because bare metal machine has no host annotation") + record.Event(s.scope.BareMetalRemediation, "ExitRemediation", "exit remediation because bare metal machine has no host annotation") return res, nil } diff --git a/pkg/services/hcloud/remediation/remediation.go b/pkg/services/hcloud/remediation/remediation.go index ffdd47915..bbd096ee0 100644 --- a/pkg/services/hcloud/remediation/remediation.go +++ b/pkg/services/hcloud/remediation/remediation.go @@ -58,8 +58,10 @@ func (s *Service) Reconcile(ctx context.Context) (res reconcile.Result, err erro s.scope.HCloudRemediation.Status.Phase = infrav1.PhaseDeleting if err := s.setOwnerRemediatedCondition(ctx); err != nil { + record.Warn(s.scope.HCloudRemediation, "FailedSettingConditionOnMachine", err.Error()) return res, fmt.Errorf("failed to set conditions on CAPI machine: %w", err) } + record.Warn(s.scope.HCloudRemediation, "FailedToFindServer", "Server doesn't exist") return res, nil } @@ -147,6 +149,7 @@ func (s *Service) handlePhaseWaiting(ctx context.Context) (res reconcile.Result, s.scope.HCloudRemediation.Status.Phase = infrav1.PhaseDeleting if err := s.setOwnerRemediatedCondition(ctx); err != nil { + record.Warn(s.scope.HCloudRemediation, "FailedSettingConditionOnMachine", err.Error()) return res, fmt.Errorf("failed to set conditions on CAPI machine: %w", err) }