mirror of https://github.com/apache/cloudstack.git
bug 10748: use external dns, configurable thru global param
This commit is contained in:
parent
580e8503cd
commit
2f804dd799
|
|
@ -271,6 +271,20 @@ setup_dnsmasq() {
|
|||
then
|
||||
sed -i s/[#]*dhcp-option=119.*$/dhcp-option=119,\"$DOMAIN_SUFFIX\"/ /etc/dnsmasq.conf
|
||||
fi
|
||||
|
||||
if [ "$USE_EXTERNAL_DNS" == "true" ]
|
||||
then
|
||||
sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf
|
||||
if [ -n "$NS1" ]
|
||||
then
|
||||
if [ -n "$NS2" ]
|
||||
then
|
||||
echo "dhcp-option=6,$NS1,$NS2" >> /etc/dnsmasq.conf
|
||||
else
|
||||
echo "dhcp-option=6,$NS1" >> /etc/dnsmasq.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
setup_sshd(){
|
||||
|
|
@ -539,6 +553,9 @@ for i in $CMDLINE
|
|||
domainsuffix)
|
||||
DOMAIN_SUFFIX=$VALUE
|
||||
;;
|
||||
useextdns)
|
||||
USE_EXTERNAL_DNS=$VALUE
|
||||
;;
|
||||
mgmtcidr)
|
||||
MGMTNET=$VALUE
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public enum Config {
|
|||
|
||||
AgentLbEnable("Advanced", ClusterManager.class, Boolean.class, "agent.lb.enabled", "true", "If agent load balancing enabled in cluster setup", null),
|
||||
SubDomainNetworkAccess("Advanced", NetworkManager.class, Boolean.class, "allow.subdomain.network.access", "true", "Allow subdomains to use networks dedicated to their parent domain(s)", null),
|
||||
UseExternalDnsServers("Advanced", NetworkManager.class, Boolean.class, "use.external.dns", "false", "Bypass internal dns, use exetrnal dns1 and dns2", null),
|
||||
EncodeApiResponse("Advanced", ManagementServer.class, Boolean.class, "encode.api.response", "false", "Do UTF-8 encoding for the api response, false by default", null),
|
||||
DnsBasicZoneUpdates("Advanced", NetworkManager.class, String.class, "network.dns.basiczone.updates", "all", "This parameter can take 2 values: all (default) and pod. It defines if DHCP/DNS requests have to be send to all dhcp servers in cloudstack, or only to the one in the same pod", "all,pod"),
|
||||
|
||||
|
|
|
|||
|
|
@ -1226,6 +1226,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
if (domain_suffix != null) {
|
||||
buf.append(" domainsuffix=").append(domain_suffix);
|
||||
}
|
||||
|
||||
|
||||
if (!network.isDefault() && network.getGuestType() == GuestIpType.Direct) {
|
||||
buf.append(" defaultroute=false");
|
||||
|
|
@ -1244,7 +1245,12 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
if (defaultDns2 != null) {
|
||||
buf.append(" dns2=").append(defaultDns2);
|
||||
}
|
||||
|
||||
|
||||
String use_external_dns = _configDao.getValue("use.external.dns");
|
||||
if (use_external_dns!=null && use_external_dns.equals("true")){
|
||||
buf.append(" useextdns=").append(use_external_dns);
|
||||
}
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Boot Args for " + profile + ": " + buf.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-serve
|
|||
INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.auth','admin1:AdMiN123','Load Balancer(haproxy) authetication string in the format username:password');
|
||||
INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.port','8081','Load Balancer(haproxy) stats port number.');
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'use.external.dns', 'false', 'Bypass internal dns, use exetrnal dns1 and dns2');
|
||||
>>>>>>> e7f32ad... bug 10748: use external dns
|
||||
|
|
|
|||
Loading…
Reference in New Issue