Bug 1653018 - Resource has no errors on organization create
Summary: Resource has no errors on organization create
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: Released
Assignee: Barnaby Court
QA Contact: Roman Plevka
Depends On:
TreeView+ depends on / blocked
Reported: 2018-11-24 14:50 UTC by Roman Plevka
Modified: 2019-10-07 17:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-03-07 19:14:55 UTC
Target Upstream Version:

Attachments (Terms of Use)
bug.log (22.24 KB, text/plain)
2018-11-24 14:50 UTC, Roman Plevka
no flags Details
foreman-debug (1.65 MB, application/x-xz)
2018-11-24 14:51 UTC, Roman Plevka
no flags Details

Description Roman Plevka 2018-11-24 14:50:07 UTC
Description of problem:
ran some test involving creating an org + uploading a subscription manifest in a loop and on of the iterations failed at create organization step:

received ISE:
2018-11-24T14:00:55 [W|app|7b49f] Action failed
RuntimeError: resource have no errors
/usr/share/foreman/app/controllers/api/base_controller.rb:139:in `process_resource_error'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/app/controllers/katello/api/v2/organizations_controller.rb:83:in `rescue in create'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/app/controllers/katello/api/v2/organizations_controller.rb:77:in `create'
[the rest of the traceback is attached as bug.log]

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

How reproducible:

Steps to Reproduce:
i just ran the org create + manifest upload in a loop
it was a clean satellite (upgraded from snap4)

Comment 1 Roman Plevka 2018-11-24 14:50:53 UTC
Created attachment 1508372 [details]

Comment 2 Roman Plevka 2018-11-24 14:51:21 UTC
Created attachment 1508373 [details]

Comment 3 Roman Plevka 2018-11-24 14:56:26 UTC
the whole task got stuck in running state, waiting on candlepin:

9: Actions::Candlepin::Environment::Create (running) [ 0.00s / 0.00s ]

organization_label: Fbtyra
cp_id: 340ced4020b420d26fe6464cae8453ee
name: Library
session_id: 7b49f1cc-f920-41ee-99cb-7d83f0b4c354
remote_user: admin
remote_cp_user: admin
current_user_id: 4

however i doubt this actually got dispatched to candlepin.
the candlepin.log only shows the Owner create request (wit response status=200)

and then 2
Request: verb=GET, uri=/candlepin/owners/Fbtyra
requests (with response status=200)

Comment 5 Marek Hulan 2018-12-03 12:51:37 UTC
Based on logs this happens in Katello - Candlepin communication. Looking at the trace, most likely Candlepin didn't respond with 200. The error message in production.log seems to be masking the real error message. Roman if you have the reproducer, I could help adjust the code so that we'd see the  real error message. Sadly I don't see anything in candlepin logs. Perhaps someone bit deeper knowledge of candlepin would find out more.

Comment 6 Barnaby Court 2018-12-03 19:26:06 UTC
There were no errors in candlepin logs at that timestamp. If katello/foreman was specifying the correlation ID or logging the request id that comes back from Candlepin we could match the direct request. 

Without a reproducer I have no way to investigate further.

Comment 7 Chris Snyder 2019-01-10 15:10:25 UTC

Without additional information we cannot make progress on this issue.

Comment 10 Barnaby Court 2019-03-07 19:14:55 UTC
Closing as insufficient information as it has been waiting on needinfo for 2 months.

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