GabrielBrascher commented on a change in pull request #3197: Fix XenServer 
Security Groups 'vmops' script
URL: https://github.com/apache/cloudstack/pull/3197#discussion_r262499357
 
 

 ##########
 File path: 
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
 ##########
 @@ -81,6 +81,13 @@ public Answer execute(final MigrateCommand command, final 
CitrixResourceBase cit
                 }
                 citrixResourceBase.migrateVM(conn, dsthost, vm, vmName);
                 vm.setAffinity(conn, dsthost);
+
+                final String result = citrixResourceBase.callHostPlugin(conn, 
"vmops", "destroy_network_rules_for_vm", "vmName", command.getVmName());
+                if (result == null || result.isEmpty() || 
!Boolean.parseBoolean(result)) {
 
 Review comment:
   Good point @rafaelweingartner. I will update to
   
   ```
   if (BooleanUtils.toBoolean(result)) {
       s_logger.debug(String.format("Removed network rules from source host 
[%s] for migrated vm [%s]", dsthost.getHostname(conn), command.getVmName()));
   } else {
       s_logger.warn(String.format("Failed to remove network rules from source 
host [%s] for migrated vm [%s]", dsthost.getHostname(conn), 
command.getVmName()));                
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to