Bug 1882409 - cancel migration dosen't stop the Job pod that is used to execute hook script
Summary: cancel migration dosen't stop the Job pod that is used to execute hook script
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 1.4.0
Assignee: Padmanabha V Seshadri
QA Contact: Xin jiang
Avital Pinnick
Depends On:
TreeView+ depends on / blocked
Reported: 2020-09-24 13:42 UTC by Xin jiang
Modified: 2021-02-11 12:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-11 12:54:46 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:5329 0 None None None 2021-02-11 12:55:07 UTC

Description Xin jiang 2020-09-24 13:42:45 UTC
Description of problem:
If you try to cancel a running migration(it's added hooks) , when the migration is canceled, it doesn't stop the Job pod that is used to execute hook script

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a migplan which is attached hook script
2. Migrate the migplan
3. Once it start executing hook script, try to cancel the migration process

Actual results:
When the migration is canceled, the Job pod keep running. If the hook script fail, it will continue retrying 6 times(each time takes 30 mins) and then the job pod will be terminated. that doesn't make sense. 

Expected results:
The job should be terminated immediately

Additional info:

Comment 1 Padmanabha V Seshadri 2020-11-20 15:38:35 UTC
Fix available in https://github.com/konveyor/mig-controller/pull/768

To verify the fix:
1. Add a hook to the plan
2. Start migrate
3. Kill the migration when it is running the hook
4. After the migration gets cancelled, the job associated with the hook and corresponding pod should also have been terminated.

Comment 5 Xin jiang 2021-01-11 14:24:34 UTC
verified. When triggering cancel migration, hook pods will be terminated accordingly.


Comment 7 errata-xmlrpc 2021-02-11 12:54:46 UTC
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 (Migration Toolkit for Containers (MTC) tool image release advisory 1.4.0), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.