Bug 1387599

Summary: Inconsistent host content_source field between UI and API
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: Content ManagementAssignee: Andrew Kofink <akofink>
Status: CLOSED ERRATA QA Contact: Brad Buckingham <bbuckingham>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: akofink, bbuckingham, jcallaha
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: 2018-02-21 16:59:40 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:
Bug Depends On:    
Bug Blocks: 1122832    
Attachments:
Description Flags
content source is in the UI visible none

Description Peter Vreman 2016-10-21 10:58:40 UTC
Description of problem:
When a host is registered with only Puppet there is a difference how the UI and the API provide the user feedback.
In the UI there is always a Content Source field shown.
The API does not return the content_source_id field when there is no content (and also no content_facet_attributes)

This is confusing for the end user. Why do i get a value in the UI, but when querying the API it is not available


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


How reproducible:


Steps to Reproduce:
1. Register a host with Puppet only
2. Query the hosts through the API
3. Edit the host in the UI

Actual results:
In step 2 there is no content_source_id *and content_source_name)
In step 3 the content source field is visible and populated


Expected results:
Consistent behaviour of the content source field. Either both visible in the API and UI or both shall be absent.

Additional info:

Comment 1 Peter Vreman 2016-10-21 10:59:20 UTC
Created attachment 1212790 [details]
content source is in the UI visible

Comment 2 Peter Vreman 2016-10-21 10:59:58 UTC
Query of the same host through the API does not retruen any 'content' fields

[crash] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hosts/li-lc-1442.hag.hilti.com  | jq . | egrep '(content_source|proxy_)'
  "puppet_ca_proxy_id": 1,
  "puppet_ca_proxy_name": "li-lc-1578.hag.hilti.com",
  "puppet_proxy_id": 1,
  "puppet_proxy_name": "li-lc-1578.hag.hilti.com",

Comment 4 Andrew Kofink 2016-12-12 19:23:27 UTC
Created redmine issue http://projects.theforeman.org/issues/17644 from this bug

Comment 5 Bryan Kearney 2016-12-12 21:17:25 UTC
Upstream bug component is Content Management

Comment 6 Satellite Program 2017-01-04 17:17:43 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17644 has been resolved.

Comment 10 Bryan Kearney 2018-02-21 16:59:40 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336