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. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/064f6c01 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/064f6c01 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/064f6c01 Branch: refs/heads/4.2 Commit: 064f6c01b3ae40878252f16b982f92c2d16a2a41 Parents: 82b8933 Author: Sheng Yang <[email protected]> Authored: Thu Aug 22 19:17:54 2013 -0700 Committer: Sheng Yang <[email protected]> Committed: Fri Aug 23 11:58:34 2013 -0700 ---------------------------------------------------------------------- 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(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/064f6c01/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl b/patches/systemvm/debian/config/etc/dnsmasq.conf.tmpl index 38e5a8b..a3e0bc8 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 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/064f6c01/patches/systemvm/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- 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 fb4e343..d847c24 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -635,6 +635,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"
