Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1077487

Summary: dnsmasq can't handle ipv6 addresses; triggers constant resyncs of dhcp
Product: Red Hat OpenStack Reporter: Ian Wienand <iwienand>
Component: openstack-neutronAssignee: Miguel Angel Ajo <mangelajo>
Status: CLOSED ERRATA QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: breeler, chrisw, gdubreui, lpeer, majopela, nyechiel, wfoster, yeylon
Target Milestone: z4Keywords: OtherQA, ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2013.2.2-9.el6ost Doc Type: Bug Fix
Doc Text:
Cause: The dnsmasq version shipped in RHEL OPENSTACK has a bug related to IPv6 settings. Consequence: This bug caused it to restart when those IPv6 settings are used. Fix: Until the dnsmasq package is updated, we will omit those settings on dnsmasq for the current version. Result: The dnsmasq processes in the neutron-dhcp-agent will not restart all the time when IPv6 settings are used in a network. DHCP for IPv6 does not work and it is not expected to work.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-29 20:19:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1075570    

Description Ian Wienand 2014-03-18 05:00:57 UTC
Description of problem:

I am seeing in the logs

---
Command: ['sudo', 'ip', 'netns', 'exec', 'qdhcp-a9305dfc-659c-4091-ad31-772020cf53b5', 'env', 'NEUTRON_NETWORK_ID=a9305dfc-659c-4091-ad31-772020cf53b5', 'dnsmasq', '--no-hosts', '--no-resolv', '--strict-order', '--bind-inter
faces', '--interface=tap410b8a43-86', '--except-interface=lo', '--pid-file=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/pid', '--dhcp-hostsfile=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/host', 
'--dhcp-optsfile=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/opts', '--leasefile-ro', '--dhcp-range=tag0,fdce:4d13:45a3:ad1b::,static,120s', '--dhcp-lease-max=16777216', '--conf-file=/etc/neutron/dnsmasq-neutr
on.conf', '--server=10.16.17.200', '--domain=openstacklocal']
Exit code: 1
Stdout: ''
Stderr: '\ndnsmasq: bad command line options: only one netid tag allowed\n' execute /usr/lib/python2.6/site-packages/neutron/agent/linux/utils.py:73
2014-03-18 03:19:30.103 26586 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for a9305dfc-659c-4091-ad31-772020cf53b5.
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.6/site-packages/neutron/agent/dhcp_agent.py", line 129, in call_driver
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent     getattr(driver, action)(**action_kwargs)
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/dhcp.py", line 175, in enable
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent     self.spawn_process()
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/dhcp.py", line 370, in spawn_process
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent     ip_wrapper.netns.execute(cmd, addl_env=env)
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 467, in execute
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent     check_exit_code=check_exit_code)
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/utils.py", line 75, in execute
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent     raise RuntimeError(m)
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent RuntimeError: 
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent Command: ['sudo', 'ip', 'netns', 'exec', 'qdhcp-a9305dfc-659c-4091-ad31-772020cf53b5', 'env', 'NEUTRON_NETWORK_ID=a9305dfc-659c-4091-ad31-772020cf53b5', 'dnsmasq', '--no-hosts', '--no-resolv', '--strict-order', '--bind-interfaces', '--interface=tap410b8a43-86', '--except-interface=lo', '--pid-file=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/pid', '--dhcp-hostsfile=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/host', '--dhcp-optsfile=/var/lib/neutron/dhcp/a9305dfc-659c-4091-ad31-772020cf53b5/opts', '--leasefile-ro', '--dhcp-range=tag0,fdce:4d13:45a3:ad1b::,static,120s', '--dhcp-lease-max=16777216', '--conf-file=/etc/neutron/dnsmasq-neutron.conf', '--server=10.16.17.200', '--domain=openstacklocal']
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent Exit code: 1
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent Stdout: ''
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent Stderr: '\ndnsmasq: bad command line options: only one netid tag allowed\n'
2014-03-18 03:19:30.103 26586 TRACE neutron.agent.dhcp_agent 
---

I've diagnosed this as dnsmasq not handling the ipv6 address as per bug#1077469.  I'm guessing dhcp for this network isn't working

There's another problem here; dnsmasq failing triggers a resync of the dhcp agents per [1]

---
[root@host03 dnsmasq-2.48]# cat /var/log/neutron/dhcp-agent.log | grep 'Unable to'  | grep 'dhcp for'
2014-03-18 03:19:30.103 26586 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for a9305dfc-659c-4091-ad31-772020cf53b5.
2014-03-18 03:20:54.040 26586 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for a9305dfc-659c-4091-ad31-772020cf53b5.
2014-03-18 03:22:15.477 26586 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for a9305dfc-659c-4091-ad31-772020cf53b5.
---

This means approximately every minute we end up killing and restarting all our networks when that is really not necessary

[1] https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp_agent.py#L137

Comment 6 errata-xmlrpc 2014-05-29 20:19:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0516.html