Bug 1127267
Summary: | Hostgroup provisioning does not support nested groups | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Nick Strugnell <nstrug> |
Component: | Provisioning | Assignee: | Dominic Cleal <dcleal> |
Status: | CLOSED ERRATA | QA Contact: | jcallaha |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.4 | CC: | bbuckingham, bkearney, cwelton, dcleal, ehelms, jcallaha, peter.vreman |
Target Milestone: | Unspecified | Keywords: | PrioBumpPM, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/6958 | ||
Whiteboard: | |||
Fixed In Version: | foreman-1.11.0.24-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 10:59:45 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: | 1122832 |
Description
Nick Strugnell
2014-08-06 13:50:25 UTC
Created redmine issue http://projects.theforeman.org/issues/6958 from this bug The following patches provides a workaround. - use the title - replace / with :: to workaround the route parsing. Using URL encoded 2F did not work as it was already decoded by the routing engine before it was matching against the rules patch -p0 -l -f << EOF --- /usr/share/foreman/app/controllers/unattended_controller.rb +++ /usr/share/foreman/app/controllers/unattended_controller.rb @@ -44,7 +44,7 @@ return head(:not_found) unless (params.has_key?("id") and params.has_key?(:hostgroup)) template = ConfigTemplate.find_by_name(params['id']) - @host = Hostgroup.find_by_name(params['hostgroup']) + @host = Hostgroup.find_by_title(params['hostgroup'].gsub('::','/')) return head(:not_found) unless template and @host EOF patch -p0 -l -f << EOF --- /usr/share/foreman/app/controllers/api/v2/config_templates_controller.rb +++ /usr/share/foreman/app/controllers/api/v2/config_templates_controller.rb @@ -97,7 +97,7 @@ module Api url_for :only_path => false, :action => :template, :controller => '/unattended', :protocol => protocol, :host => host, :port => port, - :id => template.name, :hostgroup => hostgroup.name + :id => template.name, :hostgroup => hostgroup.title.gsub('/','::') end def process_template_kind EOF patch -p0 -l -f << EOF --- /usr/share/foreman/app/controllers/config_templates_controller.rb +++ /usr/share/foreman/app/controllers/config_templates_controller.rb @@ -69,7 +69,7 @@ def default_template_url template, hostgroup url_for :only_path => false, :action => :template, :controller => '/unattended', - :id => template.name, :hostgroup => hostgroup.name + :id => template.name, :hostgroup => hostgroup.title.gsub('/','::') end def controller_permission EOF Moving to POST since upstream bug http://projects.theforeman.org/issues/6958 has been closed Verified in Satellite 6.2 beta Snap 21. Nested hostgroup provisioning is working as expected in the latest snap. No issues encountered during provisioning attempts. 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:1501 |