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 1538316

Summary: Admin user cannot list or view hosts through API with a default organization set
Product: Red Hat Satellite Reporter: Eric Helms <ehelms>
Component: ProvisioningAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, inecas, jyejare
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.6.34-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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