Description of problem: dnsmasq seems to run the dhcp-script only on startup but never when a lease is added or removed. Version-Release number of selected component (if applicable): 2.48-13.el6 How reproducible: Everytime Steps to Reproduce: 1. Create a new instance in openstack 2. The leased column in the fixed_ip table will not get updated. 3. Delete the new instance in openstack Actual results: leased=0 Expected results: leased=1 Additional info: dnsmasq-2.62-1 solves the problem...
(In reply to comment #0) > Steps to Reproduce: > 1. Create a new instance in openstack > 2. The leased column in the fixed_ip table will not get updated. > 3. Delete the new instance in openstack Please attach options and configuration files that dnsmasq is started with. As I'm not familiar with setting up openstack I don't want to spend a lot of time with openstack but rather with fixing dnsmasq. Please also attach scripts that are supposed to run on startup/when lease is added/when lease is removed. Thank you.
/usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file=/etc/dnsmasq.conf --domain=novalocal --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=172.0.0.1 --except-interface=lo --dhcp-range=set:'private',172.0.0.2,static,255.255.248.0,600s --dhcp-lease-max=2048 --dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
Created attachment 717182 [details] nova-dhcpbridge
Created attachment 731497 [details] Sample testing script
I tested dnsmasq-2.48-13.el6 with my simple testing script (the attached one) on RHEL-6.4. I got the following output: [root@rhel-64-virtual ~]# dnsmasq -d --strict-order --bind-interfaces --conf-file=/etc/dnsmasq.conf --domain=novalocal --listen-address=192.168.133.2 --except-interface=lo --dhcp-range=set:'private',192.168.133.3,static,255.255.255.0,600s --dhcp-lease-max=251 --dhcp-script=/root/script.sh --leasefile-ro --dhcp-hostsfile=/root/hosts.conf dnsmasq: started, version 2.48 cachesize 150 dnsmasq: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP "--bind-interfaces with SO_BINDTODEVICE" dnsmasq-dhcp: DHCP, static leases only on 192.168.133.3, lease time 10m dnsmasq: reading /etc/resolv.conf dnsmasq: using nameserver 192.168.122.1#53 dnsmasq: read /etc/hosts - 2 addresses dnsmasq: read /root/hosts.conf dnsmasq-dhcp: DHCPDISCOVER(eth2) 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPOFFER(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: add 52:54:00:91:cf:62 192.168.133.10 dnsmasq-dhcp: DHCPDISCOVER(eth2) 52:54:00:38:7e:6c dnsmasq-dhcp: DHCPOFFER(eth2) 192.168.133.20 52:54:00:38:7e:6c dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.20 52:54:00:38:7e:6c dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.20 52:54:00:38:7e:6c SCRIPT CALLED WITH PARAMETERS: add 52:54:00:38:7e:6c 192.168.133.20 dnsmasq-dhcp: DHCPRELEASE(eth2) 192.168.133.20 52:54:00:38:7e:6c SCRIPT CALLED WITH PARAMETERS: del 52:54:00:38:7e:6c 192.168.133.20 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: old 52:54:00:91:cf:62 192.168.133.10 dnsmasq-dhcp: DHCPDISCOVER(eth2) 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPOFFER(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: old 52:54:00:91:cf:62 192.168.133.10 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: old 52:54:00:91:cf:62 192.168.133.10 dnsmasq-dhcp: DHCPDISCOVER(eth2) 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPOFFER(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: old 52:54:00:91:cf:62 192.168.133.10 dnsmasq-dhcp: DHCPREQUEST(eth2) 192.168.133.10 52:54:00:91:cf:62 dnsmasq-dhcp: DHCPACK(eth2) 192.168.133.10 52:54:00:91:cf:62 SCRIPT CALLED WITH PARAMETERS: old 52:54:00:91:cf:62 192.168.133.10 From my point of view dnsmasq is working properly. Changing Product to Red Hat OpenStack.
For some reasons, it seems to run the script only once when starting dnsmasq. I've tried replacing the openstack nova-dhcpbridge script by a shell script (like in your test) and it was called only one at startup and then, nothing more happened.
As this pretty much works for everybody else, it would seem that there may be something going on with your environment. What does "nova show" on the instance you created show? Is there any unusual output in any of the log files related to the leased address?
Well, since we're using 2.62 instead of 2.48 it's working fine... also, it appears that you may be right and that the lab we're using has some weird bugs ... but I've just looked at a freshly updated node in our production environment and I see DHCPRELEASE messages ! For some reasons puppet didn't update the package on that node and it's still using 2.48-13 ! I guess you can close this bug report. Thanks.