Description of problem: A running MigPlan with some images failed to migrate part of the image. Example: ~~~ - destNamespace: test directMigration: name: 772df3e0-e2cf-11eb-8c21-f7a857a1d488-vw64j-rhmvv namespace: openshift-migration errors: - 'Invalid source name docker://default-route-openshift-image-registry.apps.example.com//test/java@sha256:4cd6e0506d53cd47a31f594a4b60ae13fecb88a816e132e995bab88a72833419: invalid reference format' name: java namespace: vision ~~~ Version-Release number of selected component (if applicable): ~~~ mtc-operator.v1.4.5 Migration Toolkit for Containers Operator 1.4.5 mtc-operator.v1.4.4 Succeeded ~~~ How reproducible: N/A in global, but the "invalid reference format" error message can be replicated" Steps to Reproduce: 1. running a skopeo inspect on a valid URI works: `skopeo inspect docker://registry.fedoraproject.org/fedora:latest | jq -r '.Name'` 2. Adding a second '//' in the URI to create the issue: ~~~ $ skopeo inspect docker://registry.fedoraproject.org//fedora:latest FATA[0000] Error parsing image name "docker://registry.fedoraproject.org//fedora:latest": invalid reference format ~~~ 3. Actual results: Part of the images has been transferred. Please advise why this is happening and how to fix it Expected results: All images should be transferred whether or not a '//' is part of the URI. Additional info:
I'm going to add this to an upcoming release to see some better validation around this and an explicit error message to ensure it's properly formatted.
The KCS https://access.redhat.com/solutions/6202272 has been created to address this issue until a fix will be deployed.
Hi Eric, I've made a Pull Request to automatically solve this error, based on what was done with the "http(s)://" format: https://github.com/konveyor/mig-controller/pull/1158 Please feel free to review/approve/merge it. I'm not sure about the process for this BZ, as I'm not part of the engineering team. Could you please advise who should be assigned and follow up on the status. Cheers, Vincent
Thank you for the contribution Vincent! Moving to MODIFIED as itβs shipping with the 1.6.0 release.
Verified with MTC 1.6.0 $ oc get migcluster source-cluster -o yaml | grep exposedRegistryPath f:exposedRegistryPath: {} exposedRegistryPath: default-route-openshift-image-registry.apps.cam-src-23950.qe.devcluster.openshift.com/ while executing migration, it automaticaly trimmed the `/` if it has '/' at the end of the "Exposed route host to image registry" value. Logs as below $ oc logs migration-log-reader-b5dcb7974-9z2lf -c plain | grep "default-route-openshift-image-registry.apps.cam-src-23950.qe.devcluster.openshift.com/test1" openshift-migration migration-controller-6df9dcd9cd-5vtwq mtc {"level":"info","ts":1630476792.44678,"logger":"directimagestream","msg":"[imagecopy] copying from: docker://default-route-openshift-image-registry.apps.cam-src-23950.qe.devcluster.openshift.com/test1/django-psql-persistent@sha256:2e599227f44cd027951f53d1473722004124abec1f2354d89a57f975a85dbe26","dism":"migration-ac55a-gpt7b-kbz6l","migMigration":"migration-ac55a","phase":"MigrateImageStream"}
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 (Moderate: Migration Toolkit for Containers (MTC) 1.6.0 security & bugfix update), 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/RHSA-2021:3694
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days