Bug #1485

unable to rename hosts

Added by Joshua Hoblitt over 1 year ago. Updated 6 months ago.

Status:New Start:02/07/2012
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:DHCP
Target version:Bug scrub
Backlog:No Difficulity:
Votes: 2 (View)

Description

When attempt to rename a host from decmg1. -> dec14. this error message is returned in the foreman www ui:

Unable to save
failed to detect boot server: Connection refused - recvfrom(2)
Failed to perform rollback on DHCP Settings for dec14.tuc.noao.edu - undefined method `destroy' for nil:NilClass
Failed to perform rollback on DHCP Settings for decmgr1.tuc.noao.edu - undefined method `create' for nil:NilClass

Entry from foreman production.log suggests that the proxy failed:

Processing HostsController#update (for 140.252.7.41 at 2012-02-07 14:44:05) [PUT]
  Parameters: {"commit"=>"Submit", "action"=>"update", "id"=>"decmgr1.tuc.noao.edu", "_method"=>"put", "host"=>{"comment"=>"", "puppetmaster_name"=>"ctrl-27.tuc.noao.edu", "hostgroup_id"=>"1", "managed"=>"0", "enabled"=>"1", "name"=>"dec14.tuc.noao.edu", "is_owned_by"=>"1-Users", "environment_id"=>"1", "model_id"=>"2", "puppetproxy_id"=>"1", "puppetclass_ids"=>[""]}, "controller"=>"hosts", "authenticity_token"=>"o+PCHXaXLfLfk5ycQiiWSFC9oFpODjDL9xM+DYp6quY="}
