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

Re: [Xen-devel] [OSSTEST Nested PATCH v11 6/7] Compose the main recipe of nested test job



> -----Original Message-----
> From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx]
> Sent: Thursday, June 25, 2015 6:22 PM
> To: Pang, LongtaoX
> Cc: Ian Campbell; Hu, Robert; xen-devel@xxxxxxxxxxxxx; wei.liu2@xxxxxxxxxx
> Subject: RE: [OSSTEST Nested PATCH v11 6/7] Compose the main recipe of
> nested test job
> 
> Pang, LongtaoX writes ("RE: [OSSTEST Nested PATCH v11 6/7] Compose the
> main recipe of nested test job"):
> > > -----Original Message-----
> > > From: Ian Campbell [mailto:ian.campbell@xxxxxxxxxx]
> ...
> > > I think you are correct, the logs capture will fail too.
> > >
> > > I'll leave it to Ian to suggest a solution since it will no doubt
> > > involve some tcl plumbing (I'd be inclined to record 'hosts which are
> > > actually guests' somewhere and have the infra clean them up
> > > automatically after doing leak check and log collection).
> 
> Sorry I haven't done this yet, it's still on my radar.
> 
> > > I was thinking more along the lines of creating Osstest/PDU/guest.pm
> > > with the appropriate methods calling out to toolstack($l0)->foo, setting
> > > $ho->{Power} = 'guest $l1guestname' somewhere and allowing
> > > power_cycle_host_setup to do it's thing.
> >
> > I have reviewed power_cycle_host_setup function, inside this
> > function will call get_host_method_object, then we could get a $mo
> > which will be assigned to $ho->{PowerMethobjs}, right?  Inside
> > power_state function, it will call pdu_power_state which is defined
> > in guest.pm, right?
> 
> Yes.
I'm not quite sure about how @$methobjs is obtained.
sub power_cycle_host_setup ($) {
    my ($ho) = @_;
    my $methobjs = [ ];
    foreach my $meth (split /\;\s*/, $ho->{Power}) {
        push @$methobjs, get_host_method_object($ho,'PDU',$meth);
    }
    $ho->{PowerMethobjs} = $methobjs;
}
Seems it is derived from $ho->{Power} while $ho->{Power} is defined by either:
1. selecthost()
        $ho->{Power}= get_host_property($ho,'power-method');
2. default_methods()
        $ho->{Power} ||= "statedb $ho->{Asset}";
  Seems no statedb for standalone mode.

So how shall I assign $ho->{Power} method? by statically through config file?
or some generic way automatically identify $host is some guest, therefore
assign 'guest' to $ho->{Power}?
Would you give me some idea? thanks.
> 
> > So, I need to defined how to power off/on L1 inside pdu_power_state
> > function? I think we need to using 'xl destroy' and 'xl create'
> > command to implement the power method.
> 
> Indeed.  You'll need to use the appropriate toolstack object, in case
> it's libvirt or something.  toolstack($ho) where $ho is the L0.
> 
> Ian.

_______________________________________________
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®.