Bug 1356916
| Summary: | Creating repositories simultanously results in null pointer exception in org.candlepin.model.AbstractHibernateCurator.delete | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Roman Plevka <rplevka> | ||||||
| Component: | Candlepin | Assignee: | Justin Sherrill <jsherril> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 6.2.0 | CC: | bbuckingham, bcourt, bkearney, hajek, jsherril, rplevka | ||||||
| Target Milestone: | Unspecified | Keywords: | Triaged | ||||||
| Target Release: | Unused | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1357118 (view as bug list) | Environment: | |||||||
| Last Closed: | 2018-02-21 16:54:17 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: | 1357118 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
Created attachment 1180081 [details]
candlepin.log
candlepin.log during the asynchronous repo create requests
Created attachment 1180082 [details]
production.log
foreman/production.log around the asynchronous repo create requests.
Upstream bug component is Candlepin Moving to POST since upstream bug http://projects.theforeman.org/issues/15482 has been closed The fix in Candlepin will make sure no Nullpointer exceptions will be returned, instead Candlepin will return 400 http code, which is the proper behavior from Candlepins side. Justin, do you think Kattello can be fixed to handle 400 in case of duplicitous demotions? VERIFIED
on sat6.3 snap3
candlepin-0.9.54.10-1.el7.noarch
katello-3.2.0-2.rc1.el7.noarch
no longer reproducible:
<pre>
# for i in {11..30}; do echo $i; bash -c "hammer --csv -u admin -p changeme repository create --organization-id 1 --product-id 1 --name foo-repo-${i} --content-type yum &"; done
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Message,Id,Name
Repository created,11,foo-repo-11
Message,Id,Name
Repository created,12,foo-repo-21
Message,Id,Name
Repository created,13,foo-repo-17
Message,Id,Name
Repository created,14,foo-repo-18
Message,Id,Name
Repository created,15,foo-repo-15
Message,Id,Name
Repository created,16,foo-repo-25
Message,Id,Name
Repository created,17,foo-repo-12
Message,Id,Name
Repository created,18,foo-repo-16
Message,Id,Name
Repository created,19,foo-repo-20
Message,Id,Name
Repository created,20,foo-repo-24
Message,Id,Name
Repository created,21,foo-repo-19
Message,Id,Name
Repository created,22,foo-repo-14
Message,Id,Name
Repository created,23,foo-repo-13
Message,Id,Name
Repository created,24,foo-repo-23
Message,Id,Name
Repository created,25,foo-repo-27
Message,Id,Name
Repository created,26,foo-repo-26
Message,Id,Name
Repository created,27,foo-repo-22
Message,Id,Name
Repository created,28,foo-repo-30
Message,Id,Name
Repository created,29,foo-repo-29
Message,Id,Name
Repository created,30,foo-repo-28
</pre>
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.
>
> https://access.redhat.com/errata/RHSA-2018:0336
|
Description of problem: Triggering multiple `repository create` requests asynchronously leads to Katello::Errors::CandlepinError: Runtime Error null at org.candlepin.model.AbstractHibernateCurator.delete:326 Task stays in PAUSED:ERROR state and is able to be resumed (and eventually finishes successfully) Version-Release number of selected component (if applicable): 6.2.0 snap20.1 How reproducible: often even with 3 simultaneous requests Steps to Reproduce: 1. create a product 2. # note teh ampersand at the end of the command - this ensures asynchronous execution of the command throughout the loop for i in {1..10}; do echo $i; bash -c "hammer --csv -u admin -p changeme repository create --organization-id 1 --product-id ${PROD_ID} --name foo-repo-${i} --content-type yum &"; done Actual results: # Message,Id,Name Repository created,1,foo-repo-1 Could not create the repository: Task 54f2d332-889e-46de-bab5-9001b212eb99: Katello::Errors::CandlepinError: Runtime Error null at org.candlepin.model.AbstractHibernateCurator.delete:326 Message,Id,Name Repository created,4,foo-repo-4 ... Expected results: all repos create successfully, the tasks don't conflict Additional info: The null pointer exception in Candlepin has been already addressed in https://bugzilla.redhat.com/show_bug.cgi?id=1345765 (they won't backport the fix). However the issue is in katello sending invalid requests to CP