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 1626056

Summary: In Satellite CLI and UI , hammer fact list | grep "hostname" | grep distribution does not shows distribution::version and distribution of host while in the host the distribution version can be seen.
Product: Red Hat Satellite Reporter: Vikas Wariyal <vwariyal>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Cole Higgins <chiggins>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.1CC: mhulan, oprazak, vwariyal
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-02 12:32:47 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
In the Satellite GUI we cannot see the distribution version of the host.
none
host distribution fact
none
+link none

Description Vikas Wariyal 2018-09-06 13:22:05 UTC
Created attachment 1481305 [details]
In the Satellite GUI we cannot see the distribution version of the host.

Description of problem:

In the registered host while running the below command 
#subscription-manager facts | grep distribution , we can see the distribution.version but while running in satellite the below command 
#hammer fact list | grep "hostname" | grep distribution , does not shows the distribution::version and distribution of host.


Version-Release number of selected component (if applicable): 6.3.1 , 6.3.2 , 6.3.3


How reproducible: Always


Steps to Reproduce:

1. run command #subscription-manager facts | grep distribution , in the registered host.
2. run command #hammer fact list | grep "hostname" | grep distribution , in the satellite and compare the both output.The distribution version of host shows as null in the satellite.
3. Go to Monitor->> Facts ->> Host ->> Distribution ->> distribution::version value is null but ::id and ::name can be seen

Actual results:
 
The customer cannot see the distribution version of host on satellite through CLI and UI.

Registered Host:
[root@host ~]# subscription-manager facts | grep distribution
distribution.id: Maipo
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 7.5
distribution.version.modifier: ga

Satellite:
[root@satellite ~]# hammer fact list |  grep host.example.com | grep distribution  
host.example.com      | distribution::version                         |                                                                                 
host.example.com      | distribution                                  |                                                                                 
host.example.com      | distribution::version::modifier               | ga                                                                              
host.example.com      | distribution::id                              | Maipo                                                                           
host.example.com      | distribution::name                            | Red Hat Enterprise Linux Server                                                 

Expected results:

The customer wants to see the distribution::version on UI of satellite and through CLI in both satellite and host.

Additional info:

The customer is facing issue on satellite 6.3.1 and i can see the same on 6.3.2 and 6.3.3 as well on both CLI and UI.

Comment 3 Marek Hulan 2018-09-19 06:24:06 UTC
Your way of listing facts is very inefficient and can't reliably work. Hammer only list 1000 facts (one page) unless you change --per-page setting. Chances are, the fact your're searching for just didn't make it to the first page.

Your command tries to list *all* facts in Satellite and then grepping for specific host and then grepping for specific fact. You should use search filtering that happens on Satellite side and return the filtered result.

Try this

hammer fact list --search "host = evan-karle.example.com and name ~ distribution"

Of course, change the hostname with the host you're interested in. For more details about search syntax, please see the product documentation.

If that does not work, could you please check that the fact is there via UI?

Comment 5 Ondřej Pražák 2018-09-25 12:09:09 UTC
Created attachment 1486730 [details]
host distribution fact

Seems to be working correctly on 6.4 for me, could QE verify?

Comment 7 Marek Hulan 2018-09-26 07:01:15 UTC
Vikas, in your case the distrubution fact in UI is a compose fact. You can tell by the + icon next to it. What do you see when you click on it? Note that it's origin is subscription manager, we were referring to facts that come from puppet agent or ansible run. Did you run any of these on this host.example.com?

Comment 8 Vikas Wariyal 2018-09-26 11:35:01 UTC
Created attachment 1487200 [details]
+link

Comment 9 Vikas Wariyal 2018-09-26 11:36:41 UTC
Marek

Updated with the snap after clicking on the + tab Distribution version.

Comment 10 Marek Hulan 2018-09-26 15:51:41 UTC
It seems you simply don't have any other fact for the version than what you see. Looking at output of subscription-manager facts, I see

distribution.version: 7.5
distribution.version.modifier: ga


it might depend on order in which the facts are imported, the nested value overrides the distribution.version. Perhaps we could blacklist modifier fact in RhsmFactImporter that lives in Katello codebase https://github.com/Katello/katello/blob/abbff485b07e94f8dd1dc1caeff4fc23f4e1b356/app/models/katello/rhsm_fact_importer.rb

Moving over to subscription mangement as this is specific to subscription manager facts processing. If you use other sources, such as puppet's facter or ansible, you'd find the information.

Devs: the core of the issue is that our facts are either composes (hashes) or final values. Subscription manager reports version as final value (7.5 in example above) as well as it nests more keys under the same fact (compose containing modifier as the key).

Comment 11 Bryan Kearney 2020-03-04 14:08:11 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 12 Bryan Kearney 2020-04-02 12:32:47 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.