Bug 1768816

Summary: only 1 attempt at imagestreamimport failed for multiple tags, initial sample import
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: SamplesAssignee: Gabe Montero <gmontero>
Status: CLOSED ERRATA QA Contact: XiuJuan Wang <xiuwang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.zCC: gmontero
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1768814 Environment:
Last Closed: 2019-12-11 22:36:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1768814    
Bug Blocks:    

Description XiuJuan Wang 2019-11-05 10:06:39 UTC
+++ This bug was initially created as a clone of Bug #1768814 +++

Description of problem:
If a samples imagestream with multi tags fails its initial import, samples operator will only retry the image import for the first tag, and ingore other tags included latest tag.

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

4.3.0-0.nightly-2019-11-02-092336

How reproducible:
always

Steps to Reproduce:
1.Set samplesregistry to unconnect one

2.Check imagestream managed by samples operator




3.

Actual results:
$ oc describe is ruby  -n openshift 
Name:			ruby
Namespace:		openshift
Created:		7 hours ago
Labels:			samples.operator.openshift.io/managed=true
Annotations:		openshift.io/display-name=Ruby
			openshift.io/image.dockerRepositoryCheck=2019-11-05T09:51:34Z
			samples.operator.openshift.io/version=4.3.0-0.nightly-2019-10-31-022441
Image Repository:	image-registry.openshift-image-registry.svc:5000/openshift/ruby
Image Lookup:		local=false
Unique Images:		3
Tags:			4

2.5 (latest)
  tagged from test.redhat.registry.com/rhscl/ruby-25-rhel7:latest
    prefer registry pullthrough when referencing this tag

  Build and run Ruby 2.5 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.
  Tags: builder, ruby
  Supports: ruby:2.5, ruby
  Example Repo: https://github.com/sclorg/ruby-ex.git

  ! error: Import failed (InternalError): Internal error occurred: Get https://test.redhat.registry.com/v2/: EOF
      12 minutes ago
  * registry.redhat.io/rhscl/ruby-25-rhel7@sha256:0e023f3f469b33ff1316517e6b319e060133bc08317c9518197f2d8f117e17f0
      7 hours ago

2.4
  tagged from test.redhat.registry.com/rhscl/ruby-24-rhel7:latest
    prefer registry pullthrough when referencing this tag

  Build and run Ruby 2.4 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.4/README.md.
  Tags: builder, ruby
  Supports: ruby:2.4, ruby
  Example Repo: https://github.com/sclorg/ruby-ex.git

  ! error: Import failed (InternalError): Internal error occurred: Get https://test.redhat.registry.com/v2/: EOF
      12 minutes ago
  * registry.redhat.io/rhscl/ruby-24-rhel7@sha256:b25675e5646766b88401d059acbc5d3539c5e09bf6c353708d23adfc4f8638a0
      7 hours ago

2.3
  tagged from test.redhat.registry.com/rhscl/ruby-23-rhel7:latest
    prefer registry pullthrough when referencing this tag

  Build and run Ruby 2.3 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.3/README.md.
  Tags: hidden, builder, ruby
  Supports: ruby:2.3, ruby
  Example Repo: https://github.com/sclorg/ruby-ex.git

  ! error: Import failed (InternalError): Internal error occurred: Get https://test.redhat.registry.com/v2/: EOF
      12 minutes ago
  * registry.redhat.io/rhscl/ruby-23-rhel7@sha256:3f205876e1e6d05d693c8fc94e7abf7137f20767c66c636431774f1ea37094d6
      7 hours ago


Only retry for the first tag, ingore other tags.

$oc logs  -f cluster-samples-operator-d94745cdf-w57zc  | grep  init  | grep ruby 
time="2019-11-05T09:26:41Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
time="2019-11-05T09:27:59Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
time="2019-11-05T09:29:19Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
error: unexpected EOF

$ oc logs  -f cluster-samples-operator-d94745cdf-w57zc  | grep  init  | grep php 
time="2019-11-05T09:25:41Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag php/7.0"
time="2019-11-05T09:26:10Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag php/7.0"
time="2019-11-05T09:28:44Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag php/7.0"
time="2019-11-05T09:29:19Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag php/7.0"

Expected results:
Should retry to import for other tags too

Additional info:

Comment 2 XiuJuan Wang 2019-11-29 09:06:45 UTC
Could retry for the failed imagestreams
$ oc logs -f cluster-samples-operator-544bc898b9-gfp98 -n openshift-cluster-samples-operator  | grep  "ruby/2."
time="2019-11-29T08:10:39Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
time="2019-11-29T08:10:39Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.4"
time="2019-11-29T08:10:39Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.5"
time="2019-11-29T08:22:06Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
time="2019-11-29T08:22:06Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.4"
time="2019-11-29T08:54:49Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"
time="2019-11-29T08:54:49Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.4"
time="2019-11-29T08:54:50Z" level=info msg="initiated an imagestreamimport retry for imagestream/tag ruby/2.3"


Verified with 4.2.0-0.nightly-2019-11-28-230858

Comment 4 errata-xmlrpc 2019-12-11 22:36:06 UTC
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/RHBA-2019:4093