Bug 1878022

Summary: Met imagestreamimport error when import the whole image repository
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: high Docs Contact:
Priority: medium    
Version: 4.4CC: aos-bugs, obulatov
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: During the last kubernetes update a timeout on its APIs started to be enforced. This timeout is making every long standing request to be dropped after 34 seconds. Consequence: When importing big repositories (many tags) we reached the timeout, not allowing the import to succeed as in previous versions. Fix: We already provide a flag to set a different timeout on oc client but we did not provide any example for its usage, making difficult for the client to understand how to bypass the API timeout. Result: Providing an example of the flag usage on oc help made things clear for the client, it is easier to find this option.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:17:43 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:

Description XiuJuan Wang 2020-09-11 05:50:04 UTC
Description of problem:

Met imagestreamimport error when import the whole image repository

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

How reproducible:

Steps to Reproduce:
1.Import image with the whole repository
$oc import-image myruby --from=registry.redhat.io/rhscl/ruby-25-rhel7 --all --confirm  --insecure --loglevel=8
2.In same project, import image with specify tag
$oc import-image myruby --from=registry.redhat.io/rhscl/ruby-25-rhel7 --all --confirm  --insecure --loglevel=8
3.In same project import v1 image with whole repository
$oc import-image myv1image --from=devexp.registry-v1.qe.devcluster.openshift.com:5000/imagev1/test1 --all --confirm  --insecure --loglevel=8

Actual results:

step 1 and step 3 failed, and step 2 succeed. Details in http://pastebin.test.redhat.com/901411

Expected results:
Should import image successfully

Additional info:

Comment 1 Oleg Bulatov 2020-09-11 17:05:04 UTC
That looks like a serious regression. We need to adjust timeouts for ImageStreamImports.

Comment 2 Oleg Bulatov 2020-09-21 05:22:14 UTC
I was able to reproduce this using 4.4.23. Moving to 4.7 as it's not a blocker for 4.6.

Comment 9 XiuJuan Wang 2021-02-01 08:15:33 UTC
$oc version 
Client Version: 4.7.0-0.nightly-2021-01-31-031653

`oc import-image` help doc is updated.
  # Import all tags into a new image stream using a custom timeout.
  oc --request-timeout=5m import-image mystream --from=registry.io/repo/image --all --confirm

The cmd works to import the whole repository.
oc import-image myruby --from=registry.redhat.io/rhscl/ruby-25-rhel7 --all --confirm  --insecure --loglevel=8  --request-timeout=5m

I0201 16:12:50.016021   12396 round_trippers.go:422] POST https://api.qe-ui47-0201.qe.devcluster.openshift.com:6443/apis/image.openshift.io/v1/namespaces/xiuwang/imagestreamimports?timeout=5m0s

Comment 12 errata-xmlrpc 2021-02-24 15:17:43 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.