Bug 1330178 - cannot annotate istag for an image from internal registry
Summary: cannot annotate istag for an image from internal registry
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.1.0
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Michail Kargakis
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 14:21 UTC by Christophe Augello
Modified: 2019-11-14 07:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-04 12:00:43 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Christophe Augello 2016-04-25 14:21:26 UTC
Description of problem:

cannot annotate istag for image from internal registry

Version-Release number of selected component (if applicable):
3.1.1

How reproducible:
100%

Steps to Reproduce:
1. 
oc get istag
NAME                     DOCKER REF                                                                                                          UPDATED          IMAGENAME
cakephp-example:latest   172.30.250.247:5000/test2/cakephp-example@sha256:715e7fa7b6e0581f01c4123325a09a1a72a67cb4685c4bad54fd268f04d16e52   24 minutes ago   sha256:715e7fa7b6e0581f01c4123325a09a1a72a67cb4685c4bad54fd268f04d16e52

2.
oc annotate istag cakephp-example:latest foo=bar
The ImageStreamTag "cakephp-example:latest" is invalid.
metadata: invalid value '', Details: may not update fields other than metadata.annotations

Actual results:
When the image is on the internal registry the annotation will fail.

Expected results:
Be able to annotate istag 

Additional info:
Same command works with istag for public images:

#  oc get is
tomcat    library/tomcat                         8.0.33-jre7,7.0.61-jre7,6.0.45-jre7 + 120 more...   3 days ago

# oc annotate istag tomcat:6 foo=bar
# oc get istag tomcat:6 -o jsonpath={.metadata.annotations.foo}
> bar

Comment 1 Paul Weil 2016-04-26 12:50:13 UTC
Christophe, how was the image stream tag created in this scenario?  I did a quick test on a local push and was able to annotate an IST that was hosted in the local registry (steps below).  Also, could you look for errors in the master logs starting with "objects differ:".  It would be at an info level so you may need to turn up logging to see it but that should give us more info on what it thinks changed.


[vagrant@localhost origin]$ oadm registry --images=openshift/origin-docker-registry:latest
serviceaccount "registry" created
clusterrolebinding "registry-registry-role" created
deploymentconfig "docker-registry" created
service "docker-registry" created
[vagrant@localhost origin]$ oadm new-project test --admin=test
Created project test
[vagrant@localhost origin]$ oc login -u test -p test 
Login successful.

Using project "test".
[vagrant@localhost origin]$ docker tag openshift/origin-base 172.30.228.168:5000/test/foo
[vagrant@localhost origin]$ docker login -u foo -e foo -p $(oc whoami -t) 172.30.228.168:5000
WARNING: login credentials saved in /home/vagrant/.docker/config.json
Login Succeeded
[vagrant@localhost origin]$ docker push 172.30.228.168:5000/test/foo
The push refers to a repository [172.30.228.168:5000/test/foo] (len: 1)
b397e4c4d0fd: Pushed 
24c08e2373b6: Pushed 
c8a648134623: Pushed 
2bf4902415e3: Pushed 
latest: digest: sha256:7dc74deb6af92e8480bbdf639e30093773c03885890c2be6d85dc18feeb0d23e size: 9907
[vagrant@localhost origin]$ oc annotate istag foo:latest foo=bar
imagestreamtag "foo:latest" annotated

Comment 2 Christophe Augello 2016-04-26 15:03:01 UTC
Paul,

Deploy a new application based on the cakephp-example template.
The IST was created during that process.
Increased the master log level to 5, I don't see any error in master logs when hitting the issue.

Comment 3 Michail Kargakis 2016-05-31 09:48:07 UTC
I just tried to reproduce this with the cakephp-example but I couldn't:
http://pastebin.com/xNtQgEJQ

Comment 6 Brendan Mchugh 2016-07-04 11:19:34 UTC
With the note that this is not a regression since it never worked for 3.1, the case has been closed.


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