Bug 1277017 - [platformmanagement_public_514]Should not prompt "The import completed successfully" if there are no tags and spec.DockerImageRepository
[platformmanagement_public_514]Should not prompt "The import completed succes...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Maciej Szulik
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-02 00:09 EST by Wei Sun
Modified: 2015-11-23 16:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:13:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2015-11-02 00:09:57 EST
Description of problem:
Create an ImageStream without tags and spec.DockerImageRepository set,and then import the image using `oc import-image`,the client return "The import completed successfully."
But I could not see the images by running `oc get images`

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

How reproducible:
Always

Steps to Reproduce:
1.Create a new ImageStream without tags and spec.DockerImageRepository set
2.Import the image
3.Get the image

Actual results:
1.# cat 510529.json 
  {

    "kind": "ImageStream",

    "apiVersion": "v1",

    "metadata": {

      "name": "python",

      "creationTimestamp": null

    },

    "spec": { }

   }

2.# oc import-image python -n wsuntest
Waiting for the import to complete, CTRL+C to stop waiting.
The import completed successfully.

Name:			python
Created:		7 seconds ago
Labels:			<none>
Annotations:		openshift.io/image.dockerRepositoryCheck=2015-11-02T04:53:30Z
Docker Pull Spec:	172.30.125.194:5000/wsuntest/python
Tags:			<none>

3.# oc get images
There is no image


Expected results:
Could not import the images successfully,but the client should not return "The import completed successfully",the client should give friendly error information.

Additional info:
Comment 1 Maciej Szulik 2015-11-02 09:30:14 EST
I've added check if spec.DockerImageRepository and spec.Tags are not empty https://github.com/openshift/origin/pull/5575
Comment 2 openshift-github-bot 2015-11-02 12:45:04 EST
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/7257b7c419df24e9f3fb1f3e5ee17f94210746f6
Bug 1277017 - Added checking if spec.DockerImageRepository and spec.Tags
are not empty.

https://github.com/openshift/origin/commit/0079db7f549a507eff80a218703669dbc5ac90a5
Merge pull request #5575 from soltysh/bug1277017

Merged by openshift-bot
Comment 3 Wei Sun 2015-11-03 01:57:16 EST
Checked this bug against devenv-centos7_2629.the bug has been fixed.

Now the result:
$ oc import-image python -n wsuntest
error: image stream has not defined anything to import

After the bug is moved to ON_QA,I'll verify this bug.
Comment 4 Wei Sun 2015-11-03 03:08:59 EST
According to #Comment 3,verified this bug.

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