xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
@ 2015-08-11 20:25 Wei Liu
  2015-08-11 22:07 ` Jim Fehlig
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Liu @ 2015-08-11 20:25 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Jim Fehlig, Wei Liu, ian.campbell

Virsh migrate expects an URI, not a host. We don't actually care what
kind of transport it uses, the main objective is to test migration, so
use xen+ssh for the time being.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
Cc: Jim Fehlig <jfehlig@suse.com>

I once had email exchange with Jim and he said xen+ssh was a commonly
use configuration.

Jim, I hope I got the URI right. The constructed command will be like

   virsh migrate guest xen+ssh://dst-host

.

OSSTest has working ssh setup between src and dst host so I expect this
setup to just work.
---
 Osstest/Toolstack/libvirt.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index bfb5ccb..477ebee 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -108,7 +108,7 @@ sub migrate ($$$$) {
     my $sho = $self->{Host};
     my $dst = $dho->{Name};
     my $gn = $gho->{Name};
-    target_cmd_root($sho, "virsh migrate $gn $dst", $timeout);
+    target_cmd_root($sho, "virsh migrate $gn xen+ssh://$dst", $timeout);
 }
 
 sub save ($$$$) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-11 20:25 [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command Wei Liu
@ 2015-08-11 22:07 ` Jim Fehlig
  2015-08-12 10:05   ` Ian Campbell
  2015-08-12 13:21   ` Ian Campbell
  0 siblings, 2 replies; 8+ messages in thread
From: Jim Fehlig @ 2015-08-11 22:07 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson, ian.campbell

Wei Liu wrote:
> Virsh migrate expects an URI, not a host. We don't actually care what
> kind of transport it uses, the main objective is to test migration, so
> use xen+ssh for the time being.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
> Cc: Jim Fehlig <jfehlig@suse.com>
>
> I once had email exchange with Jim and he said xen+ssh was a commonly
> use configuration.
>
> Jim, I hope I got the URI right. The constructed command will be like
>
>    virsh migrate guest xen+ssh://dst-host
>   

Yes, that is correct. Note you will need a '--live' option if live
migration is what you are after

  virsh migrate --live guest xen+ssh://dst-host

