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>main
parent
fc75bda6ef
commit
824e3e07e3
3 changed files with 13 additions and 4 deletions
@ -0,0 +1,10 @@ |
||||
#!/bin/sh -e |
||||
|
||||
( |
||||
if [ "$1" != "list" ]; then |
||||
virsh $@ |
||||
exit $? |
||||
fi |
||||
flock -e 200 |
||||
virsh $@ |
||||
) 200>/tmp/virsh.lock |
Loading…
Reference in new issue