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 1538316 - Admin user cannot list or view hosts through API with a default organization set
Summary: Admin user cannot list or view hosts through API with a default organization set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-24 19:40 UTC by Eric Helms
Modified: 2019-08-12 14:02 UTC (History)
3 users (show)

Fixed In Version: foreman-1.15.6.34-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22359 0 None None None 2018-01-24 19:40:40 UTC

Description Eric Helms 2018-01-24 19:40:38 UTC
This issue currently blocks the Katello pipeline due to creating an Admin with a default organization.

Comment 1 Eric Helms 2018-01-24 19:40:42 UTC
Created from redmine issue http://projects.theforeman.org/issues/22359

Comment 2 Eric Helms 2018-01-24 19:40:47 UTC
Upstream bug assigned to ehelms

Comment 3 Eric Helms 2018-01-24 19:43:17 UTC
To reproduce this:

 1) Ensure the admin user has a default organization set in their profile
 2) Create a host with puppet (puppet agent -t)
 3) Ensure the created host does not have an organization set on it
 4) Try to view the host through hammer or the API:

hammer host info --id <host id>

curl -k https://admin:changeme@$(hostname)/api/hosts/<host_id>


This should result in a 404 without this patch.

Comment 5 Satellite Program 2018-01-25 21:07:42 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22359 has been resolved.

Comment 7 Jitendra Yejare 2018-02-16 09:34:02 UTC
Verified!

@ Satellite 6.3 snap 35

Steps:

1) The admin user has a default organization set in their profile
2) Created a host with puppet (puppet agent -t)
3) The created host does not have an organization set on it
4) Attempt to view the host from admin through hammer and API.


Observation:

1. No 404 error from both hammer and API end
2. The admin user successfully list and info puppet host


Changing the state of bug to Verified

Comment 8 Satellite Program 2018-02-21 16:54:17 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


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