Bug #15742
openOS image field disabled during host creation, causing finish template error
Description
Using EC2, Foreman doesn't resolve the OS templates on the first try. After completely configuring the host, both 'Resolve' and the main 'submit' error out: "Sorry but no templates were configured." and "Unable to save
No finish templates were found for this host, make sure you define at least one in your Ubuntu 14.04 settings"
If it is submitted again, with no changes(*), it will resolve correctly and build the host. (The 'resolve' button also works immediately after the error.)
(* No changes except redoing the lost network config, since it resets the interface subnet/etc when submit is clicked.)
Initial submit:
2016-07-19T17:28:19 [app] [I] Completed 201 Created in 176ms (Views: 4.3ms | ActiveRecord: 68.2ms)
2016-07-19T17:28:19 [app] [I] Started GET "/" for 38.140.146.178 at 2016-07-19 17:28:19 +0000
2016-07-19T17:28:19 [app] [I] Processing by DashboardController#index as HTML
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_status_links.html.erb (4.2ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_status_widget.html.erb (5.4ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_status_links.html.erb (2.3ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_status_chart_widget.html.erb (3.7ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_reports_widget.html.erb (18.2ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/_distribution_widget.html.erb (24.5ms)
2016-07-19T17:28:20 [app] [I] Rendered dashboard/index.html.erb within layouts/application (1076.1ms)
2016-07-19T17:28:20 [app] [I] Rendered common/_searchbar.html.erb (7.3ms)
2016-07-19T17:28:20 [app] [I] Rendered layouts/_application_content.html.erb (8.9ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_user_dropdown.html.erb (5.6ms)
2016-07-19T17:28:20 [app] [I] Read fragment views/tabs_and_title_records-8 (0.1ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_location_dropdown.html.erb (5.9ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_org_switcher.html.erb (7.0ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_submenu.html.erb (3.0ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_submenu.html.erb (1.5ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_submenu.html.erb (1.2ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_submenu.html.erb (1.1ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_submenu.html.erb (1.6ms)
2016-07-19T17:28:20 [app] [I] Write fragment views/tabs_and_title_records-8 (0.7ms)
2016-07-19T17:28:20 [app] [I] Rendered home/_topbar.html.erb (80.6ms)
2016-07-19T17:28:20 [app] [I] Rendered layouts/base.html.erb (83.0ms)
2016-07-19T17:28:20 [app] [I] Completed 200 OK in 1346ms (Views: 1144.6ms | ActiveRecord: 61.3ms)
2016-07-19T17:28:20 [app] [I] Started POST "/hosts" for 38.140.146.178 at 2016-07-19 17:28:20 +0000
2016-07-19T17:28:20 [app] [I] Processing by HostsController#create as */*
2016-07-19T17:28:20 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"3f3wgh/NwWugGXsrSIxa5HpBL2Iqy6uiHLlJ3+XtEhAPxhvlilg0UxhL6GM/8hXdv3Y4YGLxZpl/pq+V61WccA==", "host"=>{"name"=>"our-puppet-test-s03", "location_id"=>"1", "hostgroup_id"=>"", "compute_resource_id"=>"5", "compute_profile_id"=>"1", "environment_id"=>"6", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "realm_id"=>"", "config_group_ids"=>["", "2", "5"], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"our-puppet-test-s03", "domain_id"=>"3", "subnet_id"=>"1", "ip"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "compute_attributes"=>{"flavor_id"=>"t2.small", "availability_zone"=>"", "subnet_id"=>"subnet-12345", "security_group_ids"=>[""], "managed_ip"=>"private"}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"image", "build"=>"1", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"8-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"image", "provider"=>"EC2", "bare_metal_capabilities"=>"build"}
2016-07-19T17:28:20 [app] [I] Failed to save: No finish templates were found for this host, make sure you define at least one in your Ubuntu 14.04 settings
2016-07-19T17:28:20 [app] [I] Rendered hosts/_progress.html.erb (0.6ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (34.2ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (5.9ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (3.2ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (3.0ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (1.4ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (1.7ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (1.7ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (2.6ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_group.html.erb (1.4ms)
2016-07-19T17:28:21 [app] [I] Rendered config_groups/_config_groups_selection.html.erb (81.7ms)
2016-07-19T17:28:21 [app] [I] Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
2016-07-19T17:28:21 [app] [I] Rendered puppetclasses/_classes_in_groups.html.erb (3.2ms)
2016-07-19T17:28:21 [app] [I] Rendered puppetclasses/_classes.html.erb (357.7ms)
2016-07-19T17:28:21 [app] [I] Rendered puppetclasses/_class_selection.html.erb (465.9ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_base_form.html.erb (29.2ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_virtual_form.html.erb (1.9ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_provider_specific_form.html.erb (0.7ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/manageds/_managed.html.erb (39.6ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_base_form.html.erb (15.4ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_virtual_form.html.erb (0.9ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/_provider_specific_form.html.erb (0.2ms)
2016-07-19T17:28:21 [app] [I] Rendered nic/manageds/_managed.html.erb (20.5ms)
2016-07-19T17:28:21 [app] [I] Rendered hosts/_interfaces.html.erb (66.3ms)
2016-07-19T17:28:23 [app] [I] Rendered compute_resources_vms/form/ec2/_base.html.erb (909.0ms)
2016-07-19T17:28:23 [app] [I] Rendered compute_resources_vms/form/_volumes.html.erb (0.8ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/_compute_detail.html.erb (914.0ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/_compute.html.erb (1596.5ms)
2016-07-19T17:28:23 [app] [I] Rendered common/os_selection/_architecture.html.erb (16.7ms)
2016-07-19T17:28:23 [app] [I] Rendered common/os_selection/_operatingsystem.html.erb (61.7ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/provision_method/build/_form.html.erb (65.8ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/provision_method/image/_form.html.erb (0.5ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/_operating_system.html.erb (94.3ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/_unattended.html.erb (1694.0ms)
2016-07-19T17:28:23 [app] [I] Rendered puppetclasses/_class_parameters.html.erb (158.5ms)
2016-07-19T17:28:23 [app] [I] Rendered puppetclasses/_classes_parameters.html.erb (176.6ms)
2016-07-19T17:28:23 [app] [I] Rendered common_parameters/_inherited_parameters.html.erb (14.8ms)
2016-07-19T17:28:23 [app] [I] Rendered common_parameters/_parameter.html.erb (2.3ms)
2016-07-19T17:28:23 [app] [I] Rendered common_parameters/_parameters.html.erb (14.1ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/_form.html.erb (2565.5ms)
2016-07-19T17:28:23 [app] [I] Rendered hosts/new.html.erb within layouts/application (2567.5ms)
2016-07-19T17:28:23 [app] [I] Rendered layouts/_application_content.html.erb (1.0ms)
2016-07-19T17:28:23 [app] [I] Rendered home/_user_dropdown.html.erb (2.1ms)
2016-07-19T17:28:23 [app] [I] Read fragment views/tabs_and_title_records-8 (0.1ms)
2016-07-19T17:28:23 [app] [I] Rendered home/_topbar.html.erb (5.3ms)
2016-07-19T17:28:23 [app] [I] Rendered layouts/base.html.erb (236.7ms)
2016-07-19T17:28:23 [app] [I] Completed 200 OK in 3258ms (Views: 2696.8ms | ActiveRecord: 173.7ms)
After that, clicking resolve works:
Templates resolved for this operating system
User data template Template Our Combined Userdata
Files