Rohit Yadav 425ad495b1
kvm: fix qemu hook race condition (#3405)
This fixes the qemu hooks `mkdir` race condition which can happen when
too many VMs may launch on a KVM host executing the hooks script that
tries to `mkdir` for the custom directory. On exception (multiple scripts
trying to mkdir), the VM stops.

The custom directory need not be created if it does not exist, instead
the custom hooks should only execute when there is a custom directory.

Feature documentation:
http://docs.cloudstack.apache.org/en/4.11.2.0/adminguide/hosts.html#kvm-libvirt-hook-script-include

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-06-14 12:55:04 +05:30
..