Bug 996871

Summary: RequestTimeout during attach_all_systems API call
Product: [Retired] Subscription Asset Manager Reporter: Vitaly Kuznetsov <vkuznets>
Component: candlepinAssignee: Carter Kozak <ckozak>
Status: CLOSED ERRATA QA Contact: Vitaly Kuznetsov <vkuznets>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, omaciel, sthirugn, tomckay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-01 11:18:54 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:
Bug Depends On:    
Bug Blocks: 833466    

Description Vitaly Kuznetsov 2013-08-14 08:17:01 UTC
Description of problem:
My setup has 1789 systems and I have manifest with 1915 subscriptions. I've uploaded manifest and tried running attach_all_systems (OrganizationAPI) API call:

  File "/usr/lib/python2.7/site-packages/katello/client/api/organization.py", line 58, in attach_all_systems
    return self.server.POST(path, "")[1]
  File "/usr/lib/python2.7/site-packages/katello/client/server.py", line 453, in POST
    return self._request('POST', path, body=body, multipart=multipart, custom_headers=custom_headers)
  File "/usr/lib/python2.7/site-packages/katello/client/server.py", line 249, in _request
    return self._process_response(connection.getresponse())
  File "/usr/lib/python2.7/site-packages/katello/client/server.py", line 307, in _process_response
    raise ServerRequestError(response.status, response_body, None)
ServerRequestError: (400, {u'displayMessage': u'Resources::Candlepin::Owner: Request Timeout  (POST /candlepin/owners/testorg383FF1/entitlements)', u'errors': [u'Resources::Candlepin::Owner: Request Timeout  (POST /candlepin/owners/testorg383FF1/entitlements)']}, None)

Version-Release number of selected component (if applicable):
# rpm -qa | grep -P 'candlepin|katello'
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
katello-configure-1.4.4-2.el6sat.noarch
katello-selinux-1.4.4-2.el6sat.noarch
katello-headpin-all-1.4.3-6.el6sam_splice.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.4.3-5.el6sat.noarch
katello-common-1.4.3-6.el6sam_splice.noarch
katello-headpin-1.4.3-6.el6sam_splice.noarch
candlepin-0.8.19-1.el6sam.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-scl-1-5.el6_4.noarch
katello-glue-elasticsearch-1.4.3-6.el6sam_splice.noarch
candlepin-selinux-0.8.19-1.el6sam.noarch
katello-glue-candlepin-1.4.3-6.el6sam_splice.noarch
candlepin-tomcat6-0.8.19-1.el6sam.noarch
signo-katello-0.0.10-2.el6sat.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3-5.el6sat.noarch


How reproducible:
Always

Steps to Reproduce:
1. Try running attach_all_systems for setup with several thousand of systems.
2.
3.

Actual results:
Traceback with timeout

Expected results:
Request takes long but succeed

Additional info:

Comment 2 Adam Price 2013-08-20 19:28:44 UTC
candlepin threw this request timeout, though i'm having trouble registering this many systems against an install to test/reproduce

Comment 4 Carter Kozak 2013-08-23 19:08:26 UTC
commit ea45d79bea35eb9780bba3dfa0dcc7c2ecfdbf2a
Author: ckozak <ckozak>
Date:   Thu Aug 22 16:56:10 2013 -0400

    Fix autoheal entire org

Comment 5 Bryan Kearney 2013-08-28 17:12:07 UTC
Lates build (Snap4) should contain these fixes. Please test on Snap4.

Comment 6 Vitaly Kuznetsov 2013-09-12 13:00:44 UTC
Verified with Snapshot5:
candlepin-0.8.25-1.el6sam.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.8.25-1.el6sam.noarch
candlepin-tomcat6-0.8.25-1.el6sam.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3-10.el6sat.noarch
katello-cli-common-1.4.3-10.el6sat.noarch
katello-common-1.4.3-12.el6sam_splice.noarch
katello-configure-1.4.4-4.el6sat.noarch
katello-glue-candlepin-1.4.3-12.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3-12.el6sam_splice.noarch
katello-headpin-1.4.3-12.el6sam_splice.noarch
katello-headpin-all-1.4.3-12.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch

Task run succeeded:
{u'task_owner_id': None, u'task_owner_type': None, u'task_type': u'monitor owner all_systems auto_attach', u'start_time': u'2013-09-12T12:47:53Z', u'uuid': u'5da132a1-aade-4a84-80b6-fd80c96a6bbb', u'parameters': {}, u'user_id': 1, u'finish_time': u'2013-09-12T12:53:45Z', u'created_at': u'2013-09-12T12:46:24Z', u'updated_at': u'2013-09-12T12:53:45Z', u'organization_id': 2, u'state': u'finished', u'result': u'heal_entire_org_126bb4af-9612-492a-88ca-aac2dbd97323', u'progress': None, u'pending?': False, u'id': 16}

Comment 9 errata-xmlrpc 2013-10-01 11:18:54 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.

http://rhn.redhat.com/errata/RHEA-2013-1390.html