Bug 1917810 - DIM is ignoring disable_image_migration value
Summary: DIM is ignoring disable_image_migration value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.4.0
Assignee: Pranav Gaikwad
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-19 12:31 UTC by Sergio
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:
Environment:
Last Closed: 2021-02-11 12:55:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-operator pull 565 0 None closed Bug 1917810: Add imagestreamtags to skipped resources when image migration is disabled 2021-02-17 08:55:40 UTC
Red Hat Product Errata RHBA-2020:5329 0 None None None 2021-02-11 12:55:45 UTC

Description Sergio 2021-01-19 12:31:14 UTC
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:

Comment 1 Pranav Gaikwad 2021-01-26 20:23:45 UTC
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.

Comment 6 Sergio 2021-02-02 14:52:14 UTC
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.

Comment 8 errata-xmlrpc 2021-02-11 12:55:27 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.

https://access.redhat.com/errata/RHBA-2020:5329


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