Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On 07/19/2011 06:23 AM, Daniel P. Berrange wrote: Basically, virsh shouldn't make any assumptions based on the current way things are implemented in libvirtd, since it cannot expect to be running against a matching version. Old virsh should work against new libvirtd, and vica-verca. This is the same case as the checking of flags in src/libvirt.c vs the individual drivers. Fair enough, commit 40143fb6 is now reverted. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On Tue, Jul 19, 2011 at 06:19:13AM -0600, Eric Blake wrote: > On 07/19/2011 03:23 AM, Daniel P. Berrange wrote: > >On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: > >>On 07/18/2011 04:11 AM, Osier Yang wrote: > >>>于 2011年07月18日 10:07, zhang xintao 写道: > Dear All > I try to migration a kvm guest os to another host failed > server: ubuntu 11.04 server > virsh:migrate --live --tunnelled vm1 qemu+ssh://192.168.10.3/system > error:Requested operation is not valid:cannot perform > tunnelled migration without using peer2peer flag > >>> > >>>The error tells you all, you need to use "--p2p". > >> > >>That said, why can't virsh be smarter, and automatically request the > >>right underlying flags without making the user also type --p2p? Any > >>problems with this patch? > > > >It was done to leave open the possibility of supporting a > >TUNNELLED mode, which was independant of P2P mode in the > >future. It isn't entirely likely, but I didn't want to lock > >ourselves out of it with this kind of patch > > But if we ever reach that point, could we then revert this patch at > that time, to where the user once again has to tell virsh both --p2p > and --tunnelled? Or would such a change be considered a regression > in behavior at that time for existing scripts that were foolishly > relying on the UI shortcut, and hence virsh should never learn the > UI shortcut in the first place? If the latter, then we should > revert the patch that just went in so that 0.9.4 doesn't lock us > into causing a future regression. It would be a regression, but also it would mean old virsh releases would not be able to operate against new libvirtd releases. Basically, virsh shouldn't make any assumptions based on the current way things are implemented in libvirtd, since it cannot expect to be running against a matching version. Old virsh should work against new libvirtd, and vica-verca. This is the same case as the checking of flags in src/libvirt.c vs the individual drivers. Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On 07/19/2011 03:23 AM, Daniel P. Berrange wrote: On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: On 07/18/2011 04:11 AM, Osier Yang wrote: 于 2011年07月18日 10:07, zhang xintao 写道: Dear All I try to migration a kvm guest os to another host failed server: ubuntu 11.04 server virsh:migrate --live --tunnelled vm1 qemu+ssh://192.168.10.3/system error:Requested operation is not valid:cannot perform tunnelled migration without using peer2peer flag The error tells you all, you need to use "--p2p". That said, why can't virsh be smarter, and automatically request the right underlying flags without making the user also type --p2p? Any problems with this patch? It was done to leave open the possibility of supporting a TUNNELLED mode, which was independant of P2P mode in the future. It isn't entirely likely, but I didn't want to lock ourselves out of it with this kind of patch But if we ever reach that point, could we then revert this patch at that time, to where the user once again has to tell virsh both --p2p and --tunnelled? Or would such a change be considered a regression in behavior at that time for existing scripts that were foolishly relying on the UI shortcut, and hence virsh should never learn the UI shortcut in the first place? If the latter, then we should revert the patch that just went in so that 0.9.4 doesn't lock us into causing a future regression. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: > On 07/18/2011 04:11 AM, Osier Yang wrote: > >于 2011年07月18日 10:07, zhang xintao 写道: > >>Dear All > >>I try to migration a kvm guest os to another host failed > >>server: ubuntu 11.04 server > >>virsh:migrate --live --tunnelled vm1 qemu+ssh://192.168.10.3/system > >>error:Requested operation is not valid:cannot perform > >>tunnelled migration without using peer2peer flag > > > >The error tells you all, you need to use "--p2p". > > That said, why can't virsh be smarter, and automatically request the > right underlying flags without making the user also type --p2p? Any > problems with this patch? It was done to leave open the possibility of supporting a TUNNELLED mode, which was independant of P2P mode in the future. It isn't entirely likely, but I didn't want to lock ourselves out of it with this kind of patch Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On 07/18/2011 03:17 PM, Jiri Denemark wrote: That said, why can't virsh be smarter, and automatically request the right underlying flags without making the user also type --p2p? Any problems with this patch? No problem at all, I think it's a very good idea. From db318d41c2a70189c21303c824aa4a862815874a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 18 Jul 2011 13:10:29 -0600 Subject: [PATCH] virsh: make migrate --tunnelled imply --p2p We can make the virsh migrate UI friendlier by supplying the missing bit automatically instead of erroring out when requesting --tunnelled without --p2p. * tools/virsh.c (doMigrate): Make --p2p optional when using --tunnelled. * tools/virsh.pod (migrate): Tweak wording accordingly. --- tools/virsh.c |2 +- tools/virsh.pod |5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) So, here is my ACK Pushed. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On Mon, Jul 18, 2011 at 13:11:42 -0600, Eric Blake wrote: > On 07/18/2011 04:11 AM, Osier Yang wrote: > > 于 2011年07月18日 10:07, zhang xintao 写道: > >> Dear All > >> I try to migration a kvm guest os to another host failed > >> server: ubuntu 11.04 server > >> virsh:migrate --live --tunnelled vm1 qemu+ssh://192.168.10.3/system > >> error:Requested operation is not valid:cannot perform > >> tunnelled migration without using peer2peer flag > > > > The error tells you all, you need to use "--p2p". > > That said, why can't virsh be smarter, and automatically request the > right underlying flags without making the user also type --p2p? Any > problems with this patch? No problem at all, I think it's a very good idea. > From db318d41c2a70189c21303c824aa4a862815874a Mon Sep 17 00:00:00 2001 > From: Eric Blake > Date: Mon, 18 Jul 2011 13:10:29 -0600 > Subject: [PATCH] virsh: make migrate --tunnelled imply --p2p > > We can make the virsh migrate UI friendlier by supplying the > missing bit automatically instead of erroring out when requesting > --tunnelled without --p2p. > > * tools/virsh.c (doMigrate): Make --p2p optional when using > --tunnelled. > * tools/virsh.pod (migrate): Tweak wording accordingly. > --- > tools/virsh.c |2 +- > tools/virsh.pod |5 +++-- > 2 files changed, 4 insertions(+), 3 deletions(-) So, here is my ACK Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag
On 07/18/2011 04:11 AM, Osier Yang wrote: 于 2011年07月18日 10:07, zhang xintao 写道: Dear All I try to migration a kvm guest os to another host failed server: ubuntu 11.04 server virsh:migrate --live --tunnelled vm1 qemu+ssh://192.168.10.3/system error:Requested operation is not valid:cannot perform tunnelled migration without using peer2peer flag The error tells you all, you need to use "--p2p". That said, why can't virsh be smarter, and automatically request the right underlying flags without making the user also type --p2p? Any problems with this patch? From db318d41c2a70189c21303c824aa4a862815874a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 18 Jul 2011 13:10:29 -0600 Subject: [PATCH] virsh: make migrate --tunnelled imply --p2p We can make the virsh migrate UI friendlier by supplying the missing bit automatically instead of erroring out when requesting --tunnelled without --p2p. * tools/virsh.c (doMigrate): Make --p2p optional when using --tunnelled. * tools/virsh.pod (migrate): Tweak wording accordingly. --- tools/virsh.c |2 +- tools/virsh.pod |5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 6c8032f..05aeb6c 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -4475,7 +4475,7 @@ doMigrate (void *opaque) if (vshCommandOptBool (cmd, "p2p")) flags |= VIR_MIGRATE_PEER2PEER; if (vshCommandOptBool (cmd, "tunnelled")) -flags |= VIR_MIGRATE_TUNNELLED; +flags |= VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER; if (vshCommandOptBool (cmd, "persistent")) flags |= VIR_MIGRATE_PERSIST_DEST; diff --git a/tools/virsh.pod b/tools/virsh.pod index e156232..e0adc31 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -534,14 +534,15 @@ Provide the maximum number of virtual CPUs supported for a guest VM on this connection. If provided, the I parameter must be a valid type attribute for the element of XML. -=item B [I<--live>] [I<--direct>] [I<--p2p> [I<--tunnelled>]] +=item B [I<--live>] [I<--direct>] [I<--p2p>] [I<--tunnelled>] [I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>] [I<--copy-storage-inc>] [I<--verbose>] I I [I] [I] [I<--timeout> B] Migrate domain to another host. Add I<--live> for live migration; I<--p2p> for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled> -for tunnelled migration. I<--persistent> leaves the domain persistent on +for tunnelled migration (I<--tunnelled> implies I<--p2p>). I<--persistent> +leaves the domain persistent on destination host, I<--undefinesource> undefines the domain on the source host, and I<--suspend> leaves the domain paused on the destination host. I<--copy-storage-all> indicates migration with non-shared storage with full -- 1.7.4.4 -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list