Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1371#discussion_r62779378
  
    --- Diff: 
engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
 ---
    @@ -1476,22 +1500,22 @@ public void prepareAllNicsForMigration(final 
VirtualMachineProfile vm, final Dep
             }
     
             final List<String> addedURIs = new ArrayList<String>();
    -        if(guestNetworkId != null){
    +        if (guestNetworkId != null) {
                 final List<IPAddressVO> publicIps = 
_ipAddressDao.listByAssociatedNetwork(guestNetworkId, null);
    -            for (final IPAddressVO userIp : publicIps){
    +            for (final IPAddressVO userIp : publicIps) {
                     final PublicIp publicIp = 
PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId()));
                     final URI broadcastUri = 
BroadcastDomainType.Vlan.toUri(publicIp.getVlanTag());
                     final long ntwkId = publicIp.getNetworkId();
    -                final Nic nic = 
_nicDao.findByNetworkIdInstanceIdAndBroadcastUri(ntwkId, vm.getId(),
    -                        broadcastUri.toString());
    -                if(nic == null && 
!addedURIs.contains(broadcastUri.toString())){
    +                final Nic nic = 
_nicDao.findByNetworkIdInstanceIdAndBroadcastUri(ntwkId, vm.getId(), 
broadcastUri.toString());
    +                if (nic == null && 
!addedURIs.contains(broadcastUri.toString())) {
                         //Nic details are not available in DB
                         //Create nic profile for migration
    -                    s_logger.debug("Creating nic profile for migration. 
BroadcastUri: "+broadcastUri.toString()+" NetworkId: "+ntwkId+" Vm: 
"+vm.getId());
    +                    s_logger.debug("Creating nic profile for migration. 
BroadcastUri: " + broadcastUri.toString() + " NetworkId: " + ntwkId + " Vm: " + 
vm.getId());
    --- End diff --
    
    Wrap this statement in a ``s_logger.isDebugEnabled`` call to avoid 
unnecessary string creation when ``DEBUG`` logging is not enabled.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to