Bug 1367661

Summary: Failed to tag a new istag from IS under namespace Openshift when IS reference imagename have no sha256 prefix
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Image RegistryAssignee: Alexey Gladkov <agladkov>
Status: CLOSED NEXTRELEASE QA Contact: Wei Sun <wsun>
Severity: high Docs Contact:
Priority: high    
Version: 3.2.0CC: aos-bugs, mfojtik, miminar, wsun, xiaocwan
Target Milestone: ---Keywords: Regression, Reopened
Target Release: 3.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 19:40:30 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:

Comment 1 Michal Fojtik 2016-08-18 09:53:03 UTC

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

Comment 2 Michal Minar 2016-08-18 10:03:03 UTC
This is something else, but probably not a bug.

Comment 4 XiaochuanWang 2016-08-19 02:54:59 UTC
Image is existed and can be checked from original description: Additional info -> From QEOS7 openstack env -> 1.

This bug focus on the wrong output format of "IMAGENAME" from this command output, here are 4 columns (NAME|DOCKER REF|UPDATED|IMAGENAME).
Please notice the column "IMAGENAME" is only an id without prefix "sha256", but the correct is like "sha256:479fdcf182a8634...".
The wrong format for IMAGENAME will lead a wrong Rest request when tag a image. 

Wrong Rest request: Additional info -> From QEOS7 openstack env -> 2.
Expected output from `oc get istag`:Additional info -> From QEOS7 openstack env -> 1.
Expected Rest request is  Additional info -> From QEOS7 openstack env -> 2.

Comment 6 Michal Fojtik 2016-08-19 09:13:22 UTC
Can we see the output of:

$ oc get istag/ruby:2.2 -o yaml -n openshift

Comment 9 Michal Fojtik 2016-08-19 10:24:58 UTC
I just reproduced this by:

$ oc create -f examples/image-streams/image-streams-rhel7.json -n openshift --config=/var/lib/openshift/openshift.local.config/master/admin.kubeconfig

$ oc get istag -n openshift

All images does not have sha256: prefix.

Comment 14 weiwei jiang 2016-09-01 07:16:00 UTC
Checked on fork_ami_openshift3_miminar_295, and seems the registry.access.redhat.com has been upgraded, and the issue can not reproduced for registry.access.redhat.com.

# oc tag openshift/ruby:2.2 wjiang/ruby:2.2
Tag ruby:2.2 set to openshift/ruby@sha256:733b79c6addd6b25dc0c2527196a4d921ca255961eae294be62806a0d2c94202.
[root@ip-172-18-10-116 /]# oc get is
NAME        DOCKER REPO                           TAGS      UPDATED
django-ex   172.30.221.56:5000/wjiang/django-ex   latest    7 minutes ago
rb          172.30.221.56:5000/wjiang/rb          latest    4 hours ago
ruby        172.30.221.56:5000/wjiang/ruby        2.2       3 seconds ago


