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:50 UTC

git commit: updated refs/heads/master to 9278b2c

Updated Branches:
  refs/heads/master 16c3d21ee -> 9278b2c34


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/9278b2c3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9278b2c3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9278b2c3

Branch: refs/heads/master
Commit: 9278b2c343b9c0fe5d5e3b0123c689819f45ff15
Parents: 16c3d21
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:24:44 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/9278b2c3/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
 }