Skip to content

Commit

Permalink
fix: handle copy preflight results job already exists error
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Dec 18, 2024
1 parent 4f86e45 commit af688c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions operator/controllers/installation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,12 @@ func (r *InstallationReconciler) CopyHostPreflightResultsFromNodes(ctx context.C
}

if err := r.Create(ctx, job); err != nil {
return fmt.Errorf("failed to create job: %w", err)
if !errors.IsAlreadyExists(err) {
return fmt.Errorf("failed to create job: %w", err)
}
} else {
log.Info("Copy host preflight results job for node created", "node", event.NodeName, "installation", in.Name)
}
log.Info("Copy host preflight results job for node created", "node", event.NodeName, "installation", in.Name)
}

return nil
Expand Down

0 comments on commit af688c8

Please sign in to comment.