# oc get istag -n openshift
NAME                DOCKER REF                                                                                                                          UPDATED       IM$
GENAME
jenkins:1           registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:325435f552c40e73c39cc5335f8908a48b4356d4d79fb669a162f8d9fa6b7487       4 hours ago   sh$
256:325435f552c40e73c39cc5335f8908a48b4356d4d79fb669a162f8d9fa6b7487
jenkins:latest      registry.access.redhat.com/openshift3/jenkins-1-rhel7@sha256:325435f552c40e73c39cc5335f8908a48b4356d4d79fb669a162f8d9fa6b7487       4 hours ago   sh$
256:325435f552c40e73c39cc5335f8908a48b4356d4d79fb669a162f8d9fa6b7487
mongodb:2.4         registry.access.redhat.com/openshift3/mongodb-24-rhel7@sha256:8d764726d8c7774d979c24ebf0fa24febdad8d84ddf66e2c2787f6c2eee7f974      4 hours ago   sh$
256:8d764726d8c7774d979c24ebf0fa24febdad8d84ddf66e2c2787f6c2eee7f974
mongodb:2.6         registry.access.redhat.com/rhscl/mongodb-26-rhel7@sha256:29577eceefb6e223baf4b91ce04404e38d7b22d27dc20cf8ab7b3b8af2a90019           4 hours ago   sh$
256:29577eceefb6e223baf4b91ce04404e38d7b22d27dc20cf8ab7b3b8af2a90019
mongodb:latest      registry.access.redhat.com/rhscl/mongodb-26-rhel7@sha256:29577eceefb6e223baf4b91ce04404e38d7b22d27dc20cf8ab7b3b8af2a90019           4 hours ago   sh$
256:29577eceefb6e223baf4b91ce04404e38d7b22d27dc20cf8ab7b3b8af2a90019
mysql:5.5           registry.access.redhat.com/openshift3/mysql-55-rhel7@sha256:24e5c2bd8f706a2711fb610f4f36d0824f50ab2987f35438bd6e68fbe8aad908        4 hours ago   sha
256:24e5c2bd8f706a2711fb610f4f36d0824f50ab2987f35438bd6e68fbe8aad908
mysql:5.6           registry.access.redhat.com/rhscl/mysql-56-rhel7@sha256:ec43bf4535d16f8d66890559e9851472f3de46e808e25afd4caca0dea2eb6260             4 hours ago   sha
256:ec43bf4535d16f8d66890559e9851472f3de46e808e25afd4caca0dea2eb6260
mysql:latest        registry.access.redhat.com/rhscl/mysql-56-rhel7@sha256:ec43bf4535d16f8d66890559e9851472f3de46e808e25afd4caca0dea2eb6260             4 hours ago   sha
256:ec43bf4535d16f8d66890559e9851472f3de46e808e25afd4caca0dea2eb6260
nodejs:latest       registry.access.redhat.com/openshift3/nodejs-010-rhel7@sha256:7f63866f1c73438d1f351c241066b2bee1c1d0abe006d1134698178b0f315699      4 hours ago   sha
256:7f63866f1c73438d1f351c241066b2bee1c1d0abe006d1134698178b0f315699
nodejs:0.10         registry.access.redhat.com/openshift3/nodejs-010-rhel7@sha256:7f63866f1c73438d1f351c241066b2bee1c1d0abe006d1134698178b0f315699      4 hours ago   sha
256:7f63866f1c73438d1f351c241066b2bee1c1d0abe006d1134698178b0f315699
perl:5.20           registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:2a8f9b9375834a4d0e6cd48c60513ab718dcb1b2e8c6dd0fd52864ccf14c3ce2             4 hours ago   sha
256:2a8f9b9375834a4d0e6cd48c60513ab718dcb1b2e8c6dd0fd52864ccf14c3ce2
perl:latest         registry.access.redhat.com/rhscl/perl-520-rhel7@sha256:2a8f9b9375834a4d0e6cd48c60513ab718dcb1b2e8c6dd0fd52864ccf14c3ce2             4 hours ago   sha
256:2a8f9b9375834a4d0e6cd48c60513ab718dcb1b2e8c6dd0fd52864ccf14c3ce2
perl:5.16           registry.access.redhat.com/openshift3/perl-516-rhel7@sha256:afc3fcb885d81cfae0efad0a539e9cef73b14097d06f12a5490f8a2f8da819ef        4 hours ago   sha
256:afc3fcb885d81cfae0efad0a539e9cef73b14097d06f12a5490f8a2f8da819ef
php:5.6             registry.access.redhat.com/rhscl/php-56-rhel7@sha256:56645fb7d190ee9a98a5c6119bd03c782fd7c18095bad0f522190c1aea5cff4f               4 hours ago   sha
256:56645fb7d190ee9a98a5c6119bd03c782fd7c18095bad0f522190c1aea5cff4f
php:latest          registry.access.redhat.com/rhscl/php-56-rhel7@sha256:56645fb7d190ee9a98a5c6119bd03c782fd7c18095bad0f522190c1aea5cff4f               4 hours ago   sha
256:56645fb7d190ee9a98a5c6119bd03c782fd7c18095bad0f522190c1aea5cff4f
php:5.5             registry.access.redhat.com/openshift3/php-55-rhel7@sha256:06c96e02401d975f3892ec1663c644d472e13715d48e588c8f3a352fa500cb40          4 hours ago   sha
256:06c96e02401d975f3892ec1663c644d472e13715d48e588c8f3a352fa500cb40
postgresql:9.2      registry.access.redhat.com/openshift3/postgresql-92-rhel7@sha256:d3b1a49b04be080a056cbe440acb6366d9b497a38716bbdc249f830c5a730362   4 hours ago   sha
256:d3b1a49b04be080a056cbe440acb6366d9b497a38716bbdc249f830c5a730362
postgresql:9.4      registry.access.redhat.com/rhscl/postgresql-94-rhel7@sha256:50bddf765898a627ef763abf490b06ca9b8a791158f2a8a0d98be795ca2d6cbc        4 hours ago   sha
256:50bddf765898a627ef763abf490b06ca9b8a791158f2a8a0d98be795ca2d6cbc

Comment 16 XiaochuanWang 2016-10-08 02:43:09 UTC
Verified on OCP: openshift.oc v3.3.1.1

Steps follow by comment 8 and comment 9:
# oc get istag -n openshift
NAME         DOCKER REF     UPDATED     IMAGENAME
jboss-amq-62:latest       registry.access.redhat.com/jboss-amq-6/amq62-openshift@sha256:0a25571f68b...       About an hour ago   sha256:0a25571f68b...
...

# oc tag openshift/ruby:2.2 myruby:tag123 -n xiaocwan-t
Tag myruby:tag123 set to openshift/ruby@sha256:1f130e4e1d7eec42c93801638b

# oc get istag -n xiaocwan-t
NAME        DOCKER REF      UPDATED      IMAGENAME
myruby:tag123   registry.ops.openshift.com/rhscl/ruby-22-rhel7@sha256:1f130e4e1d7eec42c93801638b...   21 seconds ago   sha256:1f130e4e1d7eec42c93801638b...

Comment 17 XiaochuanWang 2016-10-08 08:15:23 UTC
Checked again and not reproduced on openshift/oc v3.2.1.16
Steps follow by comment 8 and comment 9, all istag now have the prefix "sha256":

# oc get istag -n openshift
NAME     DOCKER REF       UPDATED      IMAGENAME
dotnet:latest       registry.access.redhat.com/dotnet/dotnetcore-10-rhel7@sha256:801f260457994...     57 minutes ago   sha256:801f260457994...

# oc tag openshift/dotnet:latest xiaocwan-i/dotnet:myistag
Tag xiaocwan-i/dotnet:myistag set to openshift/dotnet@sha256:801f260457994...

# oc get istag -n xiaocwan-i
NAME        DOCKER REF     UPDATED     IMAGENAME
dotnet:myistag   registry.access.redhat.com/dotnet/dotnetcore-10-rhel7@sha256:801f260457994...   16 seconds ago   sha256:801f260457994...

Comment 19 Scott Dodson 2016-12-14 19:40:30 UTC
This bug has been fixed in OCP 3.3 however the fix will not be backported to OSE 3.2.