add build branch
[openstack-build/neutron-build.git] / rpm / SOURCES / 0002-dhcp-agent-make-dnsmasq-tags-work-with-RHEL-6.patch
1 From 0c1e1a1d753bb822d3783778f94878a9ef390dd2 Mon Sep 17 00:00:00 2001
2 From: Chris Wright <chrisw@sous-sol.org>
3 Date: Mon, 7 Jan 2013 18:21:20 -0800
4 Subject: [PATCH] dhcp agent: make dnsmasq tags work with RHEL 6
5
6 rhbz 887369
7
8 RHEL 6 has dnsmasq-2.48 which has a different syntax for tags compared
9 with newer (>= dnsmasq-2.53). This patch updates command line and
10 options file contents to work with dnsmasq-2.48.
11
12 Change-Id: Ibf9309007fbf62f1f176737f2a5d179eabcf89dc
13 Signed-off-by: Chris Wright <chrisw@redhat.com>
14 ---
15  quantum/agent/linux/dhcp.py |    4 ++--
16  1 files changed, 2 insertions(+), 2 deletions(-)
17
18 diff --git a/quantum/agent/linux/dhcp.py b/quantum/agent/linux/dhcp.py
19 index 709d7da..20752e3 100644
20 --- a/quantum/agent/linux/dhcp.py
21 +++ b/quantum/agent/linux/dhcp.py
22 @@ -273,7 +273,7 @@ class Dnsmasq(DhcpLocalProcess):
23                  # TODO (mark): how do we indicate other options
24                  # ra-only, slaac, ra-nameservers, and ra-stateless.
25                  mode = 'static'
26 -            cmd.append('--dhcp-range=set:%s,%s,%s,%ss' %
27 +            cmd.append('--dhcp-range=%s,%s,%s,%ss' %
28                         (self._TAG_PREFIX % i,
29                          netaddr.IPNetwork(subnet.cidr).network,
30                          mode,
31 @@ -404,7 +404,7 @@ class Dnsmasq(DhcpLocalProcess):
32                              'quantum-dhcp-agent-dnsmasq-lease-update')
33  
34      def _format_option(self, index, option_name, *args):
35 -        return ','.join(('tag:' + self._TAG_PREFIX % index,
36 +        return ','.join((self._TAG_PREFIX % index,
37                           'option:%s' % option_name) + args)
38  
39      @classmethod