Bug #11143
closedDomain removed from the hostname on host edit in !unattended mode
Description
By adding from classes is the domain from the host lost.
We added to the host one classes and after submit the domain from the host.
Before: host.domain.com
After the classe was added: host
Version 1.8.2
Files
Updated by Dominic Cleal over 9 years ago
- Category changed from foreman-debug to Host creation
- Priority changed from Immediate to Normal
- Difficulty deleted (
hard)
Domain is usually stored underneath the primary interface rather than staying in the name field, so check under the Network tab on the primary interface and see if domain remains set. You should though see the FQDN in the host list and host info pages, but just the short hostname in the "Name" field of the edit form.
If that isn't the case, please attach /var/log/foreman/production.log to this ticket from the period when you submit the form.
If you have "unattended" set to false in /etc/foreman/settings.yaml then it might be you're seeing some different behaviour?
Updated by Sven Milinski over 9 years ago
Hey Dominic,
i have the same "problem"(?!)... We have thousands of nodes... and its very random...
we found the FQDN in the primary interface tab... but if we change the value foreman raise an error - Host not found... of course... he want to save the new settings under the new FQDN, but the host name is still under the old name...
We fixed this problem in the Database... :-S - but this issue still exists and return from time to time...
Can you reproduce why the domain disappearing after puppet-run or adding a class in the host ?
Thanks for your support - looking forward to your answer...
Bye
Updated by John Schmidt over 9 years ago
tail -f /var/log/foreman/production.log | grep -i 'cache02.shop.live' Started GET "/hosts/cache02.shop.live/edit" for 10.43.64.153 at 2015-07-17 15:17:48 +0200 2015-07-17 15:17:48 [I] Parameters: {"id"=>"cache02.shop.live"} Started PUT "/hosts/cache02.shop.live" for 10.43.64.153 at 2015-07-17 15:17:59 +0200 2015-07-17 15:17:59 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"43PYRcHwMaoUVxHz/wnT5xILcnIYQ9WTmbVE5vPP0BI=", "host"=>{"name"=>"cache02.shop.live.mesa.domain.com", "hostgroup_id"=>"26", "environment_id"=>"16", "puppet_ca_proxy_id"=>"11", "puppet_proxy_id"=>"", "config_group_ids"=>[""], "puppetclass_ids"=>["", "1361", "1697"], "managed"=>"1", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"", "name"=>"cache02.shop.live.mesa.domain.com", "ip"=>"", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"4038"}, "1"=>{"_destroy"=>"0", "mac"=>"00:50:56:1f:26:ea", "identifier"=>"eth0", "name"=>"", "ip"=>"172.26.140.248", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4040"}, "2"=>{"_destroy"=>"0", "mac"=>"00:50:56:05:e6:ee", "identifier"=>"eth1", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4041"}, "3"=>{"_destroy"=>"0", "mac"=>"00:50:56:17:95:de", "identifier"=>"eth2", "name"=>"", "ip"=>"172.26.148.51", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4042"}, "4"=>{"_destroy"=>"0", "mac"=>"00:50:56:30:b1:75", "identifier"=>"eth3", "name"=>"", "ip"=>"172.26.128.39", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4043"}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "id"=>"cache02.shop.live"} 2015-07-17 15:17:59 [I] Redirected to http://puppetweb01.local.de.net.com/hosts/cache02.shop.live.mesa.domain.com Started GET "/hosts/cache02.shop.live.mesa.domain.com" for 10.43.64.153 at 2015-07-17 15:17:59 +0200 2015-07-17 15:17:59 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/overview" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/templates" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/nics" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/runtime?range=7" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/resources?range=7" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 2015-07-17 15:18:00 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:00 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:00 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:00 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:00 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/edit" for 10.43.64.153 at 2015-07-17 15:18:00 +0200 2015-07-17 15:18:00 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/edit" for 10.43.64.153 at 2015-07-17 15:18:11 +0200 2015-07-17 15:18:11 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started PUT "/hosts/cache02.shop.live.mesa.domain.com" for 10.43.64.153 at 2015-07-17 15:18:24 +0200 2015-07-17 15:18:24 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"43PYRcHwMaoUVxHz/wnT5xILcnIYQ9WTmbVE5vPP0BI=", "host"=>{"name"=>"cache02.shop.live.mesa.domain.com", "hostgroup_id"=>"26", "environment_id"=>"16", "puppet_ca_proxy_id"=>"11", "puppet_proxy_id"=>"", "config_group_ids"=>[""], "puppetclass_ids"=>["", "1697"], "managed"=>"1", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"", "name"=>"cache02.shop.live", "ip"=>"", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"4038"}, "1"=>{"_destroy"=>"0", "mac"=>"00:50:56:1f:26:ea", "identifier"=>"eth0", "name"=>"", "ip"=>"172.26.140.248", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4040"}, "2"=>{"_destroy"=>"0", "mac"=>"00:50:56:05:e6:ee", "identifier"=>"eth1", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4041"}, "3"=>{"_destroy"=>"0", "mac"=>"00:50:56:17:95:de", "identifier"=>"eth2", "name"=>"", "ip"=>"172.26.148.51", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4042"}, "4"=>{"_destroy"=>"0", "mac"=>"00:50:56:30:b1:75", "identifier"=>"eth3", "name"=>"", "ip"=>"172.26.128.39", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4043"}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:25 [I] Redirected to http://puppetweb01.local.de.net.com/hosts/cache02.shop.live Started GET "/hosts/cache02.shop.live" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 2015-07-17 15:18:25 [I] Parameters: {"id"=>"cache02.shop.live"} Started GET "/hosts/cache02.shop.live/overview" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 Started GET "/hosts/cache02.shop.live/templates" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 Started GET "/hosts/cache02.shop.live/nics" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 Started GET "/hosts/cache02.shop.live/runtime?range=7" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 Started GET "/hosts/cache02.shop.live/resources?range=7" for 10.43.64.153 at 2015-07-17 15:18:25 +0200 2015-07-17 15:18:25 [I] Parameters: {"id"=>"cache02.shop.live"} 2015-07-17 15:18:25 [I] Parameters: {"id"=>"cache02.shop.live"} 2015-07-17 15:18:25 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live"} 2015-07-17 15:18:25 [I] Parameters: {"id"=>"cache02.shop.live"} 2015-07-17 15:18:25 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/edit" for 10.43.64.153 at 2015-07-17 15:18:26 +0200 2015-07-17 15:18:26 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live/edit" for 10.43.64.153 at 2015-07-17 15:18:33 +0200 2015-07-17 15:18:33 [I] Parameters: {"id"=>"cache02.shop.live"} Started PUT "/hosts/cache02.shop.live" for 10.43.64.153 at 2015-07-17 15:18:43 +0200 2015-07-17 15:18:43 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"43PYRcHwMaoUVxHz/wnT5xILcnIYQ9WTmbVE5vPP0BI=", "host"=>{"name"=>"cache02.shop.live.mesa.domain.com", "hostgroup_id"=>"26", "environment_id"=>"16", "puppet_ca_proxy_id"=>"11", "puppet_proxy_id"=>"", "config_group_ids"=>[""], "puppetclass_ids"=>["", "1697"], "managed"=>"1", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"", "name"=>"cache02.shop.live.mesa.domain.com", "ip"=>"", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"4038"}, "1"=>{"_destroy"=>"0", "mac"=>"00:50:56:1f:26:ea", "identifier"=>"eth0", "name"=>"", "ip"=>"172.26.140.248", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4040"}, "2"=>{"_destroy"=>"0", "mac"=>"00:50:56:05:e6:ee", "identifier"=>"eth1", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4041"}, "3"=>{"_destroy"=>"0", "mac"=>"00:50:56:17:95:de", "identifier"=>"eth2", "name"=>"", "ip"=>"172.26.148.51", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4042"}, "4"=>{"_destroy"=>"0", "mac"=>"00:50:56:30:b1:75", "identifier"=>"eth3", "name"=>"", "ip"=>"172.26.128.39", "primary"=>"0", "provision"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"4043"}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "ip"=>"", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"1", "comment"=>"", "overwrite"=>"false"}, "id"=>"cache02.shop.live"} 2015-07-17 15:18:44 [I] Redirected to http://puppetweb01.local.de.net.com/hosts/cache02.shop.live.mesa.domain.com Started GET "/hosts/cache02.shop.live.mesa.domain.com" for 10.43.64.153 at 2015-07-17 15:18:44 +0200 2015-07-17 15:18:44 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/overview" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/templates" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/nics" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 2015-07-17 15:18:45 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/runtime?range=7" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 Started GET "/hosts/cache02.shop.live.mesa.domain.com/resources?range=7" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 2015-07-17 15:18:45 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:45 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:45 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live.mesa.domain.com"} 2015-07-17 15:18:45 [I] Parameters: {"range"=>"7", "id"=>"cache02.shop.live.mesa.domain.com"} Started GET "/hosts/cache02.shop.live.mesa.domain.com/edit" for 10.43.64.153 at 2015-07-17 15:18:45 +0200 2015-07-17 15:18:45 [I] Parameters: {"id"=>"cache02.shop.live.mesa.domain.com"}
Updated by Dominic Cleal over 9 years ago
What's the value of unattended in settings.yaml?
Updated by John Schmidt over 9 years ago
Dominic Cleal wrote:
What's the value of unattended in settings.yaml?
:unattended: false :puppetconfdir: /etc/puppet/puppet.conf :login: true :require_ssl: false :locations_enabled: false :organizations_enabled: false
Updated by Dominic Cleal over 9 years ago
- Related to Feature #10260: Allow interfaces management for unmanaged hosts added
Updated by Dominic Cleal over 9 years ago
- Subject changed from By adding from classes is the domain from the host deleted to Domain removed from the hostname on host edit in !unattended mode
- Translation missing: en.field_release set to 62
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release deleted (
62)
Updated by Sven Milinski about 9 years ago
Hello,
any updates here ? Currently we are not able to manage hosts in our production platforms, because every time we edit some parameters under the hosts - Foreman is removing the domain from the FQDN and the puppet agent isn't able to find the host...
Thats pretty annoying for us ! Would be great if somebody can tell ous a workaround or a fix...
Thanks
Updated by Marek Hulán over 7 years ago
- Status changed from New to Feedback
I'm unable to reproduce on Foreman 1.11 (I don't have older instance). I believe that name synchronization was improved since 1.8. If you still experience this issue with recent version, please let us know.