[libvirt] [PATCH] virsh: use keepalive protocol in virsh for migration

Jiri Denemark jdenemar at redhat.com
Mon Jun 4 15:04:30 UTC 2012


On Mon, Jun 04, 2012 at 22:41:00 +0800, Guannan Ren wrote:
> On 06/04/2012 10:13 PM, Jiri Denemark wrote:
> > On Mon, Jun 04, 2012 at 21:51:02 +0800, Guannan Ren wrote:
> >> Bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=822839
> >> For non-p2p migration, if the network is down in the process of migrate,
> >> The virsh client will hang up for a fair long time. The patch will add
> >> keepalive into virsh to determine the status of network connection with
> >> remote libvirtd, aboring migration job after 30 seconds later since
> >> disconnection.
> > This turns on keepalive only for the connection to destination daemon during
> > migrations. I think we want to use keepalive for every connection open by
> > virsh, i.e., even for the main one. And even more importantly, we don't want
> > to hardcode keepalive parameters, users should be able to set them using virsh
> > command line options.
> >
> > Jirka
> 
>        I consider the keepalive parameters as one of the options to 
> migrate command.
>        There are two reasons I choose hardcode value.
>        one is that the newly-added option works only for non-p2p migrate.

I think they should be general virsh options similar to -c and they should be
applied to any connection virsh makes. Applying them only to migration doesn't
make much sense. Any libvirt daemon can hang or lose network connection, it's
not in any way to daemons that serve as destination during non-p2p migrations.

>        two is that based on my testing, if the network disconnection 
> time exceeds 30 seconds.
>        the migration will fail even though we recover the network 
> service. I think 30 seconds
>        is enough amount of time.

Yes, it can be a good default value. Did you try increasing the keepalive
timeout on destination deamon (/etc/libvirt/libvirtd.conf) too? Anyway, as
with any timeout, no matter what value we choose someone will need to increase
it :-)

Jirka




More information about the libvir-list mailing list