Bug 1463890 - Can't tag the build image with another alias [NEEDINFO]
Can't tag the build image with another alias
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Maciej Szulik
ge liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-21 23:07 EDT by zhou ying
Modified: 2017-08-16 15 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:28:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
pweil: needinfo? (mfojtik)


Attachments (Terms of Use)

  None (edit)
Description zhou ying 2017-06-21 23:07:35 EDT
Description of problem:
Build an image, use command try to tag the image with another tag alias then will failed with error:
The ImageStreamTag "ruby-ex:20" is invalid: metadata: Invalid value: "": may not update fields other than metadata.annotations

Version-Release number of selected component (if applicable):
openshift v3.6.121
kubernetes v1.6.1+5115d708d7
etcd 3.2.0

How reproducible:
always

Steps to Reproduce:
1. Login openshift and create project;
2. Use command to create app and build new images:
   `oc new-build centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git`
3. Wait for the build completed, and try to tag image with command:
   `oc tag 172.30.136.252:5000/x52a7/ruby-ex:latest --source=docker x52a7/ruby-ex:20 --insecure=true`
   `oc tag ruby-ex:latest --source=istag ruby-ex:tag --alias=true`

Actual results:
3. The command failed with error:
The ImageStreamTag "ruby-ex:20" is invalid: metadata: Invalid value: "": may not update fields other than metadata.annotations

Expected results:
3.Should able to tag the imagestream with new alias.

Additional info:
Comment 1 Maciej Szulik 2017-06-23 10:29:41 EDT
The fix is in https://github.com/openshift/origin/pull/14803
Comment 2 Clayton Coleman 2017-07-07 14:16:42 EDT
This may be an API compatibility break, and thus may block the release.
Comment 3 Clayton Coleman 2017-07-07 14:16:50 EDT
This may be an API compatibility break, and thus may block the release.
Comment 4 Clayton Coleman 2017-07-07 14:43:21 EDT
Fix for the API compatibility issue in https://github.com/openshift/origin/pull/15098
Comment 8 ge liu 2017-07-24 04:06:23 EDT
We will try to verify it after the build ready ASAP.
Comment 9 zhou ying 2017-07-24 22:52:29 EDT
Confirmed with latest OCP, the issue has fixed:
openshift v3.6.169
kubernetes v1.6.1+5115d708d7
etcd 3.2.1

[root@zhouy testjson]# oc tag docker-registry.default.svc:5000/zhouy/ruby-ex --source=docker zhouy/ruby-ex:20 --insecure=true
Tag ruby-ex:20 set to docker-registry.default.svc:5000/zhouy/ruby-ex.
[root@zhouy testjson]# oc get is
NAME              DOCKER REPO                                              TAGS        UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/zhouy/ruby-22-centos7   latest      About a minute ago
ruby-ex           docker-registry.default.svc:5000/zhouy/ruby-ex           20,latest   Less than a second ago


[root@zhouy testjson]# oc tag ruby-ex:latest --source=istag ruby-ex:tag --alias=true
Tag ruby-ex:tag set up to track ruby-ex:latest.
[root@zhouy testjson]# oc get is
NAME              DOCKER REPO                                              TAGS            UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/zhouy/ruby-22-centos7   latest          2 minutes ago
ruby-ex           docker-registry.default.svc:5000/zhouy/ruby-ex           20,latest,tag   13 seconds ago
[root@zhouy testjson]# oc get is ruby-ex -o yaml 
apiVersion: v1
kind: ImageStream
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftNewApp
    openshift.io/image.dockerRepositoryCheck: 2017-07-25T02:49:00Z
  creationTimestamp: 2017-07-25T02:46:28Z
  generation: 4
  labels:
    app: ruby-ex
  name: ruby-ex
  namespace: zhouy
  resourceVersion: "3442"
  selfLink: /oapi/v1/namespaces/zhouy/imagestreams/ruby-ex
  uid: 750a250a-70e3-11e7-973d-fa163ece11cf
spec:
  lookupPolicy:
    local: false
  tags:
  - annotations: null
    from:
      kind: DockerImage
      name: docker-registry.default.svc:5000/zhouy/ruby-ex
    generation: 3
    importPolicy:
      insecure: true
    name: "20"
    referencePolicy:
      type: Source
  - annotations: null
    from:
      kind: ImageStreamTag
      name: ruby-ex:latest
    generation: 4
    importPolicy: {}
    name: tag
    referencePolicy:
      type: Source
status:
  dockerImageRepository: docker-registry.default.svc:5000/zhouy/ruby-ex
  tags:
  - items:
    - created: 2017-07-25T02:47:20Z
      dockerImageReference: docker-registry.default.svc:5000/zhouy/ruby-ex@sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
      generation: 4
      image: sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
    tag: latest
  - items:
    - created: 2017-07-25T02:49:00Z
      dockerImageReference: docker-registry.default.svc:5000/zhouy/ruby-ex@sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
      generation: 3
      image: sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
    tag: "20"
  - items:
    - created: 2017-07-25T02:47:20Z
      dockerImageReference: docker-registry.default.svc:5000/zhouy/ruby-ex@sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
      generation: 4
      image: sha256:78f34814616d36c7282d62135faf81bd366e62e60c7c3425bb89ca07aa6ee335
    tag: tag
Comment 11 errata-xmlrpc 2017-08-10 01:28:56 EDT
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/RHEA-2017:1716

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