Hi,
no need to join hakvm as it does something very simple :
test ping on vm
    exit 1 if ping fails
else
    ssh vm "/usr/sbin/hastatus"
    if hastatus ok
       exit 0
    else
       exit 1
(where hastatus gives a status on the service running inside the vm)
and that'all  !

I'll try to get the log you're asking for, but I've workarounded the
problem by setting a file-flag "vm-running-on-this-node" as soon as
a first ssh vm "hostname" is successful, and if there is not this file-flag
yet on the node, my hakvm returns 0 even if ping fails and even if
ssh vm fails. This way, it works as if the vm was "started" even
it is in fact "starting" , and of course I manage the remove of file-flag
when necessary (stop, migrate, etc.)
It seems to work fine.
Perhaps all this is sufficient as answer to your question Lars and you
don't need log anymore ?

Thanks
Alain
> I can admit that virsh should not return until the vm is really
> > > started and reachable, but I can't change "virsh" ...
>   
> > 
> > Well, virsh is fine, that's how xm create works too. What you can
> > do is add a monitor script (monitor_scripts) as, I think, Florian
> > already suggested. The RA is going to wait then for all the
> > monitor scripts to succeed. Perhaps something like "ssh xen0
> > true" would do.
>   
>
> I think that is what he does already.  And it does not work.  That is
> how this thread started, anyways. Or I am misunderstanding something  :( 
>
> This was the config in the first post:
>
> crm configure primitive vm15  ocf:heartbeat:VirtualDomain \
>       params config="/root/vms/vm15.xml" \
>               monitor_scripts="/usr/sbin/hakvm" force_stop="true"  \
>       meta migration-threshold="1"   \
>       op start on-fail="stop" \
>       op monitor start-delay=120 timeout=120 interval=60
>
> Maybe it is all a misunderstanding?
>
> Alain: can you post your hakvm script, and and example logs from a start
> attempt to the first "monitoring failure"?
>
>   
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to