Exported imagestreams are broken on reimport

Solution Verified - Updated -

Issue

  • Exported imagestreams are broken on reimport
  • The builds are failing with below error when using exported imagestreams
The ImageStreamTag "rhel:latest" is invalid: from: Error resolving ImageStreamTag rhel:latest in namespace import-export-demo: unable to find latest tagged image
  • The buildconfig and imagesteam are exported as below:
# oc new-project import-export-demo
Now using project "import-export-demo" on server "https://lb.example.com:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

to build a new example application in Ruby.

# oc new-build https://github.com/andreaseger/ta_openshift_is_export_import.git
--> Found Docker image af709b3 (3 weeks old) from registry.access.redhat.com for "registry.access.redhat.com/rhel7/rhel"

    Red Hat Enterprise Linux 7 
    -------------------------- 
    The Red Hat Enterprise Linux Base image is designed to be a fully supported foundation for your containerized applications.  This base image provides your operations and application teams with the packages, language runtimes and tools necessary to run, maintain, and troubleshoot all of your applications. This image is maintained by Red Hat and updated regularly. It is designed and engineered to be the base layer for all of your containerized applications, middleware and utilites. When used as the source for all of your containers, only one copy will ever be downloaded and cached in your production environment. Use this image just like you would a regular Red Hat Enterprise Linux distribution. Tools like yum, gzip, and bash are provided by default. For further information on how this image was built look at the /root/anacanda-ks.cfg file.

    Tags: base rhel7

    * An image stream will be created as "rhel:latest" that will track the source image
    * A Docker build using source code from https://github.com/andreaseger/ta_openshift_is_export_import.git will be created
      * The resulting image will be pushed to image stream "taopenshiftisexportimport:latest"
      * Every time "rhel:latest" changes a new build will be triggered

--> Creating resources with label build=taopenshiftisexportimport ...
    imagestream "rhel" created
    imagestream "taopenshiftisexportimport" created
    buildconfig "taopenshiftisexportimport" created
--> Success
    Build configuration "taopenshiftisexportimport" created and build triggered.
    Run 'oc logs -f bc/taopenshiftisexportimport' to stream the build progress.

# oc get bc,is
NAME                           TYPE      FROM      LATEST
bc/taopenshiftisexportimport   Docker    Git       1

NAME                           DOCKER REPO                                                                     TAGS      UPDATED
is/rhel                        docker-registry.default.svc:5000/import-export-demo/rhel                        latest    10 seconds ago
is/taopenshiftisexportimport   docker-registry.default.svc:5000/import-export-demo/taopenshiftisexportimport             

# oc export bc,is > import_export_demo.yaml
  • Deleting the namespace and importing the imagestream fails:
# oc delete project import-export-demo                                                                                                                                              @scruffy
project "import-export-demo" deleted

# oc new-project import-export-demo
Already on project "import-export-demo" on server "https://lb.example.com:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

to build a new example application in Ruby.

# oc get all
No resources found.

# oc create -f import_export_demo.yaml
buildconfig "taopenshiftisexportimport" created
imagestream "rhel" created
imagestream "taopenshiftisexportimport" created

# oc start-build taopenshiftisexportimport
The ImageStreamTag "rhel:latest" is invalid: from: Error resolving ImageStreamTag rhel:latest in namespace import-export-demo: unable to find latest tagged image

Environment

  • Openshift 3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content