bwsw commented on a change in pull request #3839: FEATURE-3823: kvm agent hooks
URL: https://github.com/apache/cloudstack/pull/3839#discussion_r392129113
##########
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 fixed every your notes.
----------------------------------------------------------------
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