mirror of https://github.com/apache/cloudstack.git
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.
This commit is contained in:
parent
a930b7576a
commit
8cb51dcc88
|
|
@ -2030,7 +2030,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");
|
||||
|
|
|
|||
|
|
@ -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%?}
|
||||
|
|
|
|||
Loading…
Reference in New Issue