Add support to use dnsmasq with the OVS plug-in and GRE

Bug #1259495 reported by Loic Dachary
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
puppet-neutron
Fix Released
Low
Daniel Gollub

Bug Description

http://docs.openstack.org/admin-guide-cloud/content/ch_networking.html#openvswitch_plugin explains

    If you use the neutron DHCP agent, add these lines to the /etc/neutron/dhcp_agent.ini file:

       dnsmasq_config_file=/etc/neutron/dnsmasq-neutron.conf

    Create /etc/neutron/dnsmasq-neutron.conf, and add these values to lower the MTU size on instances and prevent packet fragmentation over the GRE tunnel:

       dhcp-option-force=26,1400

which could be implemented by adding support for dnsmasq_config_file in https://github.com/stackforge/puppet-neutron/blob/master/manifests/agents/dhcp.pp#L41

Should /etc/neutron/dnsmasq-neutron.conf be associated with something like dnsmasq_neutron_config ?

Revision history for this message
Daniel Gollub (d-gollub) wrote :

Maybe this change is a good base to start with: https://review.openstack.org/#/c/63520/

Additionally you would have to do something like this in your manifests (untested):

---8<---
$neutron_dhcp_agent_dnsmasq_mtu = 1454

file { '/etc/neutron/dnsmasq.conf':
    ensure => file,
    content => template('yourpathto/neutron/dhcp-agent/dnsmasq.conf.erb'),
    owner => root,
    group => root,
    mode => 640,
    notify => Service['neutron-dhcp-service'],
}

class { 'neutron::agents::dhcp':
    dnsmasq_config_file => '/etc/neutron/dnsmasq.conf',
    requires => File['/etc/neutron/dnsmasq.conf']
}
---->8-----

dnsmasq.conf.erb:
----8<---
<% if @neutron_dhcp_agent_dnsmasq_mtu -%>
dhcp-option=26,<%= @neutron_dhcp_agent_dnsmasq_mtu %>
<% end -%>
---->8-----

dhcp-option-force or dhcp-option? Anyone has bad experience with using plain dhcp-option= instead of dhcp-option-force= with some DHCP client?

Not quite sure if it is in common interested to introduce a fine-grain configurable dnsmasq template directly - beside the dnsmasq_file options. If so I could provide additional changes for common dnsmasq options like the MTU size change.

Note: if you not only have to decrease the MTU due to GRE overhead (as you described in your blog post) but have to increase the MTU for jumbo frame usage with OVS and GRE Tunnel you will need to also change the MTU of the VIFs on the compute node by setting network_device_mtu. To make this nova option work for OVS drivers this change is required: https://review.openstack.org/#/c/62221/
network_device_mtu on the Neutron l3-agent might be also need to be adapted. So actually if you adapt the MTU for tenant networks you might need to adapt it to the same value at three different places: inside the guest by using Neutron DHCP Agent and the dhcp-option (this patch), Neutron L3-Agent (https://review.openstack.org/#/c/63406/): network_device_mtu and Nova network_device_mtu (puppet-nova enhancement WIP).

Changed in puppet-neutron:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Daniel Gollub (d-gollub)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (master)

Reviewed: https://review.openstack.org/63520
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=ef8087f12dcaeeaab45c0e5e27105a85bfed74fa
Submitter: Jenkins
Branch: master

commit ef8087f12dcaeeaab45c0e5e27105a85bfed74fa
Author: Daniel Gollub <email address hidden>
Date: Fri Dec 20 22:20:40 2013 +0100

    Support dnsmasq_config_file option for dhcp-agent

    Allow to configure dnsmasq_config_file for the dhcp-agent.
    For common things like adapting the MTU size for instances
    via DHCP.

    closes-bug #1259495

    Change-Id: Iee09eb9a66e84d49c0452fccf9c7d6bcb7ba8311

Mathieu Gagné (mgagne)
Changed in puppet-neutron:
milestone: none → 3.0.0
Mathieu Gagné (mgagne)
Changed in puppet-neutron:
milestone: 3.0.0 → none
Mathieu Gagné (mgagne)
Changed in puppet-neutron:
milestone: none → 4.0.0
no longer affects: puppet-neutron/havana
Changed in puppet-neutron:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.