failed to detect boot server: Connection refused - recvfrom(2)
Delete DHCP reservation for decmgr1.tuc.noao.edu-00:25:90:60:48:06/140.252.27.17
failed to detect boot server: Connection refused - recvfrom(2)
Create DHCP reservation for dec14.tuc.noao.edu-00:25:90:60:48:06/140.252.27.17
Rolling back due to a problem: 
Failed to perform rollback on DHCP Settings for dec14.tuc.noao.edu - undefined method `destroy' for nil:NilClass
Failed to perform rollback on DHCP Settings for decmgr1.tuc.noao.edu - undefined method `create' for nil:NilClass
Failed to save: failed to detect boot server: Connection refused - recvfrom(2), Failed to perform rollback on DHCP Settings for dec14.tuc.noao.edu - undefined method `destroy' for nil:NilClass, Failed to perform rollback on DHCP Settings for decmgr1.tuc.noao.edu - undefined method `create' for nil:NilClass
Rendering template within layouts/application
Rendering hosts/edit
Completed in 1105ms (View: 221, DB: 47) | 200 OK [https://ctrl/hosts/decmgr1.tuc.noao.edu]

However, the foreman-proxy log shows that the new reservation was applied.

D, [2012-02-07T14:44:05.263996 #21390] DEBUG -- : Loading subnets for 127.0.0.1
D, [2012-02-07T14:44:05.264188 #21390] DEBUG -- : Added 140.252.27.0/255.255.255.0 to 127.0.0.1
D, [2012-02-07T14:44:05.264277 #21390] DEBUG -- : Added 140.252.26.0/255.255.255.0 to 127.0.0.1
D, [2012-02-07T14:44:05.264490 #21390] DEBUG -- : Loading subnet data for 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.278986 #21390] DEBUG -- : Added decnsd1.tuc.noao.edu (140.252.27.15 / 00:25:90:39:5f:9c) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.279633 #21390] DEBUG -- : Added dec12.tuc.noao.edu (140.252.27.32 / 00:25:90:60:40:60) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.280182 #21390] DEBUG -- : Added dec04.tuc.noao.edu (140.252.27.24 / 00:25:90:60:47:fa) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.280879 #21390] DEBUG -- : Added dec15.tuc.noao.edu (140.252.27.18 / 00:25:90:60:48:0c) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.281403 #21390] DEBUG -- : Added dec07.tuc.noao.edu (140.252.27.27 / 00:25:90:60:48:12) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.283105 #21390] DEBUG -- : Added dec10.tuc.noao.edu (140.252.27.30 / 00:25:90:60:48:04) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.283686 #21390] DEBUG -- : Added dec02.tuc.noao.edu (140.252.27.22 / 00:25:90:60:40:98) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.284226 #21390] DEBUG -- : Added decnsd2.tuc.noao.edu (140.252.27.16 / 00:25:90:37:99:06) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.284795 #21390] DEBUG -- : Added dec13.tuc.noao.edu (140.252.27.33 / 00:25:90:60:45:a0) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.285329 #21390] DEBUG -- : Added dec05.tuc.noao.edu (140.252.27.25 / 00:25:90:60:40:64) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.285921 #21390] DEBUG -- : Added foremantest.tuc.noao.edu (140.252.27.141 / 52:54:d2:ed:01:84) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.286469 #21390] DEBUG -- : Added dec08.tuc.noao.edu (140.252.27.28 / 00:25:90:60:48:02) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.287110 #21390] DEBUG -- : Added dec11.tuc.noao.edu (140.252.27.31 / 00:25:90:60:48:10) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.287390 #21390] DEBUG -- : Added dec03.tuc.noao.edu (140.252.27.23 / 00:25:90:60:af:c2) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.287779 #21390] DEBUG -- : Added dec14.tuc.noao.edu (140.252.27.17 / 00:25:90:60:48:06) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.288079 #21390] DEBUG -- : Added dec06.tuc.noao.edu (140.252.27.26 / 00:25:90:60:48:0a) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.288366 #21390] DEBUG -- : Added dec01.tuc.noao.edu (140.252.27.21 / 00:25:90:60:47:98) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.288668 #21390] DEBUG -- : Added dec09.tuc.noao.edu (140.252.27.29 / 00:25:90:60:af:ca) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.288958 #21390] DEBUG -- : Added decdb1.tuc.noao.edu (140.252.27.14 / 00:25:90:60:60:7e) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.341124 #21390] DEBUG -- : Added 140.252.27.221 / 00:1b:21:be:24:f8 to 140.252.27.0/255.255.255.0
I, [2012-02-07T14:44:05.341836 #21390]  INFO -- : Enumerated hosts on 140.252.27.0
D, [2012-02-07T14:44:05.341899 #21390] DEBUG -- : Lazy loaded 140.252.27.0/255.255.255.0 records
D, [2012-02-07T14:44:05.343708 #21390] DEBUG -- : omshell: executed - set hardware-address = 00:25:90:60:48:06
D, [2012-02-07T14:44:05.343809 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.343900 #21390] DEBUG -- : omshell: executed - open
D, [2012-02-07T14:44:05.343944 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.344001 #21390] DEBUG -- : omshell: executed - remove
D, [2012-02-07T14:44:05.344042 #21390] DEBUG -- : true
I, [2012-02-07T14:44:05.718034 #21390]  INFO -- : Removed DHCP reservation for dec14.tuc.noao.edu => dec14.tuc.noao.edu (140.252.27.17 / 00:25:90:60:48:06)
D, [2012-02-07T14:44:05.851478 #21390] DEBUG -- : Loading subnets for 127.0.0.1
D, [2012-02-07T14:44:05.851752 #21390] DEBUG -- : Added 140.252.27.0/255.255.255.0 to 127.0.0.1
D, [2012-02-07T14:44:05.851921 #21390] DEBUG -- : Added 140.252.26.0/255.255.255.0 to 127.0.0.1
D, [2012-02-07T14:44:05.852377 #21390] DEBUG -- : Loading subnet data for 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.894859 #21390] DEBUG -- : Added decnsd1.tuc.noao.edu (140.252.27.15 / 00:25:90:39:5f:9c) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.895257 #21390] DEBUG -- : Added dec12.tuc.noao.edu (140.252.27.32 / 00:25:90:60:40:60) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.895561 #21390] DEBUG -- : Added dec04.tuc.noao.edu (140.252.27.24 / 00:25:90:60:47:fa) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.895983 #21390] DEBUG -- : Added dec15.tuc.noao.edu (140.252.27.18 / 00:25:90:60:48:0c) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.896299 #21390] DEBUG -- : Added dec07.tuc.noao.edu (140.252.27.27 / 00:25:90:60:48:12) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.897293 #21390] DEBUG -- : Added dec10.tuc.noao.edu (140.252.27.30 / 00:25:90:60:48:04) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.897634 #21390] DEBUG -- : Added dec02.tuc.noao.edu (140.252.27.22 / 00:25:90:60:40:98) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.897962 #21390] DEBUG -- : Added decnsd2.tuc.noao.edu (140.252.27.16 / 00:25:90:37:99:06) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.898279 #21390] DEBUG -- : Added dec13.tuc.noao.edu (140.252.27.33 / 00:25:90:60:45:a0) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.898641 #21390] DEBUG -- : Added dec05.tuc.noao.edu (140.252.27.25 / 00:25:90:60:40:64) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.898973 #21390] DEBUG -- : Added foremantest.tuc.noao.edu (140.252.27.141 / 52:54:d2:ed:01:84) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.899294 #21390] DEBUG -- : Added dec08.tuc.noao.edu (140.252.27.28 / 00:25:90:60:48:02) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.899856 #21390] DEBUG -- : Added dec11.tuc.noao.edu (140.252.27.31 / 00:25:90:60:48:10) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.900188 #21390] DEBUG -- : Added dec03.tuc.noao.edu (140.252.27.23 / 00:25:90:60:af:c2) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.900516 #21390] DEBUG -- : Added dec06.tuc.noao.edu (140.252.27.26 / 00:25:90:60:48:0a) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.900898 #21390] DEBUG -- : Added dec01.tuc.noao.edu (140.252.27.21 / 00:25:90:60:47:98) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.901229 #21390] DEBUG -- : Added dec09.tuc.noao.edu (140.252.27.29 / 00:25:90:60:af:ca) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.901560 #21390] DEBUG -- : Added decdb1.tuc.noao.edu (140.252.27.14 / 00:25:90:60:60:7e) to 140.252.27.0/255.255.255.0
I, [2012-02-07T14:44:05.913416 #21390]  INFO -- : Enumerated hosts on 140.252.27.0
D, [2012-02-07T14:44:05.913476 #21390] DEBUG -- : Lazy loaded 140.252.27.0/255.255.255.0 records
D, [2012-02-07T14:44:05.913588 #21390] DEBUG -- : Loading subnet data for 140.252.26.0/255.255.255.0
D, [2012-02-07T14:44:05.915865 #21390] DEBUG -- : Added sdmvc.tuc.noao.edu (140.252.26.87 / 00:25:90:60:b1:e6) to 140.252.26.0/255.255.255.0
D, [2012-02-07T14:44:05.916125 #21390] DEBUG -- : Added sdmvm1.tuc.noao.edu (140.252.26.90 / 00:25:90:60:ae:aa) to 140.252.26.0/255.255.255.0
D, [2012-02-07T14:44:05.916378 #21390] DEBUG -- : Added nsaqavs.tuc.noao.edu (140.252.26.153 / 00:1f:c6:49:d0:9f) to 140.252.26.0/255.255.255.0
D, [2012-02-07T14:44:05.917884 #21390] DEBUG -- : Added dpnms16.tuc.noao.edu (140.252.26.70 / 00:15:17:a1:be:5a) to 140.252.26.0/255.255.255.0
I, [2012-02-07T14:44:05.932059 #21390]  INFO -- : Enumerated hosts on 140.252.26.0
D, [2012-02-07T14:44:05.932192 #21390] DEBUG -- : Lazy loaded 140.252.26.0/255.255.255.0 records
D, [2012-02-07T14:44:05.932431 #21390] DEBUG -- : Added dec14.tuc.noao.edu (140.252.27.17 / 00:25:90:60:48:06) to 140.252.27.0/255.255.255.0
D, [2012-02-07T14:44:05.934128 #21390] DEBUG -- : omshell: executed - set name = "dec14.tuc.noao.edu" 
D, [2012-02-07T14:44:05.934227 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.934324 #21390] DEBUG -- : omshell: executed - set ip-address = 140.252.27.17
D, [2012-02-07T14:44:05.934368 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.934426 #21390] DEBUG -- : omshell: executed - set hardware-address = 00:25:90:60:48:06
D, [2012-02-07T14:44:05.934489 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.934547 #21390] DEBUG -- : omshell: executed - set hardware-type = 1
D, [2012-02-07T14:44:05.934600 #21390] DEBUG -- : true
W, [2012-02-07T14:44:05.947209 #21390]  WARN -- : Failed to resolve IP address for false
D, [2012-02-07T14:44:05.947348 #21390] DEBUG -- : omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = \"false\"; option host-name = \"dec14.tuc.noao.edu\";" 
D, [2012-02-07T14:44:05.947400 #21390] DEBUG -- : true
D, [2012-02-07T14:44:05.947482 #21390] DEBUG -- : omshell: executed - create
D, [2012-02-07T14:44:05.947528 #21390] DEBUG -- : true
I, [2012-02-07T14:44:05.971486 #21390]  INFO -- : Added DHCP reservation for dec14.tuc.noao.edu (140.252.27.17 / 00:25:90:60:48:06)


Related issues

related to Foreman - Bug #1749: Parameters inheritance is not displayed when creating a new host Closed 07/12/2012

History

Updated by Joshua Hoblitt over 1 year ago

rpm -qa | grep foreman
foreman-proxy-0.3.1-0.1.noarch
foreman-release-1-1.noarch
foreman-0.4.2-0.1.noarch

Updated by Joshua Hoblitt over 1 year ago

There may be something more fundimentally wrong here as it appears I can no longer delete a host either after the 0.4.2 upgrade.


failed to detect boot server: Connection refused - recvfrom(2)Failed to generate PXELinux template: Missing host to link to! Please provide :host parameter or set default_url_options[:host]Failed to perform rollback on DHCP Settings for decmgr1.tuc.noao.edu - undefined method `create' for nil:NilClass

Updated by Joshua Hoblitt over 1 year ago

This issue needs to be renamed. This is clearly a command status return problem between foreman-proxy and foreman that prevents you from adding, editing, or removing DNS entires. In all cases the command seems to execute correctly in the proxy but foreman thinks it failed.

Updated by Ohad Levy over 1 year ago

  • Status changed from New to Feedback

Joshua Hoblitt wrote:

This issue needs to be renamed. This is clearly a command status return problem between foreman-proxy and foreman that prevents you from adding, editing, or removing DNS entires. In all cases the command seems to execute correctly in the proxy but foreman thinks it failed.

my "feeling" here is that the proxy fails, and the error that you get is actually from another error while trying to undo the previous changes.

the real error is here:

failed to detect boot server: Connection refused -

which would suggest that your TFTP proxy is down

Updated by Joshua Hoblitt over 1 year ago

It looks like there were two issues going on. One was an OS update changed the permissions of /etc/dhcp/ so that foreman-proxy couldn't access that dir. With that resolved, we're down to the TFTP proxy issue that you suspected.

failed to detect boot server: Connection refused - recvfrom(2)
Create DHCP reservation for zenith5.tuc.noao.edu-00:15:17:a2:e0:8e/140.252.19.120
Add the TFTP configuration for zenith5.tuc.noao.edu
Fetching required TFTP boot files for zenith5.tuc.noao.edu
Rolling back due to a problem: 
Delete the TFTP configuration for zenith5.tuc.noao.edu
Failed to perform rollback on DHCP Settings for zenith5.tuc.noao.edu - undefined method `destroy' for nil:NilClass
Failed to save: failed to detect boot server: Connection refused - recvfrom(2), Failed to perform rollback on DHCP Settings for zenith5.tuc.noao.edu - undefined method `destroy' for nil:NilClass
Rendering template within layouts/application
Rendering hosts/new
Completed in 632ms (View: 496, DB: 19) | 200 OK [https://master/hosts]

tftp is running and files can be fetched from it. The permissions are unchanged from when I first installed the proxy and it should be able to create files.

drwxr-xr-x   4 root          root  4096 Nov  7 17:45 .
drwxr-xr-x. 39 root          root  4096 Nov 21 17:03 ..
drwxr-xr-x   2 foreman-proxy root  4096 Nov 16 17:37 boot
-rw-r--r--   1 root          root 20192 Nov  7 17:45 chain.c32
-rw-r--r--   1 root          root 60928 Nov  7 17:45 menu.c32
-rw-r--r--   1 root          root 26828 Nov  7 17:45 pxelinux.0
drwxr-xr-x   2 foreman-proxy root  4096 Feb 17 17:39 pxelinux.cfg

The proxy log indicates that it is properly handling TFTP.


I, [2012-02-17T17:44:42.642981 #5881]  INFO -- : TFTP: entry for 00:15:17:a2:e0:8e created successfully
D, [2012-02-17T17:44:42.658811 #5881] DEBUG -- : Starting task (total: 0): wget --timeout=10 --tries=3 --no-check-certificate -nv -c http://centos.tuc.noao.edu/rhel/6.1/x86_64//images/pxeboot/initrd.img -O "/var/lib/tftpboot/boot/RedHat-6.1-x86_64-initrd.img" 
D, [2012-02-17T17:44:42.672645 #5881] DEBUG -- : Starting task (total: 0): wget --timeout=10 --tries=3 --no-check-certificate -nv -c http://centos.tuc.noao.edu/rhel/6.1/x86_64//images/pxeboot/vmlinuz -O "/var/lib/tftpboot/boot/RedHat-6.1-x86_64-vmlinuz" 
D, [2012-02-17T17:44:42.726620 #5881] DEBUG -- : TFTP: entry for 00:15:17:a2:e0:8e removed successfully

I have now reproduced this issue on a second foreman host after the update to foreman-proxy-0.3.1-0.1.noarch &
foreman-0.4.2-0.1.noarch.

Updated by Benjamin Papillon 11 months ago

  • Status changed from Feedback to New

Updated by Greg Sutcliffe 6 months ago

  • Target version set to Bug scrub

Also available in: Atom PDF