824e3e07e3
avoid storm of virsh list that overloads libvirtd API causing unnecessary timeouts during pcmk monitoring operations. Resolves: https://github.com/ClusterLabs/anvil/issues/395 Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
11 lines
116 B
Bash
Executable File
11 lines
116 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
(
|
|
if [ "$1" != "list" ]; then
|
|
virsh $@
|
|
exit $?
|
|
fi
|
|
flock -e 200
|
|
virsh $@
|
|
) 200>/tmp/virsh.lock
|