Created attachment 1027787 [details] Output of foreman-debug from a Satellite 6.1 system on RHEL 6.6. Description of problem: An HTTP GET /katello/api/v2/systems/:id returns a hash of information about a system. The "organization_id" key is missing from this hash. Version-Release number of selected component (if applicable): Tested against Foreman 1.9.0-develop on RHEL 6.6 and 7.1, and Satellite 6.1.0 on RHEL 6.6. This bug manifests itself on the two foreman systems, but not the Satellite system. How reproducible: 100% Steps to Reproduce: 1. Issue an HTTP GET request to /katello/api/v2/systems/:id. 2. View the keys in the JSON response. Notice that 'organization_id' is missing. Actual results: [ u'activation_keys', u'autoheal', u'checkin_time', u'content_overrides', u'content_view', u'content_view_id', u'created', u'customInfo', u'description', u'distribution', u'entitlementStatus', u'environment', u'errata_counts', u'host', u'hostCollections', u'id', u'installedProducts', u'katello_agent_installed', u'katello_id', u'location', u'name', u'permissions', u'products', u'registered_by', u'release', u'release_ver', u'service_level', u'uuid', ] Expected results: Same as above, but with the 'organization_id' key. Additional info: The 'href' key is present in the response for downstream systems, but not upstream systems. The significance of this field is unknown. Attached are foreman-debug logs for both Foreman 1.9.0-develop and Satellite 6.1.0 on RHEL 6.6.
Created attachment 1027788 [details] Output of foreman-debug from a Foreman 1.9.0-develop system on RHEL 6.6.
Similar to these bugs: * https://bugzilla.redhat.com/show_bug.cgi?id=1158620 (verified) * https://bugzilla.redhat.com/show_bug.cgi?id=1202917 (new)
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
The /systems api is deprecated in favor of the /hosts api. Satellite 6.2 embraces this in a big way by adding content and subscription attributes to the /hosts api which already includes org information. Thus i will move this to MODIFIED to verify that /hosts returns organization attributes. The /systems api will not be updated to include it and may be removed very soon.
VERIFIED: # rpm -q foreman foreman-1.11.0.9-1.el7sat.noarch Steps: # curl -k -H "Content-Type: application/json" -X GET -u 'admin:changeme' https://dell-pem610-01.rhts.eng.bos.redhat.com/katello/api/v2/systems/{ "total":1, "subtotal":1, "page":1, "per_page":20, "error":null,"search":null, "sort":{"by":null,"order":null}, "results":[{"katello_id":1,"uuid":"4037cdc1-a682-46b6-8882-914bf74e04f9", "name":"sgi-xe270-01.rhts.eng.bos.redhat.com", "host_id":2, "location":"None", "content_view_id":2, "distribution":"Red Hat Enterprise Linux Server 7.1", "katello_agent_installed":false, "registered_by":"Anonymous Admin", "entitlementStatus":"valid", "autoheal":true, "release":null, "checkin_time":null, "created":"2016-04-01T12:56:43.956+0000", "installedProducts":[{"productId":"69","productName":"Red Hat Enterprise Linux Server","version":"7.1","arch":"x86_64","status":"green","startDate":"2014-06-06T04:00:00.000+0000","endDate":"2022-01-01T04:59:59.000+0000"}], "content_view":{"id":2,"name":"con_view","label":"con_view"}, "environment":{"library":true,"id":1,"name":"Library","label":"Library","description":null, "organization":{"name":"Default Organization","label":"Default_Organization","id":1},"created_at":"2016-04-01 09:58:31 UTC","updated_at":"2016-04-01 09:58:31 UTC","prior":null,"successor":null,"counts":{"content_hosts":1, "content_views":2, "packages":10944,"puppet_modules":1, "errata":{"security":442,"bugfix":1127,"enhancement":239,"total":1808}, "yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4},"permissions":{"view_lifecycle_environments":true, "edit_lifecycle_environments":true, "destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true}}, "activation_keys":[],"id":"4037cdc1-a682-46b6-8882-914bf74e04f9", "errata_counts":{"security":0,"bugfix":0,"enhancement":0,"total":0}}]} Organization id is displayed "id":1
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/RHBA-2016:1500