Project

General

Profile

Actions

Bug #18557

closed

Image based provisioning broken

Added by Anonymous about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The error message is not really telling anything, but when using the "Resolve" button for Provisioning templates, the following can be seen:

2017-02-18T19:59:16 61fd0302 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"CBWPrxWc5vdlnGkLnRXBiXUKNrh7ZuMC+BJNFfxMIMu+j/uwK+403l0iWVLO+CDLig/K1GauLMvJdsWbc7Y18Q==", "host"=>{
"salt_module_ids"=>[""], "run_list"=>{"0"=>{"type"=>"role", "name"=>"default"}}, "override_chef_attributes"=>"true", "name"=>"cheri-traxler", "location_id"=>"1", "hostgroup_id"=>"", "compute
_resource_id"=>"5", "environment_id"=>"1", "puppet_proxy_id"=>"", "puppet_ca_proxy_id"=>"", "salt_proxy_id"=>"", "salt_environment_id"=>"", "ansible_role_ids"=>[""], "puppetclass_ids"=>[""],
 "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=
>"cheri-traxler", "domain_id"=>"1", "subnet_id"=>"1", "subnet6_id"=>"", "ip"=>"192.168.200.14", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0",
 "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"bridge", "bridge"=>"br0", "model"=>"virtio"}}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifi
er"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "subnet6_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "execution"=>"0", "virtual"=>"0", "tag"=>"", " 
attached_to"=>"", "compute_attributes"=>{"type"=>"bridge", "bridge"=>"br0", "model"=>"virtio"}}}, "compute_attributes"=>{"cpus"=>"2", "memory"=>"1073741824", "start"=>"1", "volumes_attribute
s"=>{"new_volumes"=>{"_delete"=>"", "pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"raw"}, "0"=>{"_delete"=>"", "pool_name"=>"default", "capacity"=>"10G", "all
ocation"=>"0G", "format_type"=>"qcow2"}}, "image_id"=>"/var/lib/libvirt/images/CentOS-7-x86_64-GenericCloud-1701.qcow2"}, "architecture_id"=>"1", "operatingsystem_id"=>"18", "provision_metho
d"=>"image", "build"=>"1", "medium_id"=>"", "ptable_id"=>"", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "o
verwrite"=>"false"}, "capabilities"=>"build image", "provider"=>"Libvirt", "fakepassword"=>"[FILTERED]", "bare_metal_capabilities"=>"build", "provisioning"=>"image"}
2017-02-18T19:59:16 61fd0302 [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:643:in `template_used'
 | /usr/share/foreman/vendor/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'

When reverting the commit for #16752, it works again.


Related issues 3 (0 open3 closed)

Related to Foreman - Refactor #16752: Extract template-related code from Host::ManagedClosedDaniel Lobato Garcia09/30/2016Actions
Related to Foreman - Bug #20374: Image templates don't resolve any more during host creationDuplicate07/21/2017Actions
Related to Foreman - Bug #20098: Cannot resolve user_data template with all kind of compute-resourceClosedDaniel Lobato Garcia06/23/2017Actions
Actions #1

Updated by Anonymous about 7 years ago

  • Related to Refactor #16752: Extract template-related code from Host::Managed added
Actions #2

Updated by Anonymous about 7 years ago

  • translation missing: en.field_release deleted (209)

In recent nightlies it's happening only when using the "resolve temnplates" button, building the host itself works.

Actions #3

Updated by Anonymous over 6 years ago

  • Related to Bug #20374: Image templates don't resolve any more during host creation added
Actions #4

Updated by Anonymous over 6 years ago

  • Related to Bug #20098: Cannot resolve user_data template with all kind of compute-resource added
Actions #5

Updated by Tomer Brisker over 6 years ago

Is this still present after 1.15.4 or is it a duplicate of #20098?

Actions #6

Updated by Tomer Brisker over 6 years ago

  • Status changed from New to Need more information
Actions #7

Updated by Anonymous over 6 years ago

  • Status changed from Need more information to Resolved

I can't reproduce with current nightlies.

Actions

Also available in: Atom PDF