nvazquez commented on code in PR #6425:
URL: https://github.com/apache/cloudstack/pull/6425#discussion_r901765986


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java:
##########
@@ -422,6 +423,38 @@ public void setDhcpProviders(final 
List<DhcpServiceProvider> dhcpProviders) {
 
     HashMap<Long, Long> _lastNetworkIdsToFree = new HashMap<Long, Long>();
 
+    private void updateRouterDefaultDns(final VirtualMachineProfile vmProfile, 
final NicProfile nicProfile) {
+        if (!Type.DomainRouter.equals(vmProfile.getType()) || 
!nicProfile.isDefaultNic()) {
+            return;
+        }
+        DomainRouterVO router = routerDao.findById(vmProfile.getId());
+        if (router != null && router.getVpcId() != null) {
+            final Vpc vpc = _vpcMgr.getActiveVpc(router.getVpcId());
+            if (StringUtils.isNotBlank(vpc.getDns1())) {
+                nicProfile.setIPv4Dns1(vpc.getDns1());
+                nicProfile.setIPv4Dns2(vpc.getDns2());

Review Comment:
   Do we need to check for dns2 not blank in this case and all the cases below?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to