Bug 1433244 - oc import-image doesnt respect request-timeout
Summary: oc import-image doesnt respect request-timeout
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.4.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.9.z
Assignee: Maciej Szulik
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-17 07:35 UTC by Javier Ramirez
Modified: 2021-06-10 12:04 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-06-18 18:02:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
oc import-image log (10.19 KB, text/plain)
2017-03-17 07:35 UTC, Javier Ramirez
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3356741 0 None None None 2018-03-01 09:07:15 UTC

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.


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