Project

General

Profile

Bug #15223

Resolving templates to provision a discovered host fails

Added by Esa Varemo about 7 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

How to reproduce:

1. Hosts -> Discovered hosts -> provision a host.
2. Fill in information
3. Click 'Provisioning templates: Resolve'

Result:
Message: Sorry but no templates were configured.

production.log:

2016-05-29 13:45:35 [app] [I] Started POST "/hosts/template_used?id=47?provisioning=build" for 192.168.0.8 at 2016-05-29 13:45:35 +0300
2016-05-29 13:45:35 [app] [I] Processing by HostsController#template_used as */*
2016-05-29 13:45:35 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"6Sgh5Wb3Q3/wnVgmUSlcnF5ZEnXVRSX/xKL6Nr6ny3s=", "host"=>{"name"=>"mac525400445167", "hostgroup_id"=>"2", "environment_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"52:54:00:44:51:67", "identifier"=>"eth0", "name"=>"mac525400445167", "domain_id"=>"1", "subnet_id"=>"", "ip"=>"192.168.5.143", "managed"=>"1", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"784"}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"1", "operatingsystem_id"=>"6", "build"=>"1", "medium_id"=>"8", "ptable_id"=>"53", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "fakepassword"=>"[FILTERED]", "bare_metal_capabilities"=>"build", "id"=>"47?provisioning=build"}
2016-05-29 13:45:35 [app] [D] Setting current user thread-local variable to esa
2016-05-29 13:45:35 [app] [D] Setting current organization thread-local variable to Koti
2016-05-29 13:45:35 [app] [D] not found: Couldn't find Host::Managed with 'id'=47?provisioning=build [WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" IN (1)]
2016-05-29 13:45:35 [app] [I]   Rendered common/404.html.erb within layouts/application (4.6ms)
2016-05-29 13:45:35 [app] [I]   Rendered layouts/_application_content.html.erb (1.0ms)
2016-05-29 13:45:35 [app] [I]   Rendered layouts/base.html.erb (3.5ms)
2016-05-29 13:45:35 [app] [I] Completed 404 Not Found in 50ms (Views: 13.5ms | ActiveRecord: 5.7ms)


Related issues

Related to Foreman - Bug #15363: Resolving OS templates for new host raises routing error from invalid URIClosed2016-06-09
Related to Discovery - Bug #15548: Cant resolve templates - Sorry but no templates were configuredClosed2016-06-30

Associated revisions

Revision ad2ee956 (diff)
Added by Ohad Levy about 7 years ago

fixes #15223 - query parameters are now correct.

before this patch, there were two query
parameters (/hosts/template_used?id=47?provisioning=build).
since the view always prepand the hosts ID parameter, it is safe
to assume the URL always contain a leading parameter (e.g.
/hosts/template_used?id=47).

Revision dc951257 (diff)
Added by Ohad Levy almost 7 years ago

fixes #15223 - query parameters are now correct.

before this patch, there were two query
parameters (/hosts/template_used?id=47?provisioning=build).
since the view always prepand the hosts ID parameter, it is safe
to assume the URL always contain a leading parameter (e.g.
/hosts/template_used?id=47).

(cherry picked from commit ad2ee95611dcc2dcd6a1163b95a6e4e12b0394b3)

History

#1 Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ohad Levy
  • Pull request https://github.com/theforeman/foreman/pull/3555 added

#2 Updated by Ohad Levy about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal about 7 years ago

  • Category set to Host creation
  • Legacy Backlogs Release (now unused) set to 159

#4 Updated by Dominic Cleal almost 7 years ago

  • Related to Bug #15363: Resolving OS templates for new host raises routing error from invalid URI added

#5 Updated by Dominic Cleal almost 7 years ago

  • Legacy Backlogs Release (now unused) changed from 159 to 160

#6 Updated by Dominic Cleal almost 7 years ago

  • Legacy Backlogs Release (now unused) changed from 160 to 136

Already in RC1.

#7 Updated by Dominic Cleal almost 7 years ago

  • Legacy Backlogs Release (now unused) changed from 136 to 159

Regression fixed, moving back to original release.

#8 Updated by Dave Johnston almost 7 years ago

  • Related to Bug #15548: Cant resolve templates - Sorry but no templates were configured added

Also available in: Atom PDF