Project

General

Profile

Actions

Bug #30567

open

Taxonomies not handled properly with role for viewing host facts

Added by Ondřej Ezr over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1651699

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}}


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #30560: Taxonomies not handled properly with role for viewing host factsDuplicateActions
Actions #1

Updated by Tomer Brisker over 3 years ago

  • Has duplicate Bug #30560: Taxonomies not handled properly with role for viewing host facts added
Actions #2

Updated by Tomer Brisker over 3 years ago

  • Category set to Organizations and Locations
Actions

Also available in: Atom PDF