Project

General

Profile

Actions

Bug #4381

closed

Foreman-proxy doesn't update dns after hostname change

Added by Alejandro Falcon almost 11 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
DNS
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Foreman version: foreman-1.4.0-1.el6.noarch
Proxy version: foreman-proxy-1.4.0-1.el6.noarch

I have foreman proxy setup to manage dns and dhcp successfully.

Steps to reproduce:
- edit host, change hostname
- submit, message appear: DNS PTR record exist...ACK
- overwrite.

After this the hostname will be changed on foreman and dhcp but no update will be done on DNS. Even foreman proxy logs won't show any nsupdate for the new hostname.

Note: Creating new hosts work fine.

Actions #1

Updated by Dominic Cleal almost 11 years ago

  • Translation missing: en.field_release deleted (2)
Actions #2

Updated by Martin Matuška almost 11 years ago

A similar issue happens if you try to change the IP address of an already existing host. You are asked to override but no DNS records are updated.

Actions #3

Updated by Alejandro Falcon almost 11 years ago

When there is no previous PTR created the change goes well.

Actions #4

Updated by Anonymous almost 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Anonymous
Actions #5

Updated by Anonymous almost 11 years ago

  • Target version set to 1.9.1
Actions #6

Updated by Anonymous over 10 years ago

  • Status changed from Assigned to Need more information

Cannot reproduce the issue -- A and PTR records are being created and updated correctly. Can you verify that dns updates have been configured correctly? Specifically: domain has been associated with the correct proxy in foreman. That you can execute 'nsupdate' command using foreman key?

Actions #7

Updated by Alejandro Falcon over 10 years ago

I have my DNS settings fine I believe because I don't have any problems while creating new hosts. Just to double check I did the following:

1- created a new host with name blablabla1.<my.dom>

