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

    https://github.com/apache/cloudstack/pull/1371#discussion_r62764350
  
    --- Diff: 
engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
 ---
    @@ -1445,28 +1466,31 @@ public void prepareAllNicsForMigration(final 
VirtualMachineProfile vm, final Dep
             Long guestNetworkId = null;
             for (final NicVO nic : nics) {
                 final NetworkVO network = 
_networksDao.findById(nic.getNetworkId());
    -            if(network.getTrafficType().equals(TrafficType.Guest) && 
network.getGuestType().equals(GuestType.Isolated)){
    +            if (network.getTrafficType().equals(TrafficType.Guest) && 
network.getGuestType().equals(GuestType.Isolated)) {
    +
                     guestNetworkId = network.getId();
                 }
                 final Integer networkRate = 
_networkModel.getNetworkRate(network.getId(), vm.getId());
     
                 final NetworkGuru guru = 
AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
                 final NicProfile profile = new NicProfile(nic, network, 
nic.getBroadcastUri(), nic.getIsolationUri(), networkRate,
                         
_networkModel.isSecurityGroupSupportedInNetwork(network), 
_networkModel.getNetworkTag(vm.getHypervisorType(), network));
    -            if(guru instanceof NetworkMigrationResponder){
    -                if(!((NetworkMigrationResponder) 
guru).prepareMigration(profile, network, vm, dest, context)){
    -                    s_logger.error("NetworkGuru "+guru+" 
prepareForMigration failed."); // XXX: Transaction error
    +            if (guru instanceof NetworkMigrationResponder) {
    +                if 
(!((NetworkMigrationResponder)guru).prepareMigration(profile, network, vm, 
dest, context)) {
    +                    s_logger.error("NetworkGuru " + guru + " 
prepareForMigration failed."); // XXX: Transaction error
    --- End diff --
    
    Should this method continue if the ``prepareMigration`` fails?  If not, 
should it simply return or throw an exception?


---
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