Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1433244

Summary: oc import-image doesnt respect request-timeout
Product: OpenShift Container Platform Reporter: Javier Ramirez <javier.ramirez>
Component: Image RegistryAssignee: Maciej Szulik <maszulik>
Status: CLOSED CURRENTRELEASE QA Contact: Dongbo Yan <dyan>
Severity: low Docs Contact:
Priority: medium    
Version: 3.4.1CC: aos-bugs, bparees, dyan, eparis, fshaikh, maszulik, mfojtik, pdwyer, rbost, smunilla
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v3.9.0-0.42.0 Doc Type: Bug Fix
Doc Text:
Cause: Ignoring --request-timeout parameter. Consequence: Request timeout wasn't passed to the apiserver. Fix: Wire --request-timeout so that its value is being passed to apiserver. Result: The request timeout parameter is properly applied.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 18:02:36 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:
Embargoed:
Attachments:
Description Flags
oc import-image log none

Description Javier Ramirez 2017-03-17 07:35:43 UTC
Created attachment 1263967 [details]
oc import-image log

Description of problem:
oc import-image doesnt respect request-timeout

Version-Release number of selected component (if applicable):
openshift v3.4.1.7
kubernetes v1.4.0+776c994


How reproducible:
Always

Steps to Reproduce:
1. Update maxImagesBulkImportedPerRepository to a higher value (-1 == unlimited tags):

imagePolicyConfig:
  maxImagesBulkImportedPerRepository: -1

2. Restart master for config to take effect

3. oc import-image openshift3/ose-pod --from=registry.access.redhat.com/openshift3/ose-pod --all=true --confirm=true --request-timeout="5m" -n openshift3

Actual results:
Command files with a timeout of 30 seconds:
I0317 08:06:43.268150    6900 round_trippers.go:306]     User-Agent: oc/v3.4.1.7 (linux/amd64) openshift/81b9a4a
I0317 08:07:13.271503    6900 round_trippers.go:321] Response Status: 504 Gateway Timeout in 30003 milliseconds


Expected results:
request-timeout parameter to be taken into account.

Additional info:

Comment 1 Maciej Szulik 2017-03-17 15:06:04 UTC
Additionally we need to include image import into longRunningRequests, like binary builds.

Comment 2 Maciej Szulik 2017-03-20 15:02:58 UTC
Addressed in https://github.com/openshift/origin/pull/13458

Comment 3 openshift-github-bot 2017-04-10 19:19:04 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/078e6ea1b10c109f7a4b48d1c5b71e40b8c047de
Bug 1433244 - allow imageimports to be long runing requests

https://github.com/openshift/origin/commit/5129a2d9dfff4b7bc95ab7b56041678e64a2ffaa
Merge pull request #13458 from soltysh/bug1433244

Merged by openshift-bot

Comment 4 Maciej Szulik 2017-04-11 09:54:35 UTC
The other half of this issues is solved in https://github.com/openshift/origin/pull/13701

Comment 11 Ben Parees 2017-10-13 16:46:42 UTC
Maciej what's left to get this over the hump for 3.7?

Comment 12 Maciej Szulik 2017-10-17 07:48:11 UTC
I have an agreement on the upstream change from David, Fabiano and Juan. I'll be refreshing that PR today or tomorrow and once that is close to approval I will cherry-pick it to 3.7.

Comment 17 Maciej Szulik 2018-02-06 13:29:32 UTC
Updated PR with the ability to properly pass the --request-timeout to client is https://github.com/openshift/origin/pull/13701

Comment 18 Dongbo Yan 2018-02-14 02:44:35 UTC
Verified
oc v3.9.0-0.42.0
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

openshift v3.9.0-0.42.0
kubernetes v1.9.1+a0ce1bc657

import image successfully without error, request-timeout parameter to be taken into account.