[Pacemaker] A bug in stonith external/libvirt

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Aug 31 11:27:26 UTC 2012


On Fri, Aug 31, 2012 at 10:04:02AM +0100, Owen Le Blanc wrote:
> On Thu, Aug 30, 2012 at 04:46:27PM +0200, Dejan Muhamedagic wrote:
> > Perhaps too many quotes. Did you try:
> >
> > export hostlist="client1" hypervisor_uri="xen+ssh://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile=/root/.ssh/id_dsa"
> 
> Well, this does make a difference:
> 
> 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+ssh://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile=/root/.ssh/id_dsa'
> ']'
> + libvirt_status
> ++ /usr/bin/virsh -c
> 'xen+ssh://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 ']'
> + ha_log.sh err 'Failed to get status for
> xen+ssh://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile=/root/.ssh/id_dsa'
> ERROR: Failed to get status for
> xen+ssh://client1@server1.mc.man.ac.uk/usr/bin/virsh?keyfile=/root/.ssh/id_dsa
> + ha_log.sh err 'error: internal error unexpected Xen URI path
> '\''/usr/bin/virsh'\'', try xen:///
> error: failed to connect to the hypervisor'
> ERROR: error: internal error unexpected Xen URI path '/usr/bin/virsh',
> try xen:///
> error: failed to connect to the hypervisor
> + return 1
> + exit 1
> 
> But if I follow the suggestion here and omit '+ssh', it doesn't work either.

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.

Thanks,

Dejan

>      -- Owen
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Pacemaker mailing list