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 1645057 - host_collection controller does not return host_ids key inside a POST response
Summary: host_collection controller does not return host_ids key inside a POST response
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Host Collections
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.5.0
Assignee: satellite6-bugs
QA Contact: Roman Plevka
URL:
Whiteboard:
: 1654383 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-01 10:39 UTC by Roman Plevka
Modified: 2019-11-05 22:36 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-3.9.1-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:38:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25420 0 Normal Closed host_collection controller does not return host_ids key inside a POST response 2020-06-10 12:09:51 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:38:43 UTC

Description Roman Plevka 2018-11-01 10:39:17 UTC
Description of problem:
this is a regression from 6.4

$ curl -sku admin:changeme -H "Content-Type: application/json" -d '{"name": "foo4", "organization_id": 3}' https://$(hostname)/katello/api/v2/host_collections
{
 "name":"foo4",
 "organization_id":3,
 "max_hosts":null,
 "description":null,
 "total_hosts":0,
 "unlimited_hosts":true,
 "created_at":"2018-11-01 10:36:31 UTC",
 "updated_at":"2018-11-01 10:36:31 UTC",
 "id":6,
 "permissions":{
  "deletable":true,
  "editable":true
 }
}


Version-Release number of selected component (if applicable):
# rpm -qa katello
katello-3.9.0-0.1.rc1.el7sat.noarch

satellite6.5.0-1

Steps to Reproduce:
1. create host_collection using api (POST to katello/api/v2/host_collections)
2. observe the returned json

Actual results:
no host_ids key

Expected results:
host_id key should be returned even with an empty list

Additional info:

Comment 2 Christine Fouant 2018-11-08 17:58:17 UTC
Created redmine issue https://projects.theforeman.org/issues/25420 from this bug

Comment 3 Satellite Program 2018-11-08 19:06:08 UTC
Upstream bug assigned to cfouant

Comment 4 Satellite Program 2018-11-08 19:06:11 UTC
Upstream bug assigned to cfouant

Comment 5 Satellite Program 2018-11-09 15:06:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25420 has been resolved.

Comment 7 Brad Buckingham 2018-11-29 13:56:20 UTC
*** Bug 1654383 has been marked as a duplicate of this bug. ***

Comment 8 Roman Plevka 2018-12-10 14:04:22 UTC
VERIFIED 


# curl -sku admin:changeme -H "Content-Type: application/json" -d '{"name": "foo4", "organization_id": 3}' https://$(hostname)/katello/api/v2/host_collections
  {"host_ids":[],"name":"foo4","organization_id":3,"max_hosts":null,"description":null,"total_hosts":0,"unlimited_hosts":true,"created_at":"2018-12-10 14:02:59 UTC","updated_at":"2018-12-10 14:02:59 UTC","id":1,"permissions":{"deletable":true,"editable":true}}

# rpm -qa | grep satellite
satellite-6.5.0-5.beta.el7sat.noarch

Comment 12 errata-xmlrpc 2019-05-14 12:38:32 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-2019:1222


Note You need to log in before you can comment on or make changes to this bug.