Regards,
Jim
> .
>
> OSSTest has working ssh setup between src and dst host so I expect this
> setup to just work.
> ---
>  Osstest/Toolstack/libvirt.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> index bfb5ccb..477ebee 100644
> --- a/Osstest/Toolstack/libvirt.pm
> +++ b/Osstest/Toolstack/libvirt.pm
> @@ -108,7 +108,7 @@ sub migrate ($$$$) {
>      my $sho = $self->{Host};
>      my $dst = $dho->{Name};
>      my $gn = $gho->{Name};
> -    target_cmd_root($sho, "virsh migrate $gn $dst", $timeout);
> +    target_cmd_root($sho, "virsh migrate $gn xen+ssh://$dst", $timeout);
>  }
>  
>  sub save ($$$$) {
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-11 22:07 ` Jim Fehlig
@ 2015-08-12 10:05   ` Ian Campbell
  2015-08-12 10:17     ` Ian Campbell
  2015-08-12 13:21   ` Ian Campbell
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2015-08-12 10:05 UTC (permalink / raw)
  To: Jim Fehlig, Wei Liu; +Cc: Xen-devel, ian.jackson

On Tue, 2015-08-11 at 16:07 -0600, Jim Fehlig wrote:
> Wei Liu wrote:
> > Virsh migrate expects an URI, not a host. We don't actually care what
> > kind of transport it uses, the main objective is to test migration, so
> > use xen+ssh for the time being.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > ---
> > Cc: Jim Fehlig <jfehlig@suse.com>
> > 
> > I once had email exchange with Jim and he said xen+ssh was a commonly
> > use configuration.
> > 
> > Jim, I hope I got the URI right. The constructed command will be like
> > 
> >    virsh migrate guest xen+ssh://dst-host
> >   
> 
> Yes, that is correct. Note you will need a '--live' option if live
> migration is what you are after
> 
>   virsh migrate --live guest xen+ssh://dst-host

I think we probably do want live (xl does it by default).

I suggest we also do
    my $duri = "xen+ssh://$dst";
else the line is probably going to get a bit long.

So I propose to fold in this:

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 477ebee..776432d 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -108,7 +108,8 @@ sub migrate ($$$$) {
     my $sho = $self->{Host};
     my $dst = $dho->{Name};
     my $gn = $gho->{Name};
-    target_cmd_root($sho, "virsh migrate $gn xen+ssh://$dst", $timeout);
+    my $duri = "xen+ssh://$dst";
+    target_cmd_root($sho, "virsh migrate --live $gn $duri", $timeout);
 }
 
 sub save ($$$$) {

Ian.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-12 10:05   ` Ian Campbell
@ 2015-08-12 10:17     ` Ian Campbell
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Campbell @ 2015-08-12 10:17 UTC (permalink / raw)
  To: Jim Fehlig, Wei Liu; +Cc: Xen-devel, ian.jackson

On Wed, 2015-08-12 at 11:05 +0100, Ian Campbell wrote:
> On Tue, 2015-08-11 at 16:07 -0600, Jim Fehlig wrote:
> > Wei Liu wrote:
> > > Virsh migrate expects an URI, not a host. We don't actually care what
> > > kind of transport it uses, the main objective is to test migration, 
> > > so
> > > use xen+ssh for the time being.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > > ---
> > > Cc: Jim Fehlig <jfehlig@suse.com>
> > > 
> > > I once had email exchange with Jim and he said xen+ssh was a commonly
> > > use configuration.
> > > 
> > > Jim, I hope I got the URI right. The constructed command will be like
> > > 
> > >    virsh migrate guest xen+ssh://dst-host
> > >   
> > 
> > Yes, that is correct. Note you will need a '--live' option if live
> > migration is what you are after
> > 
> >   virsh migrate --live guest xen+ssh://dst-host
> 
> I think we probably do want live (xl does it by default).
> 
> I suggest we also do
>     my $duri = "xen+ssh://$dst";
> else the line is probably going to get a bit long.
> 
> So I propose to fold in this:

Ian agreed to this on IRC so I've pushed that to pretest. Full patch:

>From d042454d2474e0af7349838ee22131527f1208ff Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@citrix.com>
Date: Tue, 11 Aug 2015 21:25:09 +0100
Subject: [PATCH] Toolstack/libvirt: use URI in migration command

Virsh migrate expects an URI, not a host. We don't actually care what
kind of transport it uses, the main objective is to test migration, so
use xen+ssh for the time being.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- added --live and factored out $duri ]
---
 Osstest/Toolstack/libvirt.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index bfb5ccb..776432d 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -108,7 +108,8 @@ sub migrate ($$$$) {
     my $sho = $self->{Host};
     my $dst = $dho->{Name};
     my $gn = $gho->{Name};
-    target_cmd_root($sho, "virsh migrate $gn $dst", $timeout);
+    my $duri = "xen+ssh://$dst";
+    target_cmd_root($sho, "virsh migrate --live $gn $duri", $timeout);
 }
 
 sub save ($$$$) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-11 22:07 ` Jim Fehlig
  2015-08-12 10:05   ` Ian Campbell
@ 2015-08-12 13:21   ` Ian Campbell
  2015-08-12 15:08     ` Jim Fehlig
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2015-08-12 13:21 UTC (permalink / raw)
  To: Jim Fehlig, Wei Liu; +Cc: Xen-devel, ian.jackson

On Tue, 2015-08-11 at 16:07 -0600, Jim Fehlig wrote:
> Wei Liu wrote:
> > Virsh migrate expects an URI, not a host. We don't actually care what
> > kind of transport it uses, the main objective is to test migration, so
> > use xen+ssh for the time being.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > ---
> > Cc: Jim Fehlig <jfehlig@suse.com>
> > 
> > I once had email exchange with Jim and he said xen+ssh was a commonly
> > use configuration.
> > 
> > Jim, I hope I got the URI right. The constructed command will be like
> > 
> >    virsh migrate guest xen+ssh://dst-host
> >   
> 
> Yes, that is correct. Note you will need a '--live' option if live
> migration is what you are after
> 
>   virsh migrate --live guest xen+ssh://dst-host

As well as pushing to pretest I also kicked off a quicker local run, which
is at http://xenbits.xen.org/people/ianc/tmp/37824/ .

http://xenbits.xen.org/people/ianc/tmp/37824/test-amd64-amd64-libvirt
-pair/info.html shows this in the log for 21.ts-migrate-log.log:

    2015-08-12 11:22:47 Z executing ssh ... root@10.80.229.144 virsh migrate --live debian.guest.osstest xen+ssh    ://lace-bug
    error: End of file while reading data: nc: invalid option -- 'U'
    nc -h for help: Input/output error

I've no idea how or why nc is involved, but it seems it doesn't like Debian
Wheezy's implementation?

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-12 13:21   ` Ian Campbell
@ 2015-08-12 15:08     ` Jim Fehlig
  2015-08-12 15:25       ` Ian Campbell
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Fehlig @ 2015-08-12 15:08 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

Ian Campbell wrote:
> On Tue, 2015-08-11 at 16:07 -0600, Jim Fehlig wrote:
>   
>> Wei Liu wrote:
>>     
>>> Virsh migrate expects an URI, not a host. We don't actually care what
>>> kind of transport it uses, the main objective is to test migration, so
>>> use xen+ssh for the time being.
>>>
>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>>> Cc: Ian Campbell <ian.campbell@citrix.com>
>>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>>> ---
>>> Cc: Jim Fehlig <jfehlig@suse.com>
>>>
>>> I once had email exchange with Jim and he said xen+ssh was a commonly
>>> use configuration.
>>>
>>> Jim, I hope I got the URI right. The constructed command will be like
>>>
>>>    virsh migrate guest xen+ssh://dst-host
>>>   
>>>       
>> Yes, that is correct. Note you will need a '--live' option if live
>> migration is what you are after
>>
>>   virsh migrate --live guest xen+ssh://dst-host
>>     
>
> As well as pushing to pretest I also kicked off a quicker local run, which
> is at http://xenbits.xen.org/people/ianc/tmp/37824/ .
>
> http://xenbits.xen.org/people/ianc/tmp/37824/test-amd64-amd64-libvirt
> -pair/info.html shows this in the log for 21.ts-migrate-log.log:
>
>     2015-08-12 11:22:47 Z executing ssh ... root@10.80.229.144 virsh migrate --live debian.guest.osstest xen+ssh    ://lace-bug
>     error: End of file while reading data: nc: invalid option -- 'U'
>     nc -h for help: Input/output error
>
> I've no idea how or why nc is involved, but it seems it doesn't like Debian
> Wheezy's implementation?
>   

nc is used to relay connections on the ssh tunnel to libvirtd's unix
domain socket. Is there a netcat-openbsd package? I recall seeing this
long ago, perhaps from this old bug report

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348564

Regards,
Jim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-12 15:08     ` Jim Fehlig
@ 2015-08-12 15:25       ` Ian Campbell
  2015-08-12 15:42         ` Ian Jackson
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2015-08-12 15:25 UTC (permalink / raw)
  To: Jim Fehlig; +Cc: Xen-devel, Wei Liu, ian.jackson

On Wed, 2015-08-12 at 09:08 -0600, Jim Fehlig wrote:
> nc is used to relay connections on the ssh tunnel to libvirtd's unix
> domain socket. Is there a netcat-openbsd package?

Yes there is. It even seems to have higher priority if installed, but it is
not in the default package set.

Sounds like we should just add it to the list of packages which we install
either at host install time or as part of preparing a host for use. I'm
inclined just to add it at install time, Ian?

>  I recall seeing this
> long ago, perhaps from this old bug report
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348564
> 
> Regards,
> Jim
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command
  2015-08-12 15:25       ` Ian Campbell
@ 2015-08-12 15:42         ` Ian Jackson
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2015-08-12 15:42 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Jim Fehlig, Wei Liu

Ian Campbell writes ("Re: [Xen-devel] [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command"):
> Sounds like we should just add it to the list of packages which we install
> either at host install time or as part of preparing a host for use. I'm
> inclined just to add it at install time, Ian?

Fine by me.  I think it should go in ts-xen-install, probably.

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-12 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 20:25 [PATCH OSSTEST] Toolstack/libvirt: use URI in migration command Wei Liu
2015-08-11 22:07 ` Jim Fehlig
2015-08-12 10:05   ` Ian Campbell
2015-08-12 10:17     ` Ian Campbell
2015-08-12 13:21   ` Ian Campbell
2015-08-12 15:08     ` Jim Fehlig
2015-08-12 15:25       ` Ian Campbell
2015-08-12 15:42         ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).