[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST] libvirt: Pass correct arguments to virsh migrate



On Wed, 2015-08-05 at 13:43 +0100, Wei Liu wrote:
> On Wed, Aug 05, 2015 at 01:42:19PM +0100, Ian Campbell wrote:
> > $dst is a host hash/object, resulting in:
> > 
> > 2015-08-04 22:35:25 Z executing ssh ... root@xxxxxxxxxxxxx virsh
> > migrate debian.guest.osstest HASH(0x28f4310)
> > bash: -c: line 0: syntax error near unexpected token `('
> > bash: -c: line 0: `virsh migrate debian.guest.osstest HASH(0x28f4310)'
> > 
> > Switch to using the same pattern as xl.pm, which is to call the
> > argument (containing the host hash) $dho and for $dst to be a local
> > variable containing $dho->{Name}.
> > 
> > Also s/$ho/$sho/ to match xl.pm, since I think that is clearer about
> > what role everything has.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > ---
> >  Osstest/Toolstack/libvirt.pm | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Osstest/Toolstack/libvirt.pm 
> > b/Osstest/Toolstack/libvirt.pm
> > index 32dca84..e2d646c 100644
> > --- a/Osstest/Toolstack/libvirt.pm
> > +++ b/Osstest/Toolstack/libvirt.pm
> > @@ -104,10 +104,11 @@ sub saverestore_check ($) {
> >  }
> >  
> >  sub migrate ($) {
> 
> sub migrate ($$$$) ?

I think so, I wonder why Perl wasn't complaining about that...

I'll respin.

> 
> > -    my ($self,$gho,$dst,$timeout) = @_;
> > -    my $ho = $self->{Host};
> > +    my ($self,$gho,$dho,$timeout) = @_;
> > +    my $sho = $self->{Host};
> > +    my $dst = $dho->{Name};
> >      my $gn = $gho->{Name};
> > -    target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
> > +    target_cmd_root($sho, "virsh migrate $gn $dst", $timeout);
> >  }
> >  
> >  sub save ($$$$) {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.