Bug 610182

Summary: Timeout on initial "refresh" of pool
Product: [Community] Candlepin Reporter: Mark Sechrest <msechres>
Component: candlepinAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: bkearney, kbanerje
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-10 15:36:59 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:

Description Mark Sechrest 2010-07-01 17:39:13 UTC
Description of problem: QE executed the following in order to pull org 4969898's subscriptions into candlepin. The request timed out at the proxy layer.

root@iolo ~]# curl -u calfonso:redhat -k --header "Content-type:
application/json" --header "Accept: application/json" --request PUT
https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners/4969868/subscriptions
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>504 Gateway Time-out</title>
</head><body>
<h1>Gateway Time-out</h1>
<p>The proxy server did not receive a timely response
from the upstream server.</p>
<hr>
<address>Apache Server at candlepin1.devlab.phx1.redhat.com Port
443</address>
</body></html>
[root@iolo ~]# curl -u calfonso:redhat -k --header "Content-type:
application/json" --header "Accept: application/json" --request PUT
https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners/4969868/subscriptions
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>504 Gateway Time-out</title>
</head><body>
<h1>Gateway Time-out</h1>
<p>The proxy server did not receive a timely response
from the upstream server.</p>
<hr>
<address>Apache Server at candlepin1.devlab.phx1.redhat.com Port
443</address>
</body></html>
[root@iolo ~]# curl -u calfonso:redhat -k --header "Content-type:
application/json" --header "Accept: application/json" --request PUT
https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners//subscriptions
[root@iolo ~]# curl -u calfonso:redhat -k --header "Content-type:
application/json" --header "Accept: application/json" --request PUT
https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners/2921212/subscriptions
[root@iolo ~]# 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
Timeout

Expected results:
No timeout

Additional info:

Comment 1 James Bowes 2010-07-13 14:07:13 UTC
This should be solved after we have our async process framework in place, schedule for sprint 13

Comment 2 Mark Sechrest 2010-07-13 14:14:40 UTC
I think Bryan wanted some tuning to be done, prior to making this an async process

Comment 3 Mark Sechrest 2010-07-13 20:43:06 UTC
Here's a sync that seems to always fail:

curl -u calfonso:redhat -k --header "Content-type: application/json" --header "Accept: application/json" --request PUT https://cert-fte-candlepin.devlab.redhat.com:443/candlepin/owners/4596037/subscriptions

Comment 4 Bryan Kearney 2010-09-10 18:39:10 UTC
this is now an async process, and should no longer time out.

Comment 5 spandey 2010-10-18 15:48:58 UTC
Verified using following setup 

candlepin : candlepin1





[root@rhel6-alpha product]# curl -u candlepin_system_admin:admin -k --header "Content-type: application/json" --header "Accept: application/json" --request PUT https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners/4969868/subscriptions
{"id":"refresh_pools_04ee5a0c-d32b-41a2-a838-60c0d0cf63ee","state":"CREATED","startTime":null,"result":null,"finishTime":null,"statusPath":"/jobs/refresh_pools_04ee5a0c-d32b-41a2-a838-60c0d0cf63ee","updated":"2010-10-18T15:45:46.953+0000","created":"2010-10-18T15:45:46.953+0000"}[root@rhel6-alpha product]# 


Working fine 
Moving defect status from ON_QA to Verified

Comment 6 John Sefler 2010-10-18 16:06:48 UTC
VERIFIED AGAINST OWNER 1070642 (owner of user account test1) ON CANDLEPIN1 HOSTED ENVIRONMENT:
Note that due to the design change (making pool refreshes an async process), the initial request to refresh a pool returns a JSON object with an initial state of CREATED.  I then query the jobDetail looking at the state which eventually changes to "FINISHED".  Hence the design change to make refresh pools an async request avoids the request timeouts observed in the initial problem description.

[root@jsefler-itclient01 ~]# curl -k -u candlepin_system_admin:admin  --request PUT https://candlepin1.devlab.phx1.redhat.com:443/candlepin/owners/1070642/subscriptions
{"id":"refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","state":"CREATED","startTime":null,"result":null,"finishTime":null,"statusPath":"/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","updated":"2010-10-18T15:54:18.468+0000","created":"2010-10-18T15:54:18.468+0000"}[root@jsefler-itclient01 ~]# 
[root@jsefler-itclient01 ~]# curl -k -u candlepin_system_admin:admin  --request GET https://candlepin1.devlab.phx1.redhat.com:443/candlepin/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369
{"id":"refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","state":"CREATED","startTime":"2010-10-18T15:54:18.000+0000","result":null,"finishTime":"2010-10-18T15:54:18.000+0000","statusPath":"/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","updated":"2010-10-18T15:54:18.000+0000","created":"2010-10-18T15:54:18.000+0000"}[root@jsefler-itclient01 ~]# curl -k -u candlepin_system_admin:admin  --request GET https://candlepin1.refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369
{"id":"refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","state":"CREATED","startTime":"2010-10-18T15:54:18.000+0000","result":null,"finishTime":"2010-10-18T15:54:18.000+0000","statusPath":"/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","updated":"2010-10-18T15:54:18.000+0000","created":"2010-10-18T15:54:18.000+0000"}[root@jsefler-itclient01 ~]# curl -k -u candlepin_system_admin:admin  --request GET https://candlepin1.refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369
{"id":"refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","state":"CREATED","startTime":"2010-10-18T15:54:18.000+0000","result":null,"finishTime":"2010-10-18T15:54:18.000+0000","statusPath":"/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","updated":"2010-10-18T15:54:18.000+0000","created":"2010-10-18T15:54:18.000+0000"}[root@jsefler-itclient01 ~]# curl -k -u candlepin_system_admin:admin  --request GET https://candlepin1.refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369
{"id":"refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","state":"FINISHED","startTime":"2010-10-18T15:57:26.000+0000","result":"Pools refreshed for owner 1070642","finishTime":"2010-10-18T15:57:28.000+0000","statusPath":"/jobs/refresh_pools_156a1535-b37d-42f8-bf2a-eabd48a1c369","updated":"2010-10-18T15:57:28.000+0000","created":"2010-10-18T15:54:18.000+0000"}[root@jsefler-itclient01 ~]# 


MOVING TO VERIFIED

Comment 7 John Sefler 2011-05-04 14:40:29 UTC
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING

Comment 8 Bryan Kearney 2018-12-10 15:36:59 UTC
I am closing out some old bugs from 2015. So, closing these out as current release. If this is still an issue for me, please reach out.