Bug 1667545

Summary: Multiple logins for single organization in virt-who causes reporting errors
Product: Red Hat Satellite Reporter: William Poteat <wpoteat>
Component: Subscriptions - virt-whoAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Perry Gagne <pgagne>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: bbuckingham, hshukla, jturel, khowell, ktordeur, wpinheir
Target Milestone: ReleasedKeywords: 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: Environment:
Last Closed: 2019-01-30 20:01:11 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:
Attachments:
Description Flags
warning tasks none

Description William Poteat 2019-01-18 18:52:18 UTC
Description of problem:

Reporting host/guest relationships in virt-who for a single organization using separate log-ins creates an error condition


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


How reproducible:


Steps to Reproduce:

https://bugzilla.redhat.com/show_bug.cgi?id=1603706#c28

Actual results:

See link

Expected results:

Correct reporting

Additional info:

Comment 8 Jonathon Turel 2019-01-22 19:40:19 UTC
Hey Waldirio, 

I'm looking for some more information that will ensure I'm addressing the issue properly from the Katello side. When I look at the related code I see that there is a task being run called "Actions::Candlepin::AsyncHypervisors" which polls Candlepin directly until a particular task is completed which in turn takes the response and calls ::Actions::Katello::Host::Hypervisors.parse_hypervisors where the stack trace arises from.

I would like to see the response from Candlepin and I don't think the result will be shown in the task logs. I think you can get the response from Candlepin in your reproducer environment this way:

1) Look at the Actions::Candlepin::AsyncHypervisors action being run by the hypervisor checkin
It should have an input with the candlepin task ID

2) Given $TASK_ID from (1) you can use `foreman-rake console` to run the following: ::Katello::Resources::Candlepin::Job.get($TASK_ID, result_data: true)

Knowing what is inside there will be a great help - please share it with me if you can.

Comment 11 Jonathon Turel 2019-01-24 16:39:07 UTC
Hi Waldirio - unfortunately the response data you've shown me is totally acceptable and won't reproduce the error. Can you put the machines back into the erroring state so I can investigate further? Thank you

Comment 13 Jonathon Turel 2019-01-28 16:07:00 UTC
Created attachment 1524283 [details]
warning tasks

Comment 14 Jonathon Turel 2019-01-28 16:09:11 UTC
Hi again,

The 'warning' tasks are old - I need to see some new ones coming in so that I can monitor the Candlepin responses in real-time because I suspect they are changing by the time we can see them (as above). Can you change the configuration so that the tasks are warning once again?

Comment 16 Jonathon Turel 2019-01-28 19:52:47 UTC
I was able to create some new tasks and upon investigating the Candlepin response I believe that this is a duplicate of another bug: https://bugzilla.redhat.com/show_bug.cgi?id=1637042

Some of the tasks were in WAITING state and as a result we continue with the action and the exception is raised. #1637042 addresses the issue. I made the change locally on your reproducer and I see that the tasks are now successful.

You can see what I did:

cd /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41
git diff

It looks like #1637042 is marked for a 6.4.z so I think this can be closed as a duplicate. Let me know if you agree Waldirio.

Comment 19 Barnaby Court 2019-01-30 20:01:11 UTC
Closing as dupe of 1637042 per comment 16

*** This bug has been marked as a duplicate of bug 1637042 ***