Bug #20098
closedCannot resolve user_data template with all kind of compute-resource
Description
This seems to be a problem with 1.15.0 and 1.15.1. I did a standard install on a new machine with everything local. When I try to create a new host, it is not able to resolve the user_data template. The following message appears in the log:
2017-06-20 11:13:20 2dd4694b [app] [I] Started POST "/hosts/template_used?provisioning=image" for 10.10.0.162 at 2017-
06-20 11:13:20 -0400
2017-06-20 11:13:20 2dd4694b [app] [I] Processing by HostsController#template_used as */*
2017-06-20 11:13:20 2dd4694b [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"yv2pKrr9/2HXyU5gypJHwgwYYTZp
5YlrJ28gry7wKAR23xX4ZGvGd6u19VrFuwfE8SkrAjO3IFsDc0s6l/V9qg==", "host"=>{"name"=>"kurt-benites", "hostgroup_id"=>"8", "
compute_resource_id"=>"6", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Ho
st::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "n
ame"=>"kurt-benites", "domain_id"=>"4", "subnet_id"=>"8", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provis
ion"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed",
"mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "prima
ry"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "compute_attributes"=>{"flavor_id"=>"m1.sm
all", "availability_zone"=>"", "subnet_id"=>"", "security_group_ids"=>[""], "managed_ip"=>"public", "image_id"=>"ami-1
3755605"}, "architecture_id"=>"4", "operatingsystem_id"=>"4", "provision_method"=>"image", "build"=>"1", "medium_id"=>
"", "pxe_loader"=>"", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"22-Users", "enabled"=>"1", "model_id"=>""
, "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"image key_pair", "provider"=>"EC2", "fakepassword"=>"[FILTERE
D]", "bare_metal_capabilities"=>"build", "provisioning"=>"image"}
2017-06-20 11:13:20 2dd4694b [app] [I] Current user: michaels (administrator)
2017-06-20 11:13:20 2dd4694b [app] [W] Action failed
| NoMethodError: undefined method `[]' for nil:NilClass
| /usr/share/foreman/app/models/concerns/hostext/operating_system.rb:42:in `template_kinds'
| /usr/share/foreman/app/models/concerns/hostext/operating_system.rb:25:in `available_template_kinds'
| /usr/share/foreman/app/controllers/hosts_controller.rb:649:in `template_used'
If I follow the exact same steps using version 1.14.x, everything works as expected. I have also upgrade another separate instance from 1.14 to 1.15, and it ends up with the same issue.
Updated by Emerik NICOLE about 7 years ago
- Subject changed from Cannot resolve user_data template with compute-resource-ec2 to Cannot resolve user_data template with compute-resource-vmware
- Category set to Compute resources
Issues present with compute-resource-vmware too. I think for all compute-resource.
Updated by Emerik NICOLE about 7 years ago
- Subject changed from Cannot resolve user_data template with compute-resource-vmware to Cannot resolve user_data template with all kind of compute-resource
Updated by Emerik NICOLE about 7 years ago
bug confirmed with compute-resource-vmware
Updated by Anonymous about 7 years ago
- Related to Bug #20374: Image templates don't resolve any more during host creation added
Updated by Daniel Lobato Garcia about 7 years ago
- Translation missing: en.field_release set to 287
Updated by Anonymous about 7 years ago
- Related to Bug #18557: Image based provisioning broken added
Updated by The Foreman Bot about 7 years ago
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Pull request https://github.com/theforeman/foreman/pull/4808 added
Updated by Ivan Necas about 7 years ago
- Status changed from Ready For Testing to Closed
Updated by The Foreman Bot about 7 years ago
- Pull request https://github.com/theforeman/foreman/pull/4827 added
Updated by Greg Sutcliffe about 7 years ago
- Has duplicate Bug #20941: Resolve Templates button broken for image-based provisioning added
Updated by Daniel Lobato Garcia almost 7 years ago
- Related to deleted (Bug #20374: Image templates don't resolve any more during host creation)
Updated by Daniel Lobato Garcia almost 7 years ago
- Has duplicate Bug #20374: Image templates don't resolve any more during host creation added