Bug 1651699

Summary: Taxonomies not handled properly with role for viewing host facts
Product: Red Hat Satellite Reporter: Perry Gagne <pgagne>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Radovan Drazny <rdrazny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: dhlavacd, kgaikwad, mhulan, nsamant, oezr
Target Milestone: UnspecifiedKeywords: 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: 2020-01-15 20:30:43 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 Perry Gagne 2018-11-20 15:42:20 UTC
Description of problem:
While verifying bz 1646755 we discovered another issue if the role has taxonomy (Organization and Location) filters set. See bug 1646755, comment 4 for more info 


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


How reproducible:


Steps to Reproduce:
1. Created Lifecycle Environments DEV (id=2), QA (id=3)
2. Created Hosts qa1 , dev1 
3. Created role 'integrationsrole' role as described in https://access.redhat.com/articles/3359731
4. Added filter to view host rule "lifecycle_environment = DEV"
5. Set Organization and location for integrationsrole to the same as dev1
6. Created apiuser with integrationsrole.
7. curl -s -u 'apiuser:redhat' -k https://$SATELLITE/api/v2/hosts/$dev1_id/facts

Actual results: Returned result is empty:
{
  "total": 0,
  "subtotal": 0,
  "page": 1,
  "per_page": 20,
  "search": " host = 2",
  "sort": {
    "by": null,
    "order": null
  },
  "results": {}
}

Expected results:
The facts for the host are returned. 


Additional info: If you remove the Org and location from integrationsrole, you get the following result, which I think is correct but am not sure why all those values are null:
{
  "total": 0,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": " host = 2",
  "sort": {
    "by": null,
    "order": null
  },
  "results": {"dev1.lab.eng.rdu2.redhat.com":{"net::interface::eth0::ipv6_address":null,"net::interface::eth0::ipv6_netmask":null,"cpu":null,"network":null,"dmi::bios":null,"distribution":null,"virt":null,"net":null,"dmi::system":null,"lscpu":null,"dmi::processor":null,"dmi::chassis":null,"proc_cpuinfo::common":null,"proc_cpuinfo":null,"dmi::memory":null,"dmi":null,"net::interface::eth0":null,"net::interface":null,"proc_stat":null,"system":null}}

Comment 5 Bryan Kearney 2019-12-03 16:34:54 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 6 Bryan Kearney 2020-01-15 20:30:43 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.

Comment 7 Ondřej Ezr 2020-08-05 09:30:57 UTC
Created redmine issue https://projects.theforeman.org/issues/30567 from this bug