You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/02/26 06:59:48 UTC

[GitHub] [cloudstack] bwsw commented on a change in pull request #3839: FEATURE-3823: kvm agent hooks

bwsw commented on a change in pull request #3839: FEATURE-3823: kvm agent hooks
URL: https://github.com/apache/cloudstack/pull/3839#discussion_r384304031
 
 

 ##########
 File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStopCommandWrapper.java
 ##########
 @@ -92,6 +93,13 @@ public Answer execute(final StopCommand command, final LibvirtComputingResource
             libvirtComputingResource.destroyNetworkRulesForVM(conn, vmName);
             final String result = libvirtComputingResource.stopVM(conn, vmName, command.isForceStop());
 
+            try {
+                LibvirtKvmAgentHook onStopHook = libvirtComputingResource.getStopHook();
+                onStopHook.handle(vmName);
+            } catch (Exception e) {
+                s_logger.warn("Exception occured when handling LibVirt VM onStop hook: {}", e);
+            }
 
 Review comment:
   @DaanHoogland I'll handle all your comments tomorrow.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services