Project

General

Profile

Bug #10403

Smart Class Parameter Overrides using the FQDN fact as a match no longer applies the override

Added by Ryan Sabatini over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Parameters
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

In Foreman 1.8.0 when overriding a smart class parameter using FQDN as a matcher, the override is not applied, and the default value is still used.


Related issues

Related to Foreman - Bug #10420: Using Run Puppet button fails on Foreman 1.8.0Closed2015-05-07
Related to Foreman - Refactor #10425: Remove name/fqdn/shortname/hostname duplicationNew2015-05-08
Related to Foreman - Bug #10642: Migration of unmanaged host can fail on primary interfaceClosed2015-05-28

Associated revisions

Revision 377bb86d (diff)
Added by Dominic Cleal over 6 years ago

fixes #10403 - resync names of unmanaged hosts to their primary NIC

MoveHostNicsToInterfaces previously ignored unmanaged hosts, but they
need migrating too. Updated the existing migration to migrate both,
then for existing hosts, add a new migration to ensure all primary NIC
names are set from the host's name, and to add new NICs where they are
missing.

Revision 9aeefb71 (diff)
Added by Dominic Cleal over 6 years ago

fixes #10403 - resync names of unmanaged hosts to their primary NIC

MoveHostNicsToInterfaces previously ignored unmanaged hosts, but they
need migrating too. Updated the existing migration to migrate both,
then for existing hosts, add a new migration to ensure all primary NIC
names are set from the host's name, and to add new NICs where they are
missing.

(cherry picked from commit 377bb86d125709ec7033edc3eaf5db1293405ee7)

History

#1 Updated by Martin Jackson over 6 years ago

Is it possible this is related to http://projects.theforeman.org/issues/10307 ?

#2 Updated by Dominic Cleal over 6 years ago

  • Status changed from New to Need more information

Ryan, can you provide:

1. the value of :unattended in /etc/foreman/settings.yaml
2. how are you adding the override? By editing the smart class parameter or from the host form?
3. the logs from /var/log/foreman/production.log as you submit the form

#3 Updated by Martin Jackson over 6 years ago

1) unattended is set to true
2) We add the override via the smart class paramater form.
3) These values were all migrated from 1.7.1. Production.log from a new add:


