Bug 1525659

Summary: Jenkins imagestream should use version-specific tags instead of latest
Product: OpenShift Container Platform Reporter: Josep 'Pep' Turro Mauri <pep>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: Johnny Liu <jialiu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.0CC: aos-bugs, bparees, jokerman, mmccomas, sdodson, vrutkovs
Target Milestone: ---Flags: sdodson: needinfo-
Target Release: 3.7.z   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The jenkins image stream tags have been updated to allow for OCP version specific image streams.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-05 09:34:33 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:

Description Josep 'Pep' Turro Mauri 2017-12-13 20:00:05 UTC
Description of problem:

The 'jenkins' imagestream references jenkins-2-rhel7:latest.

In bug 1518501 a change was implemented so that 'latest' actually points to the v3.6 tag instead of v3.7.

In practice this means that on a 3.7 cluster "oc new-app jenkins" will deploy the 3.6 image.

Version-Release number of the following components:

# rpm -qf /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.7/image-streams/image-streams-rhel7.json 
openshift-ansible-roles-3.7.9-1.git.7.eedd332.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install OCP 3.7
2. oc describe is -n openshift jenkins | grep jenkins-2


Actual results:

$ oc describe is -n openshift jenkins | grep jenkins-2
  tagged from registry.access.redhat.com/openshift3/jenkins-2-rhel7:latest
  * registry.access.redhat.com/openshift3/jenkins-2-rhel7@sha256:c2e5ffc909fc598628caebe56571849cbcbeea6c99f885a9870cb8c5967d5111

Note that this is actually a v3.6 image:

$ skopeo inspect docker://registry.access.redhat.com/openshift3/jenkins-2-rhel7:latest | jq .Labels.version
"v3.6.173.0.49"


Expected results:

A 3.7 cluster would deploy a v3.7 image by default

Additional info:

A similar change was recently merged to upstream examples: https://github.com/openshift/origin/pull/17562

Comment 3 Vadim Rutkovsky 2018-01-17 12:34:28 UTC
This was resolved in https://github.com/openshift/openshift-ansible/pull/6703

Comment 4 Johnny Liu 2018-01-23 06:43:30 UTC
Verified this bug with openshift-ansible-3.7.24-1.git.0.18a2c6a.el7.noarch, and PASS.


# oc get is jenkins -o yaml -n openshift
<--snip-->
  - annotations:
      description: Provides a Jenkins 2.X server on RHEL 7. For more information about
        using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
      iconClass: icon-jenkins
      openshift.io/display-name: Jenkins 2.X
      openshift.io/provider-display-name: Red Hat, Inc.
      tags: jenkins
      version: 2.x
    from:
      kind: DockerImage
      name: registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.7
    generation: 2
    importPolicy: {}
    name: "2"
    referencePolicy:
      type: Source
<--snip-->


# oc describe is jenkins -n openshift
Name:			jenkins
Namespace:		openshift
Created:		4 hours ago
Labels:			<none>
Annotations:		openshift.io/display-name=Jenkins
			openshift.io/image.dockerRepositoryCheck=2018-01-23T02:25:43Z
Docker Pull Spec:	docker-registry.default.svc:5000/openshift/jenkins
Image Lookup:		local=false
Unique Images:		2
Tags:			3

1
  tagged from registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest

  Provides a Jenkins 1.X server on RHEL 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
  Tags: hidden, jenkins

  * registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:6a448ad9ac44348523cd13fef635ed1ac220a7a0f95b2a5f200f2b42a910d1d6
      4 hours ago

2 (latest)
  tagged from registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.7

  Provides a Jenkins 2.X server on RHEL 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.
  Tags: jenkins

  * registry.access.redhat.com/openshift3/jenkins-2-rhel7@sha256:661ffce338fe53a4b94585bb193958619f5165bf2b181d17251522367b043223
      4 hours ago

Comment 8 errata-xmlrpc 2018-04-05 09:34:33 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, 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:0636