
m.richardson at ed
Nov 22, 2011, 9:08 AM
Views: 105
Permalink
|
|
Patches to Virtualdomain RA
|
|
I've recently discovered some issues with the VirtualDomain RA if 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 pacemaker. 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. Matthew -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
|