Bug 1480442 - registry-console points to wrong image tag
registry-console points to wrong image tag
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.6.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.6.z
Assigned To: Scott Dodson
Johnny Liu
: NeedsTestCase
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-11 02:26 EDT by Marko Myllynen
Modified: 2017-08-14 12:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2017-08-11 02:26:06 EDT
Description of problem:
In https://bugzilla.redhat.com/show_bug.cgi?id=1443588 it was stated:

latest - as well as no tag (which defaults to latest) :
**Users and scripts should not use the latest tag when dealing with openshift images**

However, when installing OCP 3.6 (3.6.173.0.5-3.git.0.522a92a.el7 / v3.6.173.0.5) and navigating to the Registry Console -> Images -> default/registry-console we see this error in disconnected environments:

dockerimage.image.openshift.io "registry.example.com:5000/openshift3/registry-console:latest" not found. Timestamp: 2017-08-10T15:51:43Z Error count: 2

So if the statement in the above BZ still holds it looks like this should be fixed (since, as explained in the BZ and elsewhere, latest can be for example OCP 3.4 or OCP 3.5 image, depending on the day).

Thanks.
Comment 1 Johnny Liu 2017-08-11 04:30:48 EDT
According to https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_hosted_templates/files/v3.6/enterprise/registry-console.yaml#L108, how did you let installer to pull "latest" image? Did you specifify openshift_cockpit_deployer_version=latest on purpose in your inventory host file?


In my env, it is working well.
# oc get po
NAME                       READY     STATUS    RESTARTS   AGE
docker-registry-1-p2pdw    1/1       Running   0          56m
registry-console-1-tfg3l   1/1       Running   0          55m
router-1-8mv6q             1/1       Running   0          57m


# oc describe po registry-console-1-tfg3l|grep Image
    Image:		registry.xxx.com/openshift3/registry-console:v3.6
Comment 2 Marko Myllynen 2017-08-11 05:02:07 EDT
Sorry for being unclear with the description.

The registry-console pod itself is running all ok, it is v3.6 / 5fcc300dfad7.

The issue is seen at the actual registry-console Web UI where in case of disconnected installation the tag "latest" hasn't been synced as per the above guidelines. Instead of syncing also "latest" (which can be an OCP 3.4 image) the Web UI should show v3.6.

Of course, if the policy is changing so that "latest" now should be used (against the previous statement) then there is no issue but currently documentation says that "latest" shouldn't be used.

Thanks.
Comment 3 Johnny Liu 2017-08-11 05:48:17 EDT
Could you run the following command:
# oc get is
NAME               DOCKER REPO                                                 TAGS      UPDATED
registry-console   docker-registry.default.svc:5000/default/registry-console   v3.6      



In my env, it is pointing to v3.6, but not latest.
Comment 4 Johnny Liu 2017-08-11 05:49:56 EDT
together with the output of `oc get is egistry-console -o yaml`
Comment 5 Marko Myllynen 2017-08-11 06:49:52 EDT
[root@master01 ~]# oc get is
NAME               DOCKER REPO                                                 TAGS      UPDATED
registry-console   docker-registry.default.svc:5000/default/registry-console   v3.6      
[root@master01 ~]# oc get is registry-console -o yaml
apiVersion: v1
kind: ImageStream
metadata:
  annotations:
    description: Atomic Registry console
    openshift.io/generated-by: OpenShiftNewApp
    openshift.io/image.dockerRepositoryCheck: 2017-08-11T10:44:46Z
  creationTimestamp: 2017-08-11T10:44:46Z
  generation: 2
  labels:
    app: registry-console
    createdBy: registry-console-template
  name: registry-console
  namespace: default
  resourceVersion: "2253"
  selfLink: /oapi/v1/namespaces/default/imagestreams/registry-console
  uid: 17536b78-7e82-11e7-9e3c-525400c0c40d
spec:
  lookupPolicy:
    local: false
  tags:
  - annotations: null
    from:
      kind: DockerImage
      name: registry.example.com:5000/openshift3/registry-console
    generation: 2
    importPolicy: {}
    name: v3.6
    referencePolicy:
      type: Source
status:
  dockerImageRepository: docker-registry.default.svc:5000/default/registry-console
  tags:
  - conditions:
    - generation: 2
      lastTransitionTime: 2017-08-11T10:44:46Z
      message: dockerimage.image.openshift.io "registry.example.com:5000/openshift3/registry-console:latest"
        not found
      reason: NotFound
      status: "False"
      type: ImportSuccess
    items: null
    tag: v3.6
[root@master01 ~]# 

Thanks,
Comment 6 Scott Dodson 2017-08-14 11:26:22 EDT
Which tags do exist for registry.example.com:5000/openshift3/registry-console?

skopeo inspect docker://registry.example.com:5000/openshift3/registry-console

I suspect that this is happening only because the v3.6 tag doesn't exist in your registry. If that's so can you please ensure that v3.6 tag exists and reproduce?
Comment 7 Marko Myllynen 2017-08-14 11:30:10 EDT
v3.6 is present:

registry.example.com:5000/openshift3/registry-console            v3.6
registry.example.com:5000/openshift3/registry-console            v3.6.173.0.5
registry.example.com:5000/openshift3/registry-console            v3.6.173.0.5-4
Comment 8 Scott Dodson 2017-08-14 12:00:46 EDT
It was present when this image stream was imported? Can you try `oc import registry-console` now?
Comment 9 Marko Myllynen 2017-08-14 12:12:11 EDT
(In reply to Scott Dodson from comment #8)
> It was present when this image stream was imported?

No, the local registry was repopulated just recently, only these tags have ever been present after that, and the latest installation after that operation is still using latest.

> Can you try `oc import registry-console` now?

Hmm?

[root@master01 ~]# oc whoami
system:admin
[root@master01 ~]# oc import registry-console
error: unknown command "registry-console"
See 'oc import -h' for help and examples.
[root@master01 ~]# 

Thanks.

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