Bug 1281928

Summary: oc tag --source=docker <pull spec> <stream>:<tag> does not create tag
Product: OKD Reporter: Maciej Szulik <maszulik>
Component: Image RegistryAssignee: Maciej Szulik <maszulik>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.xCC: aos-bugs, wjiang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:14:16 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 Maciej Szulik 2015-11-13 20:40:08 UTC
Description of problem:
oc tag --source=docker <pull spec> <stream>:<tag>
does not create requested tag. The problem seems to be https://github.com/openshift/origin/pull/4853/files#diff-1a35f433d29ab01f47e5563ac4933758R156

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


How reproducible:
Always

Steps to Reproduce:
1. oc tag --source=docker <pull spec> <stream>:<tag>

Actual results:
No tag is created.

Expected results:
Should create tag.

Comment 1 Maciej Szulik 2015-11-13 20:42:22 UTC
This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1277046

Comment 2 Maciej Szulik 2015-11-24 13:33:27 UTC
The PR for this is: https://github.com/openshift/origin/pull/5932

Comment 3 openshift-github-bot 2015-12-04 14:27:33 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/fb730e44a38e26594204ad42e1e85c3693f354e8
Bug 1281928 - fix image stream tagging for DockerImage type images.

https://github.com/openshift/origin/commit/3cdc1aec22f517f15d81b8b8cbdedb894e0977de
Merge pull request #5932 from soltysh/bug1281928

Merged by openshift-bot

Comment 4 Wei Sun 2015-12-07 08:11:34 UTC
Verified against devenv-rhel7_2888.

Result:
1.oc tag --source=docker wsun/python-33-centos:latest  wsuntest/python:tip

# oc get is python -o json
"status": {
                "dockerImageRepository": "172.30.137.194:5000/wsuntest/python",
                "tags": [
                    {
                        "tag": "tip",
                        "items": [
                            {
                                "created": "2015-12-07T07:54:29Z",
                                "dockerImageReference": "docker.io/wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef",
                                "image": "sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef"
                            }


2.#oc tag --source=docker wsun/python-33-centos:latest  wsuntest/python:tip
3.# oc get is python 
NAME      DOCKER REPO                           TAGS       UPDATED
python    172.30.137.194:5000/wsuntest/python   test,tip   5 seconds ago

4.# oc get is python -o json
"status": {
        "dockerImageRepository": "172.30.137.194:5000/wsuntest/python",
        "tags": [
            {
                "tag": "test",
                "items": [
                    {
                        "created": "2015-12-07T08:02:11Z",
                        "dockerImageReference": "docker.io/wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef",
                        "image": "sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef"
                    }
                ]
            },
            {
                "tag": "tip",
                "items": [
                    {
                        "created": "2015-12-07T07:54:29Z",
                        "dockerImageReference": "docker.io/wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef",
                        "image": "sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef"
                    }
                ]
            }
        ]
    }