Bug 1310959 - oc tag does not point to correct image of image stream
Summary: oc tag does not point to correct image of image stream
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.1.0
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks: 1267746
TreeView+ depends on / blocked
 
Reported: 2016-02-23 02:37 UTC by Qi Yong
Modified: 2019-11-14 07:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:30:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1064 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security, bug fix, and enhancement update 2016-05-12 20:19:17 UTC

Description Qi Yong 2016-02-23 02:37:15 UTC
Description of problem:
oc tag does not point to correct image of image stream

Version-Release number of selected component (if applicable):
[root@master1 ~]# oc version
oc v3.1.1.6
kubernetes v1.1.0-origin-1107-g4c8e6f4

How reproducible:


Steps to Reproduce:
[root@master1 ~]# oc describe is
Name:                   test
Created:                3 days ago
Labels:                 <none>
Annotations:            openshift.io/image.dockerRepositoryCheck=2016-02-19T08:50:28Z
Docker Pull Spec:       172.20.1.1:5000/test/test

Tag     Spec            Created         PullSpec                                                                                                Image
latest  <pushed>        3 days ago      172.20.1.1:5000/test/test@sha256:cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3
                        3 days ago      172.20.1.1:5000/test/test@sha256:e99dd2b55f9b7cd9ff8796714d6adf11aee9a83c14dc353306d1952a7d3d435f

[root@master1 ~]# oc tag test@sha256:cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3 test:1.0.49
Tag test:1.0.49 set to test@sha256:cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3.

[root@master1 ~]# oc get istag
NAME          DOCKER REF                                                                                            UPDATED         IMAGENAME
test:1.0.49   172.20.1.1:5000/test/test@sha256:e99dd2b55f9b7cd9ff8796714d6adf11aee9a83c14dc353306d1952a7d3d435f   6 seconds ago   sha256:e99dd2b55f9b7cd9ff8796714d6adf11aee9a83c14dc353306d1952a7d3d435f
test:latest   172.20.1.1:5000/test/test@sha256:cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3   3 days ago      sha256:cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3


Actual results:
test:latest and test:1.0.49 point to different images.

Expected results:
test:latest and test:1.0.49 both point to cafe742edf63376deab32fb5fea105a53a96b43d8a054e30c82178d498e10fa3


Additional info:
I did not found this issue on following version:
oc v3.1.0.4-16-g112fcc4
kubernetes v1.1.0-origin-1107-g4c8e6f4

Comment 1 Maciej Szulik 2016-02-24 11:00:33 UTC
That problem was addressed with complete redo of mechanisms behind image streams for version 3.2. Marking for re-test.

Comment 2 Wei Sun 2016-02-25 01:42:57 UTC
Verified this bug using oc v3.1.1.906

Result:
$ oc tag ruby-22-centos7@sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba ruby-22-centos7:test
Tag ruby-22-centos7:test set to ruby-22-centos7@sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba.

$ oc get istag
NAME                     DOCKER REF                                                                                       UPDATED         IMAGENAME
ruby-22-centos7:latest   centos/ruby-22-centos7@sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba   7 minutes ago   sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba
ruby-22-centos7:test     centos/ruby-22-centos7@sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba   9 seconds ago   sha256:98cef73f621fa92e1bd8f701d7c7d0e4830d234e8d1f44e6e180dfd02029c7ba

Comment 4 Wei Sun 2016-03-01 06:51:11 UTC
Tested this bug again with multiple images in image stream.

Result:
$ oc describe is perl
Name:			perl
Created:		29 minutes ago
Labels:			<none>
Annotations:		openshift.io/image.dockerRepositoryCheck=2016-03-01T06:06:20Z
Docker Pull Spec:	172.31.91.240:5000/wsunaep/perl

Tag	Spec					Created		PullSpec						Image
latest	5.20					29 minutes ago	centos/perl-520-centos7@sha256:d2ca9c9456c5c7...	<same>
5.20	centos/perl-520-centos7:latest		29 minutes ago	centos/perl-520-centos7@sha256:d2ca9c9456c5c7...	<same>
5.16	openshift/perl-516-centos7:latest	29 minutes ago	openshift/perl-516-centos7@sha256:083630e582d7c2...	<same>


$ oc tag perl@sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011  perl:tagtest
Tag perl:tagtest set to perl@sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011.


$ oc get istag|grep perl
perl:tagtest        openshift/perl-516-centos7@sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011        19 seconds ago   sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011
perl:5.16           openshift/perl-516-centos7@sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011        31 minutes ago   sha256:083630e582d7c24ae1de4d2fa9e0463d5ef5c94960bc88a27d365a081aac1011
perl:5.20           centos/perl-520-centos7@sha256:d2ca9c9456c5c745e74adfc8fe388a3b4b7dd27053ec32ba20a3132e058b05d5           31 minutes ago   sha256:d2ca9c9456c5c745e74adfc8fe388a3b4b7dd27053ec32ba20a3132e058b05d5
perl:latest         centos/perl-520-centos7@sha256:d2ca9c9456c5c745e74adfc8fe388a3b4b7dd27053ec32ba20a3132e058b05d5           31 minutes ago   sha256:d2ca9c9456c5c745e74adfc8fe388a3b4b7dd27053ec32ba20a3132e058b05d5

Comment 11 errata-xmlrpc 2016-05-12 16:30:04 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/RHSA-2016:1064


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