m.richardson at ed
Nov 22, 2011, 9:08 AM
Post #1 of 1
I've recently discovered some issues with the VirtualDomain RA if
Patches to Virtualdomain RA
libvitd isn't running - the script makes several calls to virsh, all of
which will fail if the daemon isn't listening. This can be a common
occurrence during probes, depending on how/when libvirtd is started in
I've tried to code round this with the following patches, though I'd
appreciate some comments on whether or not this is 'the right way to do it.'
There are 3 major changes:
The first one is to try to avoid running virsh to determine a default
for the 'hypervisor' param if its already set - though this just moves
the problem. (This might also not be the 'best' way of implementing this
if test, but I didn't want to start fiddling with the code too much).
The second is to expect failures from virsh for probes in the Status
function and handle them cleanly.
The third is to just assume here that all probes will fail, rather than
test for certain cases in which probes are known to possibly fail - my
logic is that if its safe to fail for one situation, its probably safe
to just always fail.
Comments, changes etc appreciated.
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.