Started PUT "/puppetclasses/287-activemq" for 172.19.222.134 at 2015-05-07 13:57:46 +0000
2015-05-07 13:57:46 [I] Processing by PuppetclassesController#update as HTML
2015-05-07 13:57:46 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"9Qyvau8XwybuIqZqRqnSBvT8ieaJgIYFQEuDEmDqu5c=", "puppetclass"=>{"hostgroup_ids"=>[""], "class_params_attributes"=>{"0"=>{"_destroy"=>"false", "key"=>"admin_password", "description"=>"", "override"=>"1", "key_type"=>"string", "default_value"=>"[FILTERED]", "use_puppet_default"=>"0", "required"=>"0", "validator_type"=>"", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1029"}, "1"=>{"_destroy"=>"false", "key"=>"admin_user", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1019"}, "2"=>{"_destroy"=>"false", "key"=>"broker_amqp_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1172"}, "3"=>{"_destroy"=>"false", "key"=>"broker_amqp_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1179"}, "4"=>{"_destroy"=>"false", "key"=>"broker_amqp_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1178"}, "5"=>{"_destroy"=>"false", "key"=>"broker_heap_percentage_usage", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1012"}, "6"=>{"_destroy"=>"false", "key"=>"broker_home", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1007"}, "7"=>{"_destroy"=>"false", "key"=>"broker_mqtt_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1165"}, "8"=>{"_destroy"=>"false", "key"=>"broker_mqtt_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1162"}, "9"=>{"_destroy"=>"false", "key"=>"broker_mqtt_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1177"}, "10"=>{"_destroy"=>"false", "key"=>"broker_network_nodes", "description"=>"", "override"=>"1", "key_type"=>"array", "default_value"=>"[FILTERED]", "use_puppet_default"=>"0", "required"=>"0", "validator_type"=>"", "merge_overrides"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1032"}, "11"=>{"_destroy"=>"false", "key"=>"broker_openwire_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1034"}, "12"=>{"_destroy"=>"false", "key"=>"broker_openwire_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1168"}, "13"=>{"_destroy"=>"false", "key"=>"broker_openwire_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1020"}, "14"=>{"_destroy"=>"false", "key"=>"broker_stomp_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1173"}, "15"=>{"_destroy"=>"false", "key"=>"broker_stomp_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1180"}, "16"=>{"_destroy"=>"false", "key"=>"broker_stomp_nio_ssl_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1033"}, "17"=>{"_destroy"=>"false", "key"=>"broker_stomp_nio_ssl_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1174"}, "18"=>{"_destroy"=>"false", "key"=>"broker_stomp_nio_ssl_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1164"}, "19"=>{"_destroy"=>"false", "key"=>"broker_stomp_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1176"}, "20"=>{"_destroy"=>"false", "key"=>"broker_store_usage", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1023"}, "21"=>{"_destroy"=>"false", "key"=>"broker_temp_usage", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1013"}, "22"=>{"_destroy"=>"false", "key"=>"broker_version", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1015"}, "23"=>{"_destroy"=>"false", "key"=>"broker_version_release", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1036"}, "24"=>{"_destroy"=>"false", "key"=>"broker_ws_enabled", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1166"}, "25"=>{"_destroy"=>"false", "key"=>"broker_ws_max_connections", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1171"}, "26"=>{"_destroy"=>"false", "key"=>"broker_ws_port", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1169"}, "27"=>{"_destroy"=>"false", "key"=>"java_heap", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1027"}, "28"=>{"_destroy"=>"false", "key"=>"java_home", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1028"}, "29"=>{"_destroy"=>"false", "key"=>"java_max_heap", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1009"}, "30"=>{"_destroy"=>"false", "key"=>"java_max_perm_size", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1010"}, "31"=>{"_destroy"=>"false", "key"=>"java_perm_size", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1014"}, "32"=>{"_destroy"=>"false", "key"=>"java_release", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1008"}, "33"=>{"_destroy"=>"false", "key"=>"java_version", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1016"}, "34"=>{"_destroy"=>"false", "key"=>"jks_directory", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1037"}, "35"=>{"_destroy"=>"false", "key"=>"jks_keystore", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1018"}, "36"=>{"_destroy"=>"false", "key"=>"jks_password", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1017"}, "37"=>{"_destroy"=>"false", "key"=>"jks_truststore", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1024"}, "38"=>{"_destroy"=>"false", "key"=>"mcollective_node", "description"=>"", "override"=>"1", "key_type"=>"boolean", "default_value"=>"[FILTERED]", "use_puppet_default"=>"0", "required"=>"0", "validator_type"=>"", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1288"}, "39"=>{"_destroy"=>"false", "key"=>"service_account_full_name", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1006"}, "40"=>{"_destroy"=>"false", "key"=>"service_account_group", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1021"}, "41"=>{"_destroy"=>"false", "key"=>"service_account_home", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1022"}, "42"=>{"_destroy"=>"false", "key"=>"service_account_max_files_hard", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1167"}, "43"=>{"_destroy"=>"false", "key"=>"service_account_max_files_soft", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1163"}, "44"=>{"_destroy"=>"false", "key"=>"service_account_max_threads_hard", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1175"}, "45"=>{"_destroy"=>"false", "key"=>"service_account_max_threads_soft", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1170"}, "46"=>{"_destroy"=>"false", "key"=>"service_account_name", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1025"}, "47"=>{"_destroy"=>"false", "key"=>"service_account_password", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1031"}, "48"=>{"_destroy"=>"false", "key"=>"system_password", "description"=>"", "override"=>"1", "key_type"=>"string", "default_value"=>"[FILTERED]", "use_puppet_default"=>"0", "required"=>"0", "validator_type"=>"", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1388"}, "49"=>{"_destroy"=>"false", "key"=>"system_user", "description"=>"", "override"=>"1", "key_type"=>"string", "default_value"=>"[FILTERED]", "use_puppet_default"=>"0", "required"=>"0", "validator_type"=>"", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1387"}, "50"=>{"_destroy"=>"false", "key"=>"users", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1011"}, "51"=>{"_destroy"=>"false", "key"=>"users_passwords", "description"=>"", "override"=>"0", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]", "id"=>"1030"}}, "lookup_keys_attributes"=>{"new_lookup_keys"=>{"_destroy"=>"false", "key"=>"", "description"=>"", "key_type"=>"string", "default_value"=>"[FILTERED]", "validator_type"=>"", "path"=>"fqdn\r\nhostgroup\r\nos\r\ndomain", "lookup_values_attributes"=>"[FILTERED]"}}}, "environment_filter"=>"", "commit"=>"Submit", "id"=>"287-activemq"}
2015-05-07 13:57:46 [I] Failed to save: Match fqdn=tstr00027.wal-mart.com does not match an existing host, Lookup values is invalid
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.6ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.6ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.8ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (31.8ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (20.1ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (19.3ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (19.1ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (19.5ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:46 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (158.0ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (172.7ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.6ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (21.0ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (20.1ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.8ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.8ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.1ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.2ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.7ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.0ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.2ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.8ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.2ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (18.8ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.8ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (174.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (20.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (20.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.7ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.6ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.6ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.1ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.0ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (19.2ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.2ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (21.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.6ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (175.7ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (20.3ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:47 [I]   Rendered lookup_keys/_fields.html.erb (20.1ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.7ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.8ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (20.1ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (18.9ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.1ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.5ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (21.9ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.4ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (22.1ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (3.3ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (19.1ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_value.html.erb (2.4ms)
2015-05-07 13:57:48 [I]   Rendered lookup_keys/_fields.html.erb (12.1ms)
2015-05-07 13:57:48 [I]   Rendered puppetclasses/_form.html.erb (1968.1ms)
2015-05-07 13:57:48 [I]   Rendered puppetclasses/edit.html.erb within layouts/application (1969.2ms)
2015-05-07 13:57:48 [I]   Rendered home/_user_dropdown.html.erb (1.9ms)
2015-05-07 13:57:48 [I] Read fragment views/tabs_and_title_records-2 (0.2ms)
2015-05-07 13:57:48 [I]   Rendered home/_topbar.html.erb (3.2ms)
2015-05-07 13:57:48 [I]   Rendered layouts/base.html.erb (6.3ms)
2015-05-07 13:57:48 [I] Completed 200 OK in 2110ms (Views: 1856.4ms | ActiveRecord: 155.6ms)

#4 Updated by Dominic Cleal over 6 years ago

Forgive the "obvious" question, but does the host "tstr00027.wal-mart.com" exist? Does it have that name, or multiple names etc?

Are you using orgs/locations, and if so, is it visible to the user making the change at that time?

#5 Updated by Dominic Cleal over 6 years ago

  • Status changed from Need more information to New
  • Legacy Backlogs Release (now unused) set to 50

I'm seeing this also on one of my local hosts, created ages ago on some old version of Foreman. It's an unmanaged host (same as Martin's), and the primary interface has no name or domain, so Host::Managed#fqdn is returning nil. This means the FQDN matcher doesn't work.

=> #<Host::Managed id: 82, name: "puppet.example.com", last_compile: "2014-09-24 07:07:50", last_freshcheck: nil, last_report: "2014-10-03 11:51:49", updated_at: "2014-12-08 09:22:14", source_file_id: nil, created_at: "2014-01-19 21:28:11", root_pass: "$1$...", serial: nil, puppet_status: 0, architecture_id: 1, operatingsystem_id: 7, environment_id: 1, ptable_id: nil, medium_id: nil, build: false, comment: "", disk: nil, installed_at: nil, model_id: 1, hostgroup_id: 5, owner_id: 24, owner_type: "User", enabled: true, puppet_ca_proxy_id: 7, managed: false, use_image: nil, image_file: nil, uuid: "ccf43a15-9b10-429b-ab4a-705789b78c07", compute_resource_id: 1, puppet_proxy_id: 7, certname: "puppet.example.com", image_id: nil, organization_id: nil, location_id: 3, type: "Host::Managed", compute_profile_id: nil, provision_method: "build", otp: nil, realm_id: nil, grub_pass: "$1$...">
> host.interfaces
=> [#<Nic::Managed id: 8, mac: "52:54:00:a1:95:3c", ip: nil, type: "Nic::Managed", name: nil, host_id: 82, subnet_id: nil, domain_id: nil, attrs: {"mtu"=>"1500"}, created_at: "2014-09-08 21:51:33", updated_at: "2014-09-12 07:12:56", provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth1", tag: "", attached_to: "", managed: false, mode: "balance-rr", attached_devices: "", bond_options: "", primary: false, provision: false, compute_attributes: {}>,
 #<Nic::Managed id: 9, mac: "52:54:00:62:1a:7c", ip: "192.168.30.10", type: "Nic::Managed", name: nil, host_id: 82, subnet_id: nil, domain_id: nil, attrs: {"mtu"=>"1500", "netmask"=>"255.255.255.0", "network"=>"192.168.30.0"}, created_at: "2014-09-17 09:36:21", updated_at: "2014-09-23 21:26:55", provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth1", tag: "", attached_to: "", managed: false, mode: "balance-rr", attached_devices: "", bond_options: "", primary: false, provision: false, compute_attributes: {}>,
 #<Nic::Managed id: nil, mac: nil, ip: nil, type: "Nic::Managed", name: nil, host_id: 82, subnet_id: nil, domain_id: nil, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: nil, tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {}>]

The fallback for "fqdn" described at http://projects.theforeman.org/issues/10307#note-3 would probably solve this equally.

I do wonder why the "fqdn" method is necessary or even used.

#6 Updated by Dominic Cleal over 6 years ago

Actually, to clarify, I'm not seeing the issue when saving the Puppet class, but the matchers aren't being applied in the ENC/YAML output and aren't showing up on the host form for this host. It is listed in the matcher list in the Puppet class form.

#7 Updated by Ryan Sabatini over 6 years ago

We tried the fallback for "fqdn" that Ohad provided in [[http://projects.theforeman.org/issues/10307#note-3]]. It unfortunately didn't work, but a few minor modifications allowed us to, once agian, match on the fqdn fact, and see the matchers being applied in the ENC/YAML. The patch we used is below:

/app/models/host/managed.rb

781   def lookup_value_match
782     fqdn = name || facts["fqdn"] || self.respond_to?(:fqdn)
783     "fqdn=#{fqdn}" 
784   end

#8 Updated by Ryan Sabatini over 6 years ago

  • Related to Bug #10420: Using Run Puppet button fails on Foreman 1.8.0 added

#9 Updated by Dominic Cleal over 6 years ago

Yeah, that patch isn't actually very correct, we probably need to reimplement 'fqdn' to point to name.

This seems to stem from the DB migration that skips unmanaged hosts. New hosts created on 1.8 through fact uploads are getting primary interfaces with domain_id and name, so fqdn resolves correctly, but existing unmanaged hosts from 1.7 never got their domain migrated to an interface: https://github.com/theforeman/foreman/blob/1.8.0/db/migrate/20140910153654_move_host_nics_to_interfaces.rb#L26

#10 Updated by Dominic Cleal over 6 years ago

  • Related to Refactor #10425: Remove name/fqdn/shortname/hostname duplication added

#11 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2363 added
  • Pull request deleted ()

#12 Updated by Dominic Cleal over 6 years ago

  • Assignee set to Dominic Cleal

#13 Updated by Dominic Cleal over 6 years ago

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

#14 Updated by Marek Hulán over 6 years ago

  • Related to Bug #10642: Migration of unmanaged host can fail on primary interface added

Also available in: Atom PDF