Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2017533

Summary: API call to generate applicability does not return task info
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: Hosts - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: jturel
Target Milestone: UnspecifiedKeywords: Regression, 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: 2022-02-16 16:47:38 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:

Description Stephen Wadeley 2021-10-26 18:23:15 UTC
Description of problem:

Making HTTP PUT to hosts/:id/errata/applicability endpoint fails to return task info


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


How reproducible:
Every time


Steps to Reproduce:
1. Set up a Content Host
2. Install RPM which requires errata
3. Make HTTP PUT to hosts/:id/errata/applicability

Actual results:
Received HTTP 202 response:   []

Expected results:
As in Sat6.9.7:

HTTP 202 response:   {"id":"3d54aefa-6df2-4333-b01e-b802b294b36e","label":"Actions::Katello::Host::GenerateApplicability","pending":true,"action":"Generate applicability","username":"admin","started_at":"2021-10-26 18:13:21 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"services_checked":["pulp","pulp_auth"],"host_ids":[5],"use_queue":false,"current_request_id":null,"current_timezone":"UTC","current_user_id":4,"current_organization_id":null,"current_location_id":null},"output":{},"humanized":{"action":"Generate applicability","input":"","output":"","errors":[]},"cli_example":null,"start_at":"2021-10-26 18:13:21 UTC","available_actions":{"cancellable":false,"resumable":false}}


Additional info:
Found by test automation

https://github.com/SatelliteQE/robottelo/blob/89da04d68ca9a242dd5184edbb5228d0597d9d78/tests/foreman/longrun/test_inc_updates.py#L151

Comment 1 Stephen Wadeley 2022-01-03 19:20:36 UTC
Hello

Can engineering please confirm:

There is no more Foremen task "Actions::Katello::Host::GenerateApplicability" to search for.

Does that mean errata applicability is now faster as it is not a Foreman task?

Is there any way QE's automated testing can be sure a GenerateApplicability request has been completed. not just received?

Thank you

Comment 2 Jonathon Turel 2022-01-18 16:59:02 UTC
Hi Stephen,

I'm guessing it should definitely be faster now that it's not a part of the tasking system. And that's why there really isn't anything to show in the result. The request places a message on an internal queue where it will be processed pretty much instantly. I'd recommend having test cases that assert the observable outcomes:
- Does the errata you are expecting show up as applicable after recalculation?
- Does installing the applicable result in it no longer being shown as applicable?

It could be useful to store a timestamp of when the last errata applicability calculation was completed for a given host to give some more traceability. I'd run that idea by Justin to check if something like that doesn't already exist, but I'm not aware of something like it.

Comment 3 Stephen Wadeley 2022-01-18 18:04:14 UTC
Thank you Jonathon for comment 2

Comment 4 Stephen Wadeley 2022-02-16 10:10:23 UTC
Hello

As per Ian Ballou's suggestion, I changed the test[1] mentioned in comment 1 to check that a Actions::Katello::Applicability::Hosts::BulkGenerate task had recently completed.

Thank you

[1] https://github.com/SatelliteQE/robottelo/blob/82b106ea94556211f55f4ab2e20ce3fe42e30feb/tests/foreman/longrun/test_inc_updates.py#L156

Comment 5 Jonathon Turel 2022-02-16 16:47:25 UTC
Thanks Stephen! I'm closing this as NOTABUG in that case