Problem:
Unable to provision bare metal server using Host Groups with “Customize Host” option.
We are able to provision VMs in this manner. After running various tests, we found that we were able to use the quick provision option to successfully provision. In that case, the Host Group works.
Also, if we use the “Customize Host” option, and select all the settings manually without the Host Group, we provision successfully.
We’re seeing this when we try to use the “Customize Host” interface with a Host Group:
not found: Couldn’t find Host::Managed with ‘id’=51 [WHERE “hosts”.“type” IN (‘Host::Managed’) AND “hosts”.“organization_id” = $1]
Expected outcome:
Provison bare metal servers using Customize Host options.
Foreman and Proxy versions:
1.20.2
Foreman and Proxy plugin versions:
bastion 6.1.16
foreman-tasks 0.14.3
foreman_chef 0.8.1
foreman_discovery 14.0.1
foreman_docker 4.1.0
foreman_remote_excecution 1.6.7
katello 3.10.0
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
2019-07-01T10:48:08 [I|app|d3592] Parameters: {"utf8"=>"✓", "authenticity_token"=>"qvjbWzDwIlhpTvbv9B0zQYTGDVgEmeTkljYEi5vcIwOXKzFBl91A8NtFJ9DTfRq2S+hehl5t/xF5pP01Nu5ycg==", "host"=>{"override_chef_attributes"=>"true", "name"=>"discoverytestd01a", "hostgroup_id"=>"31", "content_facet_attributes"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"13", "content_source_id"=>"8", "kickstart_repository_id"=>"74"}, "environment_id"=>"", "chef_proxy_id"=>"1", "chef_environment_id"=>"5", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"00:fd:45:50:70:31", "identifier"=>"eno1", "name"=>"discoverytestd01a", "domain_id"=>"3", "subnet_id"=>"79", "ip"=>"172.26.58.1", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"61"}, "1"=>{"_destroy"=>"0", "mac"=>"00:fd:45:50:70:32", "identifier"=>"eno1d1", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"0", "primary"=>"0", "provision"=>"0", "execution"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"62"}, "2"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"ipmi", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"0", "primary"=>"0", "provision"=>"0", "execution"=>"0", "username"=>"", "password"=>"[FILTERED]", "provider"=>"IPMI", "id"=>"63"}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "build"=>"1", "medium_id"=>"", "ptable_id"=>"138", "pxe_loader"=>"Grub2 UEFI", "disk"=>"", "root_pass"=>"[FILTERED]", "host_parameters_attributes"=>{"1561996064492"=>{"name"=>"tla", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false"}}, "is_owned_by"=>"1-Usergroups", "enabled"=>"1", "model_id"=>"2", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"synced_content", "fakepassword"=>"[FILTERED]", "id"=>"51"}
2019-07-01T10:48:08 [I|app|d3592] Current user set to timbrooks (admin)
2019-07-01T10:48:08 [D|app|d3592] Current location set to none
2019-07-01T10:48:08 [D|app|d3592] Current organization set to carfax
2019-07-01T10:48:09 [D|app|d3592] not found: Couldn't find Host::Managed with 'id'=51 [WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = $1]
2019-07-01T10:48:09 [I|app|d3592] Rendering common/404.html.erb within layouts/application
2019-07-01T10:48:09 [I|app|d3592] Rendered common/404.html.erb within layouts/application (4.5ms)
2019-07-01T10:48:09 [I|app|d3592] Rendered layouts/_application_content.html.erb (1.8ms)
2019-07-01T10:48:09 [I|app|d3592] Rendering layouts/base.html.erb
2019-07-01T10:48:09 [I|app|d3592] Rendered layouts/base.html.erb (4.7ms)
2019-07-01T10:48:09 [I|app|d3592] Completed 404 Not Found in 44ms (Views: 20.3ms | ActiveRecord: 5.1ms)