You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ya...@apache.org on 2013/07/30 03:24:32 UTC

git commit: updated refs/heads/4.2 to 0f76572

Updated Branches:
  refs/heads/4.2 6275d697e -> 0f765727d


CLOUDSTACK-3357: Add domain and local parameter for VPC dnsmasq.conf

Fix DNS failure for internal guest vms.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0f765727
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0f765727
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0f765727

Branch: refs/heads/4.2
Commit: 0f765727d53649239571465dc70643447162ef5a
Parents: 6275d69
Author: Sheng Yang <sh...@citrix.com>
Authored: Mon Jul 29 18:22:32 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Mon Jul 29 18:22:32 2013 -0700

----------------------------------------------------------------------
 patches/systemvm/debian/config/etc/init.d/cloud-early-config | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f765727/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 c12ca74..a552d44 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -991,6 +991,12 @@ EOF
   cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules
   echo "" > /etc/dnsmasq.d/dhcphosts.txt
   echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf
+
+  [ -z $DOMAIN ] && DOMAIN="cloudnine.internal"
+  #DNS server will append $DOMAIN to local queries
+  sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf
+  #answer all local domain queries
+  sed  -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf
 }