[Pacemaker] A bug in stonith external/libvirt

Owen Le Blanc LeBlanc at man.ac.uk
Fri Aug 31 09:06:01 EDT 2012


On Fri, Aug 31, 2012 at 01:27:26PM +0200, Dejan Muhamedagic wrote:
> That's most probably not relevant to the stonith agent. You need
> to figure out how to connect to the hypervisor using virsh, then
> just use that. IIRC, if you want to use ssh, it should be sth
> like qemu+ssh. But I'm sure there's enough documentation about it
> out there.

Actually, this is my original question.  The interactive command works
as it should:

client2 13:43:54 > virsh -c 'xen+ssh://client1@server1.mc.man.ac.uk/?keyfile=/ro
ot/.ssh/id_dsa' version
Compiled against library: libvir 0.9.12
Using library: libvir 0.9.12
Using API: Xen 0.9.12
Running hypervisor: Xen 4.1.0

But it fails when I put the same values into the stonith agent:

client2 14:02:35 > sh -x /usr/lib/stonith/plugins/external/libvirt status
+ unset SSH_AUTH_SOCK
++ echo client1
++ sed -e 's/,/ /g'
+ hostlist=client1
+ case $1 in
+ libvirt_check_config
++ which virsh
+ VIRSH=/usr/bin/virsh
+ '[' '!' -x /usr/bin/virsh ']'
+ '[' -z client1 -o -z 'xen://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile
=/root/.ssh/id_dsa' ']'
+ libvirt_status
++ /usr/bin/virsh -c 'xen://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile=/
root/.ssh/id_dsa' version
+ out='error: internal error unexpected Xen URI path '\''/usr/bin/virsh'\'', try
 xen:///
error: failed to connect to the hypervisor'
+ '[' 1 -eq 0 ']'

and so on.  The problem appears to be that the same command in the
stonith agent does not work as it does in a shell, and this suggests a
flaw in the way the environment is being handled; that is, a bug in
the stonith agent.

     -- Owen




More information about the Pacemaker mailing list