From 8daf3e3c23158cdab09af05b5f3a29fd2d9ca501 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Thu, 22 Aug 2013 19:17:54 -0700 Subject: [PATCH] CLOUDSTACK-1670: Fix multiple nic routing issue when dhcp_release available dnsmasq.conf need to contain /etc/dhcpopts.txt from the beginning, otherwise SIGHUP won't make dnsmasq reload the dhcpopts.txt, thus result in multiple nics user VM get router information from all DHCP offers. --- patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl | 2 ++ patches/systemvm/debian/config/etc/init.d/cloud-early-config | 3 +++ 2 files changed, 5 insertions(+) diff --git a/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl b/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl index 38e5a8bbc96..a3e0bc84856 100644 --- a/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl +++ b/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl @@ -632,3 +632,5 @@ log-facility=/var/log/dnsmasq.log # Include a another lot of configuration options. #conf-file=/etc/dnsmasq.more.conf conf-dir=/etc/dnsmasq.d + +dhcp-optsfile=/etc/dhcpopts.txt diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index 0a76b7fff76..7298bbe3c05 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -634,6 +634,9 @@ setup_common() { setup_dnsmasq() { log_it "Setting up dnsmasq" + + touch /etc/dhcpopts.txt + [ -z $DHCP_RANGE ] && [ $ETH0_IP ] && DHCP_RANGE=$ETH0_IP [ $ETH0_IP6 ] && DHCP_RANGE_IP6=$ETH0_IP6 [ -z $DOMAIN ] && DOMAIN="cloudnine.internal"