vpc: dnsmasq is not started if use.external.dns is true (#4806)

* vpc: dnsmasq is not started if use.external.dns is true

* Revert "vpc: dnsmasq is not started if use.external.dns is true"

This reverts commit ee58fe0787.

* #4806 vpc: fix zone dns1/dns2 are missing in vpc VR when restart vpc or vpc VR
This commit is contained in:
Wei Zhou 2021-03-24 07:42:33 +01:00 committed by GitHub
parent bd79e1a9d4
commit 40d93af16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -1008,8 +1008,17 @@ public class CommandSetupHelper {
final boolean setupDns = dnsProvided || dhcpProvided;
if (setupDns) {
defaultDns1 = guestNic.getIPv4Dns1();
defaultDns2 = guestNic.getIPv4Dns2();
final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());
if (guestNic.getIPv4Dns1() != null) {
defaultDns1 = guestNic.getIPv4Dns1();
} else {
defaultDns1 = dcVo.getDns1();
}
if (guestNic.getIPv4Dns2() != null) {
defaultDns2 = guestNic.getIPv4Dns2();
} else {
defaultDns2 = dcVo.getDns2();
}
}
final Nic nic = _nicDao.findByNtwkIdAndInstanceId(network.getId(), router.getId());