Description of problem: When a hook is added to a migration plan, if this hook fails, the migration is stuck. Even after the hook job reaching the max backoff limit, the migration is not failed and is pending forever. Version-Release number of selected component (if applicable): KONVERYOR 1.2 How reproducible: Always Steps to Reproduce: 1. Create a migration plan with a prebackup hook that will fail always. 2. Run the migration plan. Actual results: The migration is stuck in PreBackupHooks stage. Even if the hook's job reaches the backoff limit status: conditions: - lastProbeTime: "2020-04-29T11:45:35Z" lastTransitionTime: "2020-04-29T11:45:35Z" message: Job has reached the specified backoff limit reason: BackoffLimitExceeded status: "True" type: Failed Expected results: The migration should fail once the job reaches the backoff limit and is marked as failed. Additional info:
This is a different failure case than I was seeing when I tested. The PR linked will also check for status.conditions[0].reason in addition to status.failed count now. There was also an overall issue with not calling t.fail when we hit an error. We were logging it but not failing the task. That's fixed here as well.
Verified in CAM 1.2 stage After the hook failure, we get this status in the migmigration resource status: conditions: - category: Advisory durable: true lastTransitionTime: "2020-05-08T10:14:49Z" message: 'The migration has failed. See: Errors.' reason: PostRestoreHooksFailed status: "True" type: Failed errors: - Hook job hookfail-postrestore-lt6fg failed. itenerary: Failed observedDigest: 7302c6c7dc0e37e5bad574bcb88caba97dcfef0205f47e503cbf6626b71d1250 phase: Completed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:2326