Bug 1518502
| Summary: | Creating oc tag alias shows importing latest image forever | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Kenjiro Nakayama <knakayam> |
| Component: | ImageStreams | Assignee: | Corey Daley <cdaley> |
| Status: | CLOSED ERRATA | QA Contact: | Dongbo Yan <dyan> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.6.0 | CC: | aos-bugs, bparees, cewong, jokerman, jvallejo, knakayam, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | 3.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-28 14:13:03 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Hi Kenjiro, could you provide the version of the client that you are using to reproduce this? Thanks Hi Juan, I have built upstream code and confirmed the issue can be produced. $ ./_output/local/bin/linux/amd64/oc version oc v3.8.0-alpha.0+a4e491d-326 kubernetes v1.8.1+0d5291c features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://api.ded-stage-aws.openshift.com:443 openshift v3.6.173.0.49 kubernetes v1.6.1+5115d708d7 Also, old oc version (e.g v3.3) can see this issue. # oc version oc v3.3.1.46.11 kubernetes v1.3.0+52492b4 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://knakayam-ose33-lb1.example.com:8443 openshift v3.3.1.46.11 kubernetes v1.3.0+52492b4 @bparees I was wondering if you had seen this happen in the past? Looking at the describer code for this [1], maybe the image does not have a spec tag / is missing a `From` tagRef? 1. https://github.com/openshift/origin/blob/master/pkg/oc/cli/describe/helpers.go#L297 i've only owned this component for 2 months, so "no" :) But the issue would only happen when it *does* have a tagRef.From (the default for "importing" is false). It seems most likely that it's an issue w/ this line: importing = !tagRef.Reference && tagRef.Generation != nil && *tagRef.Generation != gen we'd have to see the full yaml for an imagestream tag that's being described incorrectly to know for sure. apiVersion: v1
kind: ImageStream
metadata:
annotations:
openshift.io/image.dockerRepositoryCheck: 2017-12-04T16:28:54Z
creationTimestamp: 2017-12-04T16:28:50Z
generation: 3
name: perl
namespace: demo
resourceVersion: "4484184"
selfLink: /oapi/v1/namespaces/demo/imagestreams/perl
uid: 35ffaab7-d910-11e7-80df-001a4a40dc8c
spec:
tags:
- annotations: null
from:
kind: DockerImage
name: registry.access.redhat.com/rhscl/perl-520-rhel7:latest
generation: 2
importPolicy: {}
name: "5.20"
- annotations: null
from:
kind: ImageStreamTag
name: perl:5.20
generation: 3
importPolicy: {}
name: latest
status:
dockerImageRepository: 172.30.106.110:5000/demo/perl
tags:
- items:
- created: 2017-12-04T16:28:54Z
dockerImageReference: registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:33943283d085d8b93dd8898f3fcc83dcbdb901deb8aef6de443c9520fd3103f8
generation: 3
image: sha256:33943283d085d8b93dd8898f3fcc83dcbdb901deb8aef6de443c9520fd3103f8
tag: latest
- items:
- created: 2017-12-04T16:28:54Z
dockerImageReference: registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:33943283d085d8b93dd8898f3fcc83dcbdb901deb8aef6de443c9520fd3103f8
generation: 3
image: sha256:33943283d085d8b93dd8898f3fcc83dcbdb901deb8aef6de443c9520fd3103f8
tag: "5.20"
I provided the full yaml. But as I reported, the issue could be produced by just two commands and so you can check it by yourself. # oc tag registry.access.redhat.com/rhscl/perl-520-rhel7:latest perl:5.20 --source=docker # oc tag perl:5.20 perl:latest --source=istag --alias Kenjiro we don't always have time to go setup an env to reproduce everything, that's why it's sometimes easier for us to just ask you for this information. Thank you for providing it. As i suspected the message shows up because the spec.tag[5.20] has a generation==2 and the status.tag[5.20] has generation=3. Now *why* that occurred(and whether it should be expected), i'm not sure and will need further investigation. it's possible we should just change the check to: importing = !tagRef.Reference && tagRef.Generation != nil && *tagRef.Generation > gen Submitted pull request https://github.com/openshift/origin/pull/18043 Verified # oc version oc v3.9.0-0.22.0 kubernetes v1.9.1+a0ce1bc657 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://:8443 openshift v3.9.0-0.22.0 kubernetes v1.9.1+a0ce1bc657 # oc describe is Name: perl Namespace: dyan2 Created: 25 seconds ago Labels: <none> Annotations: openshift.io/image.dockerRepositoryCheck=2018-01-23T09:33:30Z Docker Pull Spec: docker-registry.default.svc:5000/dyan2/perl Image Lookup: local=false Unique Images: 1 Tags: 2 latest tagged from perl:5.20 * registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:dda022dc2d7098e127d91ec07805c4aeeaaed7f4f12b5f20c22a9a8352cbc2f5 25 seconds ago 5.20 tagged from registry.access.redhat.com/rhscl/perl-520-rhel7:latest * registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:dda022dc2d7098e127d91ec07805c4aeeaaed7f4f12b5f20c22a9a8352cbc2f5 25 seconds ago 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, 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-2018:0489 |
Description of problem: - Creating oc tag alias shows importing latest image forever Version-Release number of selected component (if applicable): - OCP 3.6 How reproducible: 100% Steps to Reproduce: 1. Create imageStreamTag with these two commands: # oc tag registry.access.redhat.com/rhscl/perl-520-rhel7:latest perl:5.20 --source=docker # oc tag perl:5.20 perl:latest --source=istag --alias 2. Check oc describe is perl Actual results: - 5.20 tag displays "importing latest image ..." forever. (Full output) ~~~ $ oc describe is perl Name: perl Namespace: demo Created: 12 seconds ago Labels: <none> Annotations: openshift.io/image.dockerRepositoryCheck=2017-11-29T05:44:47Z Docker Pull Spec: 172.30.200.222:5000/demo/perl Image Lookup: local=false Unique Images: 1 Tags: 2 latest tagged from perl:5.20 * registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:d0b7011aa1a7e961d96388ec062a0b3a03ff8e0e3225f7290f36ab8316724420 11 seconds ago 5.20 tagged from registry.access.redhat.com/rhscl/perl-520-rhel7:latest ~ importing latest image ... * registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:d0b7011aa1a7e961d96388ec062a0b3a03ff8e0e3225f7290f36ab8316724420 11 seconds ago ~~~ Expected results: - It should not display "importing latest image ...". It should display just like: ~~~ ... 5.20 tagged from registry.access.redhat.com/rhscl/perl-520-rhel7:latest * registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:d0b7011aa1a7e961d96388ec062a0b3a03ff8e0e3225f7290f36ab8316724420 3 seconds ago ~~~