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/12/18 01:07:04 UTC

git commit: updated refs/heads/master to e54d1de

Updated Branches:
  refs/heads/master c7e2914bc -> e54d1dec9


CLOUDSTACK-5533: Disable VR's DNS functionality if user choose to use external dns

Also fix the regression that external dns won't be used if "dns" service in the
network offering is unset.


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

Branch: refs/heads/master
Commit: e54d1dec9dba72d49cd4594c5c67a872e1fd33d2
Parents: c7e2914
Author: Sheng Yang <sh...@citrix.com>
Authored: Tue Dec 17 16:04:21 2013 -0800
Committer: Sheng Yang <sh...@citrix.com>
Committed: Tue Dec 17 16:06:58 2013 -0800

----------------------------------------------------------------------
 .../network/router/VirtualNetworkApplianceManagerImpl.java     | 2 +-
 systemvm/patches/debian/config/etc/init.d/cloud-early-config   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e54d1dec/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index c2902b1..7f4a264 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2137,7 +2137,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
 
             boolean useExtDns = !dnsProvided;
             /* For backward compatibility */
-            useExtDns = UseExternalDnsServers.valueIn(dc.getId());
+            useExtDns = useExtDns || UseExternalDnsServers.valueIn(dc.getId());
 
             if (useExtDns) {
                 buf.append(" useextdns=true");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e54d1dec/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index d4bf0eb..05661fc 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -715,6 +715,12 @@ setup_dnsmasq() {
   then
     [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS"
     [ $ETH0_IP6 ] && NS6="[::],$NS6"
+    # enable dns
+    sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf
+  else
+    # disable dns
+    sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf
+    echo "port=0" >> /etc/dnsmasq.conf
   fi
   NS=${NS%?}
   NS6=${NS6%?}