Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1816151

Summary: Migration fails when migrating tagged imagestreams created with import-image command
Product: OpenShift Container Platform Reporter: Sergio <sregidor>
Component: Migration ToolingAssignee: John Matthews <jmatthew>
Status: CLOSED DUPLICATE QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.zCC: dymurray, jmatthew, xjiang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1816148 Environment:
Last Closed: 2020-04-06 17:28:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1816148    
Bug Blocks:    

Description Sergio 2020-03-23 13:05:42 UTC
+++ This bug was initially created as a clone of Bug #1816148 +++

Description of problem:
When CAM tries to migrate imagestreams created with import-image command, and those imagestreams are tagged, the migration fails.

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

How reproducible:
Always

Steps to Reproduce:
1. Create these resources

oc new-project ocp-28021-istags
oc -n ocp-28021-istags  import-image internal-alpine:int --from docker.io/alpine:latest --confirm
oc -n ocp-28021-istags  import-image internal-alpine:3.9 --from docker.io/alpine:3.9 --confirm
oc -n  ocp-28021-istags tag internal-alpine:int  internal-alpine:tag1 --alias=False
oc -n  ocp-28021-istags tag internal-alpine:int  internal-alpine:tag2 --alias=False
oc -n  ocp-28021-istags tag internal-alpine:3.9  internal-alpine:tag3 --alias=False
oc -n  ocp-28021-istags tag internal-alpine:3.9  internal-alpine:latest --alias=False
oc -n  ocp-28021-istags tag internal-alpine:3.9  internal-alpine:tag4 --alias=False

2. Migrate the namespace

Actual results:
The migration fails with this error

time="2020-03-20T13:53:39Z" level=info msg="error restoring internal-alpine:tag2: ImageStream.image.openshift.io \"internal-alpine\" is invalid: []: Int
ernal error: imagestreams \"internal-alpine\" is invalid: spec.tags[tag2].from.name: Invalid value: \"internal-alpine@sha256:ddba4d27a7ffc3f86dd6c2f9204
1af252a1f23a8e742c90e6e1297bfa1bc0c45\": error generating tag event: imagestreamimage.image.openshift.io \"sha256:ddba4d27a7ffc3f86dd6c2f92041af252a1f23
a8e742c90e6e1297bfa1bc0c45\" not found" logSource="pkg/restore/restore.go:1079" restore=openshift-migration/ocp-28021-istags-mig-1584712008-llptj

Expected results:
The migration should succeed and the imagestream and its tags should be migrated to the target cluster.

Additional info:

Comment 1 Dylan Murray 2020-04-06 17:28:03 UTC
Closing as this will not make into CAM 1.1.2. Keeping the original bug which will be fixed in a future release.

*** This bug has been marked as a duplicate of bug 1816148 ***