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 1387236

Summary: Templates Smart Proxy API does not pass Hostgroup provisioning - Satellite 6.2.z
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Provisioning TemplatesAssignee: Lukas Zapletal <lzap>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.2CC: bbuckingham, bkearney, jcallaha, mhulan, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/17045
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1403238 (view as bug list) Environment:
Last Closed: 2017-04-27 15:07:08 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1403238    

Description Lukas Zapletal 2016-10-20 12:21:07 UTC
Templates API does proxy all templates kinds, but it requires URL to be in this form:

/unattended/:kind

In case of hostgroup provisioning, URLs are different:

/unattended/template/XXX/YYY

[lzap@lzapx foreman]$ curl -3 -H "Accept:application/json" -H "Content-Type: application/json" -d '{}' -k -X GET http://localhost:8448/unattended/template
Failed to retrieve template template for {"splat"=>[], "captures"=>["template"], "kind"=>"template"}: Error retrieving template for {:url=>"http://192.168.122.1:8448"} from 127.0.0.1: Net::HTTPNotFound

[lzap@lzapx foreman]$ curl -3 -H "Accept:application/json" -H "Content-Type: application/json" -d '{}' -k -X GET http://localhost:8448/unattended/template/clonetest/test-machines-rhel68

Requested url was not found

Workaround: Configure Satellite for direct access (non-proxied mode).

Comment 1 Bryan Kearney 2016-10-20 14:17:45 UTC
Upstream bug assigned to lzap

Comment 2 Bryan Kearney 2016-10-20 14:17:47 UTC
Upstream bug component is Uncategorized

Comment 3 Bryan Kearney 2016-10-20 14:17:50 UTC
Upstream bug assigned to lzap

Comment 5 Bryan Kearney 2016-12-01 13:16:29 UTC
Upstream bug component is Uncategorized

Comment 6 Bryan Kearney 2016-12-07 13:16:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17045 has been resolved.

Comment 7 Lukas Zapletal 2016-12-09 13:20:07 UTC
Since this is 6.2 and 6.3 bug, I am cloning this one into 6.3 as well.

Comment 9 Mike McCune 2017-04-27 15:07:08 UTC
We are closing this as resolved in the next release as it is fixed in the upcoming rebase of 6.3