Bug 1468165 - Fail to import-image tag with the error msg unexpected
Fail to import-image tag with the error msg unexpected
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.6.0
x86_64 Linux
medium Severity medium
: ---
: 3.7.0
Assigned To: Michal Minar
ge liu
:
Depends On:
Blocks: 1469916 1471685
  Show dependency treegraph
 
Reported: 2017-07-06 03:24 EDT by ge liu
Modified: 2017-08-23 04:56 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1469916 1471685 (view as bug list)
Environment:
Last Closed:
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 ge liu 2017-07-06 03:24:34 EDT
Description of problem:

run 'oc import-image' successfully at first time, then run 'oc delete istag' to delet the image tag just import, try run import-image again, it prompt unexpect error msg: "error: image stream does not have valid docker images to be imported"

openshift v3.6.135
kubernetes v1.6.1+5115d708d7
etcd 3.2.1

How reproducible:
Always

Steps to Reproduce:
1.# oc import-image --confirm --from=centos/ruby-22-centos7 ruby-22-centos7:latest
The import completed successfully.

2.# oc get is
NAME              DOCKER REPO                                               TAGS             UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/lgproj/ruby-22-centos7   latest   3 seconds ago

3. # oc get istag
NAME                      DOCKER REF                                                                                       UPDATED          IMAGENAME
ruby-22-centos7:latest    centos/ruby-22-centos7@sha256:fb5bf6dcd15e89f5b18f2022f7c4c76d0ee442958085cbe09758250898231866   4 minutes ago    sha256:fb5bf6dcd15e89f5b18f2022f7c4c76d0ee442958085cbe09758250898231866
 # oc delete istag ruby-22-centos7:latest
imagestreamtag "ruby-22-centos7:latest" deleted

4. # oc get is
NAME              DOCKER REPO                                               TAGS      UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/lgproj/ruby-22-centos7             


5. # oc import-image --confirm --from=centos/ruby-22-centos7 ruby-22-centos7:latest
error: image stream does not have valid docker images to be imported

Actual results:
import-image again failed and prompted misguide error msg after deleted image tag

Expected results:

import-image again should succeed
Comment 1 Clayton Coleman 2017-07-06 07:45:32 EDT
import-image deals with image streams, not with tags.  The specified tag ":latest" no longer exists after you delete it.

The error message should be better, but this is not new behavior.

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