Description of problem: When we configure disable_image_migration=true in the migrationcontroller resource, Direct Image Migrations are migrating the imagestreams anyway. Version-Release number of selected component (if applicable): MTC 1.4.0 How reproducible: Steps to Reproduce: 1. In source cluster. Create a new namespace oc new-project bz-test 2. In source cluster. Create an internal imagestream in this namespace oc new-build -D $'FROM centos:7\nRUN yum install -y httpd' -n bz-test 3. Create a migration plan for the namespace, using Direct Image Migration. 4. In controller cluster. Configure the MigrationController resource to skip the imagestreams in controller cluster oc patch migrationcontroller migration-controller -p '{"spec":{"disable_image_migration": "true" } }' --type='merge' -n openshift-migration 5. Wait until migration-controller pod is restarted 6. Execute the migration Actual results: The imagestream should not be migrated, since we hace configured disable_image_migration=true Expected results: The imagestream is migrated. Additional info:
Upon initial investigation, I could confirm that the imagestreams were migrated even if the `disable_image_migration` is set to True. I will continue to investigate this issue further, but it looks like the root cause of the problem could be that the `imagestreamtags` are not excluded from Velero Backup which is causing them to be restored on the target cluster. When `disable_image_migration` is set, `imagestreams` and `imagetags` resources are added to excluded list but `imagestreamtags` are not which might be causing imagestreams to be restored from the tags.
With this fix the external images are not being migrated when disable_image_migration=true. disable_image_migration=true should skip the copy of the internal images, but the external images should be migrated to the target cluster. We move the status to ASSIGNED.
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. https://access.redhat.com/errata/RHBA-2020:5329