grep nsupdate on proxy logs:
D, [2014-02-24T15:09:50.689488 #12053] DEBUG -- : running /usr/bin/nsupdate k /etc/foreman-proxy/rndc.key
D, [2014-02-24T15:09:50.719122 #12053] DEBUG -
: nsupdate: executed - server <my.dns.server>
D, [2014-02-24T15:09:50.722598 #12053] DEBUG -- : nsupdate: executed - update add blablabla1.<my.dom>. 86400 A 192.168.30.100
D, [2014-02-24T15:09:51.364531 #12053] DEBUG -- : running /usr/bin/nsupdate k /etc/foreman-proxy/rndc.key
D, [2014-02-24T15:09:51.378562 #12053] DEBUG -
: nsupdate: executed - server <my.dns.server>
D, [2014-02-24T15:09:51.381603 #12053] DEBUG -- : nsupdate: executed - update add 100.30.168.192.in-addr.arpa. 86400 IN PTR blablabla1.<my.dom>

2- pinged blablabla1.<my.dom> and name was resolved.
3- Edited blablabla1 to blablabla2 and when submitted the ack popped then override and dhcp was updated but not dns the old record persist and the new one was not created. Also grep returns nothing.

Actions #8

Updated by Anonymous over 10 years ago

  • Target version changed from 1.9.1 to 1.9.0
Actions #9

Updated by Dominic Cleal over 10 years ago

  • Status changed from Need more information to Assigned
Actions #10

Updated by Anonymous over 10 years ago

  • Status changed from Assigned to Ready For Testing
Actions #11

Updated by Lukas Zapletal over 10 years ago

I am unable to reproduce this, all my edits are just fine.

Started PUT "/hosts/rename2.virtual.lan" for 192.168.100.1 at 2014-03-13 13:54:49 +0100
Processing by HostsController#update as */*
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"kkkkk/3c=", "host"=>{"name"=>"rename3", "hostgroup_id"=>"3", "environment_id"=>"1", "puppet_ca_proxy_id"=>"", "puppet_proxy_id"=>"", "puppetclass_ids"=>[""], "managed"=>"t", "progress_report_id"=>"[FILTERED]", "mac"=>"cf:74:ff:2f:8a:07", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.100.13", "interfaces_attributes"=>{"new_interfaces"=>{"_destroy"=>"false", "type"=>"Nic::Managed", "mac"=>"", "name"=>"", "domain_id"=>"", "ip"=>"", "provider"=>"IPMI"}}, "architecture_id"=>"1", "operatingsystem_id"=>"7", "provision_method"=>"build", "medium_id"=>"9", "ptable_id"=>"9", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "id"=>"rename2.virtual.lan"}
Delete DHCP reservation for rename2.virtual.lan-cf:74:ff:2f:8a:07/192.168.100.13

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:54:50.555274 #28347] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2014-03-13T13:54:50.579228 #28347] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2014-03-13T13:54:50.586836 #28347] DEBUG -- : Loading subnets for 127.0.0.1
D, [2014-03-13T13:54:50.587059 #28347] DEBUG -- : Added 192.168.100.0/255.255.255.0 to 127.0.0.1
D, [2014-03-13T13:54:50.587478 #28347] DEBUG -- : Loading subnet data for 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.602072 #28347] DEBUG -- : Added rename.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07) to 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.602937 #28347] DEBUG -- : Added nodebuilder.virtual.lan (192.168.100.11 / 52:54:00:29:a6:b3) to 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.603873 #28347] DEBUG -- : Added rename2.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07) to 192.168.100.0/255.255.255.0
I, [2014-03-13T13:54:50.648838 #28347]  INFO -- : Enumerated hosts on 192.168.100.0
D, [2014-03-13T13:54:50.648929 #28347] DEBUG -- : Lazy loaded 192.168.100.0/255.255.255.0 records
D, [2014-03-13T13:54:50.673928 #28347] DEBUG -- : omshell: executed - set hardware-address = cf:74:ff:2f:8a:07
D, [2014-03-13T13:54:50.674101 #28347] DEBUG -- : true
D, [2014-03-13T13:54:50.674265 #28347] DEBUG -- : omshell: executed - open
D, [2014-03-13T13:54:50.674519 #28347] DEBUG -- : true
D, [2014-03-13T13:54:50.675591 #28347] DEBUG -- : omshell: executed - remove
D, [2014-03-13T13:54:50.675738 #28347] DEBUG -- : true
I, [2014-03-13T13:54:50.830268 #28347]  INFO -- : Removed DHCP reservation for rename2.virtual.lan => rename2.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07)

==> /var/log/foreman/production.log <==
Create DHCP reservation for rename3.virtual.lan-cf:74:ff:2f:8a:07/192.168.100.13

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:54:50.955509 #28347] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2014-03-13T13:54:50.955831 #28347] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2014-03-13T13:54:50.956044 #28347] DEBUG -- : Loading subnets for 127.0.0.1
D, [2014-03-13T13:54:50.956252 #28347] DEBUG -- : Added 192.168.100.0/255.255.255.0 to 127.0.0.1
D, [2014-03-13T13:54:50.956825 #28347] DEBUG -- : Loading subnet data for 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.962141 #28347] DEBUG -- : Added rename.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07) to 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.962932 #28347] DEBUG -- : Added nodebuilder.virtual.lan (192.168.100.11 / 52:54:00:29:a6:b3) to 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:50.963806 #28347] DEBUG -- : Added rename2.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07) to 192.168.100.0/255.255.255.0
I, [2014-03-13T13:54:51.053827 #28347]  INFO -- : Enumerated hosts on 192.168.100.0
D, [2014-03-13T13:54:51.053953 #28347] DEBUG -- : Lazy loaded 192.168.100.0/255.255.255.0 records
D, [2014-03-13T13:54:51.054078 #28347] DEBUG -- : Added rename3.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07) to 192.168.100.0/255.255.255.0
D, [2014-03-13T13:54:51.055280 #28347] DEBUG -- : omshell: executed - set name = "rename3.virtual.lan" 
D, [2014-03-13T13:54:51.055410 #28347] DEBUG -- : true
D, [2014-03-13T13:54:51.055514 #28347] DEBUG -- : omshell: executed - set ip-address = 192.168.100.13
D, [2014-03-13T13:54:51.056412 #28347] DEBUG -- : true
D, [2014-03-13T13:54:51.056507 #28347] DEBUG -- : omshell: executed - set hardware-address = cf:74:ff:2f:8a:07
D, [2014-03-13T13:54:51.056571 #28347] DEBUG -- : true
D, [2014-03-13T13:54:51.056694 #28347] DEBUG -- : omshell: executed - set hardware-type = 1
D, [2014-03-13T13:54:51.056764 #28347] DEBUG -- : true
D, [2014-03-13T13:54:51.056946 #28347] DEBUG -- : omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = c0:a8:64:02; option host-name = \"rename3.virtual.lan\";" 
D, [2014-03-13T13:54:51.057013 #28347] DEBUG -- : true
D, [2014-03-13T13:54:51.057093 #28347] DEBUG -- : omshell: executed - create
D, [2014-03-13T13:54:51.057153 #28347] DEBUG -- : true
I, [2014-03-13T13:54:51.089235 #28347]  INFO -- : Added DHCP reservation for rename3.virtual.lan (192.168.100.13 / cf:74:ff:2f:8a:07)

==> /var/log/foreman/production.log <==
Delete the DNS A record for rename2.virtual.lan/192.168.100.13

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:54:51.176975 #28347] DEBUG -- : running /usr/bin/nsupdate -k /etc/rndc.key 
D, [2014-03-13T13:54:51.179575 #28347] DEBUG -- : nsupdate: executed - server 127.0.0.1
D, [2014-03-13T13:54:51.216333 #28347] DEBUG -- : nsupdate: executed - update delete rename2.virtual.lan A

==> /var/log/foreman/production.log <==

Started GET "/tasks/66a19e7e-3a6e-4238-b775-ccd7179450b1" for 192.168.100.1 at 2014-03-13 13:54:51 +0100
Delete the DNS PTR record for 192.168.100.13/rename2.virtual.lan

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:54:55.687989 #28347] DEBUG -- : running /usr/bin/nsupdate -k /etc/rndc.key 
D, [2014-03-13T13:54:55.743730 #28347] DEBUG -- : nsupdate: executed - server 127.0.0.1
D, [2014-03-13T13:54:55.744003 #28347] DEBUG -- : nsupdate: executed - update delete 13.100.168.192.in-addr.arpa PTR

==> /var/log/foreman/production.log <==
Add DNS A record for rename3.virtual.lan/192.168.100.13

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:54:59.202866 #28347] DEBUG -- : running /usr/bin/nsupdate -k /etc/rndc.key 
D, [2014-03-13T13:54:59.212164 #28347] DEBUG -- : nsupdate: executed - server 127.0.0.1
D, [2014-03-13T13:54:59.400273 #28347] DEBUG -- : nsupdate: executed - update add rename3.virtual.lan.  86400 A 192.168.100.13

==> /var/log/foreman/production.log <==
Add DNS PTR record for 192.168.100.13/rename3.virtual.lan

==> /var/log/foreman-proxy/proxy.log <==
D, [2014-03-13T13:55:00.989980 #28347] DEBUG -- : running /usr/bin/nsupdate -k /etc/rndc.key 
D, [2014-03-13T13:55:00.992570 #28347] DEBUG -- : nsupdate: executed - server 127.0.0.1
D, [2014-03-13T13:55:00.995125 #28347] DEBUG -- : nsupdate: executed - update add 13.100.168.192.in-addr.arpa.  86400 IN PTR rename3.virtual.lan

==> /var/log/foreman/production.log <==
Redirected to https://foreman.virtual.lan/hosts/rename3.virtual.lan
Completed 302 Found in 14005ms (ActiveRecord: 862.5ms)

Started GET "/hosts/rename3.virtual.lan" for 192.168.100.1 at 2014-03-13 13:55:05 +0100
Processing by HostsController#show as */*
  Parameters: {"id"=>"rename3.virtual.lan"}
  Rendered hosts/_overview.html.erb (160.6ms)
  Rendered hosts/show.html.erb within layouts/application (865.4ms)
  Rendered home/_user_dropdown.html.erb (129.3ms)
Read fragment views/tabs_and_title_records-1 (25.8ms)
  Rendered home/_topbar.html.erb (156.0ms)
  Rendered layouts/base.html.erb (157.9ms)
Completed 200 OK in 1399ms (Views: 593.4ms | ActiveRecord: 651.5ms)
Processing by TasksController#show as */*
  Parameters: {"id"=>"66a19e7e-3a6e-4238-b775-ccd7179450b1"}
  Rendered tasks/_list.html.erb (125.0ms)
Completed 200 OK in 617ms (Views: 314.2ms | ActiveRecord: 221.4ms)
Actions #12

Updated by Anonymous over 10 years ago

  • Target version changed from 1.9.0 to 1.8.4
Actions #13

Updated by Dominic Cleal over 10 years ago

  • Translation missing: en.field_release set to 4
Actions #14

Updated by Anonymous over 10 years ago

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

Updated by Anonymous almost 10 years ago

Spam deleted by administrator.

Actions #16

Updated by Ondřej Ezr over 2 years ago

  • Triaged set to No
  • Pull request https://github.com/theforeman/foreman/pull/1293 added
Actions

Also available in: Atom PDF