From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hu Subject: Re: [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job Date: Fri, 24 Apr 2015 14:31:48 +0800 Message-ID: <1429857108.31307.53.camel@localhost> References: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> <1428959990-24199-7-git-send-email-longtaox.pang@intel.com> <1429613324.4743.44.camel@citrix.com> <86C3224E41A7434B904EC364302132D80E49863A@SHSMSX101.ccr.corp.intel.com> <1429700681.6604.20.camel@citrix.com> <1429701825.6604.27.camel@citrix.com> <86C3224E41A7434B904EC364302132D80E498D3E@SHSMSX101.ccr.corp.intel.com> <21816.53761.60014.705124@mariner.uk.xensource.com> Reply-To: robert.hu@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21816.53761.60014.705124@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: "Hu, Robert" , "Pang, LongtaoX" , "wei.liu2@citrix.com" , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-04-23 at 12:05 +0100, Ian Jackson wrote: > Pang, LongtaoX writes ("RE: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job"): > > Ian Campbell [mailto:ian.campbell@citrix.com]: > > > The arguments passed to ts-* in sg-run-job should _always_ be just a > > > bare indent. The ident=foo thing is a special case for standalone mode. > > > > > Do you means that the parameter passed to ts-* in sg-run-job should _always_ be just a bare ident? > > Yes, that's what Ian means. > > > If yes. I think it needs to pass l1's '$gn' which is not a bare ident to 'ts-debian-hvm-install' for installing L1 guest VM, since the default '$gn ||= 'debianhvm' if no other '$gn' was passed to this script, but for nested job we expect a different '$gn' from 'debianhvm', such as 'nestedl1'. So it need to pass 'host' and 'nestedl1' to 'ts-debian-hvm-install' script. > > + run-ts . = ts-debian-hvm-install + host + nestedl1 > > Indeed. > > > For 'ts-nested-setup' script, it need to call 'ts_get_host_guest' > > which need two parameters 'host' and 'nestedl1' to get $l0 and $l1 > > scope, so it also need to pass 'nestedl1' to this script. > > Yes. > > > For ' ts-guest-destroy', it also need two parameters of 'host' and 'nestedl1' which is L1's '$gn'. > > If you're intending to destroy the l1, then yes. If you want to > destroy theh l2 then you need to pass `nestedl1' and whatever the L2 > guest name/ident is. Here comes a common issue we need to settle down: To not break the principle that we shall only pass in ident in recipe, we shall either 1. for l1 and l2, identical their ident/name/hostname, make this a principle as well. This shall avoid much complex design but adding one additional rule to bear in mind. 2. setup $ident --> $name mapping somewhere at the beginning (either alloc host or make flight, you name it, but somewhere). I prefer Ian C's suggestion, option 1, that why should we differ the ident and name for l1 and l2. > > Ian.