[Dnsmasq-discuss] possible Bug: DHCPDISCOVER no address available

Thomas Kärgel kaergel at b1-systems.de
Sat May 25 11:54:31 BST 2013


Hi Simon,


Am 24.05.2013 17:53, schrieb Simon Kelley:
> 
> 
> Thanks for that. I've not found anything obvious yet that could cause
> this. What mechansim adds stuff to the hostsfile and SIGHUPs dnsmasq?
> We've not seen the logs for that procedure, AFAIK.
> 
> Cheers,
> 
> Simon.

The mechanism works like this:

1. a new machine is created with openstack nova

2. nova asks quantum for network ports in specific networks required for
the new machine.

3. quantum creates the port and assigns an ip address out of the
ip-range for this network. An mac-address is generated by quantum for
the port. A port is at this point in time not more than an entry in the
quantum-database.

4. quantum triggers quantum-dhcp-agent over RPC to reload the
allocations for the network in which the new port was created.

5.Quantum-dhcp-agent then SigHUPs corresponding dnsmasq-process
recreates the hostfile (completely afaik) and sigHUPs dnsmasq again.
This (recreating hostsfile and sigHUP) is also done twice as i now notice.
I don't know why the programmer choose to sigHUP dnsmasq before and
after recreating the hostsfile. IMHO it is only necessary to sigHUP
dnsmasq once after recreating the hostfile. Do you think this might
cause a problem?
And why is PID 12926 sigHUPed twice? Shouldn't it be sigHUPing 12927 the
second time?

5. parallel to the 2 previous steps nova-compute is triggering the
hypervisor to create the new machine. In most cases the hypervisor also
creates the VIFs with the mac-address generated in step 3 (That depends
on which hypervisor is used. In my case libvirt/XEN).

6. a Quantum plugin  (quantum-linuxbridge-agent for example) is notified
about the new port. The task of this plugin is to add the port to the
corresponding bridge (or ovs-switch, if quantum-openvswitch-agent is used).


Here are some logs i fetched this morning from the environment i'm
working on.


ps aux |grep dnsmasq
dnsmasq  12926  0.1  0.0   9172   716 ?        S    May23   3:01
/usr/sbin/dnsmasq --no-hosts --no-resolv --strict-order
--bind-interfaces --interface=ns-806c6c7b-2b --except-interface=lo
--domain=openstacklocal
--pid-file=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/host
--dhcp-optsfile=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/opts
--dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update
--leasefile-ro --dhcp-range=set:tag0,10.70.149.0,static,120s
root     12927  0.0  0.0   9172   320 ?        S    May23   0:27
/usr/sbin/dnsmasq --no-hosts --no-resolv --strict-order
--bind-interfaces --interface=ns-806c6c7b-2b --except-interface=lo
--domain=openstacklocal
--pid-file=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/host
--dhcp-optsfile=/var/lib/quantum/dhcp/d041e640-c37f-4b8f-9878-ecbc1b26d12f/opts
--dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update
--leasefile-ro --dhcp-range=set:tag0,10.70.149.0,static,120s


And the log of quantum-dhcp-agent:

2013-05-25 12:38:24    DEBUG [quantum.openstack.common.rpc.amqp] Making
asynchronous cast on q-plugin...
2013-05-25 12:38:24    DEBUG [amqplib] Closed channel #1
2013-05-25 12:38:24    DEBUG [amqplib] using channel_id: 1
2013-05-25 12:38:24    DEBUG [amqplib] Channel open
2013-05-25 12:38:26    DEBUG [quantum.openstack.common.rpc.amqp] Making
asynchronous cast on q-plugin...
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils] Running
command: sudo quantum-rootwrap /etc/quantum/rootwrap.conf kill -HUP 12926
2013-05-25 12:38:26    DEBUG [amqplib] Closed channel #1
2013-05-25 12:38:26    DEBUG [amqplib] using channel_id: 1
2013-05-25 12:38:26    DEBUG [amqplib] Channel open
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils]
Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf',
'kill', '-HUP', '12926']
Exit code: 0
Stdout: ''
Stderr: ''
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.dhcp] Reloading
allocations for network: d041e640-c37f-4b8f-9878-ecbc1b26d12f
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils] Running
command: sudo quantum-rootwrap /etc/quantum/rootwrap.conf kill -HUP 12926
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils]
Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf',
'kill', '-HUP', '12926']
Exit code: 0
Stdout: ''
Stderr: ''
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.dhcp] Reloading
allocations for network: d041e640-c37f-4b8f-9878-ecbc1b26d12f
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils] Running
command: sudo quantum-rootwrap /etc/quantum/rootwrap.conf kill -HUP 12926
2013-05-25 12:38:26    DEBUG [quantum.openstack.common.rpc.amqp] Making
asynchronous cast on q-plugin...
2013-05-25 12:38:26    DEBUG [amqplib] Closed channel #1
2013-05-25 12:38:26    DEBUG [amqplib] using channel_id: 1
2013-05-25 12:38:26    DEBUG [amqplib] Channel open
2013-05-25 12:38:26    DEBUG [quantum.openstack.common.rpc.amqp] Making
asynchronous cast on q-plugin...
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.utils]
Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf',
'kill', '-HUP', '12926']
Exit code: 0
Stdout: ''
Stderr: ''
2013-05-25 12:38:26    DEBUG [quantum.agent.linux.dhcp] Reloading
allocations for network: d041e640-c37f-4b8f-9878-ecbc1b26d12f
2013-05-25 12:38:26    DEBUG [amqplib] Closed channel #1
2013-05-25 12:38:26    DEBUG [amqplib] using channel_id: 1
2013-05-25 12:38:26    DEBUG [amqplib] Channel open
2013-05-25 12:38:26    DEBUG [quantum.openstack.common.rpc.amqp] Making
asynchronous cast on q-plugin...



Best regards,
Tommy


-- 
Thomas Kärgel
Linux Consultant
Mail: kaergel at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130525/8a96f3b1/attachment.pgp>


More information about the Dnsmasq-discuss mailing list