All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: "Hu, Robert" <robert.hu@intel.com>
Cc: "Pang, LongtaoX" <longtaox.pang@intel.com>,
	"jfehlig@suse.com" <jfehlig@suse.com>,
	"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
	"ian.campbell@citrix.com" <ian.campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH OSSTEST 11/12] Changes on test step of debain hvm guest install
Date: Fri, 13 Feb 2015 12:02:50 +0000	[thread overview]
Message-ID: <21725.59370.336561.485823@mariner.uk.xensource.com> (raw)
In-Reply-To: <9E79D1C9A97CFD4097BCE431828FDD31B15D9E@SHSMSX103.ccr.corp.intel.com>

Hu, Robert writes ("RE: [PATCH OSSTEST 11/12] Changes on test step of debain hvm guest install"):
> [Ian]
> > Firstly, can you please reformat your commit message so that the
> > individual points are separated out into paragraphs.  But I think
> > actually that probably some of this wants to go into different commits
> > (and perhaps different places).
>
> You mean dividing this patch into more pieces/commits?

Yes.  At least, that might be a good idea.  I'm finding it a bit
difficult to see the wood for the trees.

I can, however, offer some general guidelines on when to split/merge:

 * Changes must be in the same commit if they are mutually
   interdependent, so that the code only works before all of them or
   after all of them.

 * Each commit should be the smallest piece which is a coherent and
   comprehensible alteration.  (Although small changes might be put
   together in the same commit, especially if they are conceptually
   very similar and/or aren't textually interleaved.)

 * On ordering: it should not normally be necessary to read subsequent
   commits to understand earlier ones.  So generally that means that
   new interfaces should be introduced (with any necessary doc
   comments, etc.) earlier and used later.

 * It is a good idea to split out refactoring operations, and code
   motion, each into their own patch.  That makes it much easier to
   review both the refactoring/motion (because it's much easier to
   look for unintentional functional changes), and the other patches
   (because they don't contain non-functional `noise').  When you do
   this, the refactoring/motion should clearly say what if any
   functional change is introduced.  `No functional change' is the
   usual stock phrase for cases when it's true.

> > I think this should look more like:
> > 
> > +    run-ts . = ts-debian-hvm-install + host + nested
> > +    run-ts . = ts-nested-setup + host + nested
> > +    run-ts . = ts-xen-install nested
> > +    run-ts . = ts-host-reboot nested
> > +    run-ts . = ts-debian-hvm-install nested nested2
> > 
> OK. Since we could only try to learn your design arch/hierarchy of osstest,
> through code reading, such as terms of test job, test step, recipe, etc., 
> we inevitably made some misunderstanding or unawareness.

Indeed.  That's fine.

> Fortunately getting closer and closer to your mind now.

I think so, yes.  Of course if you think there is something in the
current design/architecture which is wrong or broken, then please do
say so.  We're aware it's not perfect.

Likewise, if something I suggest doesn't make sense or doesn't seem to
work well, please do feel free to contradict me.  We're relying on
your judgement as well as mine :-).

> Will follow your recipe composing above.

So, yes, please, if you agree that this is a good way to go.  I think
it will reduce the amount of nested-specific code elsewhere.

> > I don't know why you need to use a dedicated VG for your nested
> > guests's L2 guests - please explain - but if you do, probably
> > ts-nested-setup could set it up.
> 
> The existing ts-debian-hvm-install code presume host has vg set
> for guest installation. To make minimal code change, we'd like
> to imitate that presumption for L2's host. 

Strictly speaking, the existing ts-debian-hvm-install simply expects
that the host has a VG.  The existing ts-host-install code (in
Debian.pm) sets up the VG (via preseed_create).  So I think your
problem is that ts-debian-hvm-install doesn't set up the guest with
LVM for its filesystems ?

I think it would be better to unify the d-i partman-auto/expert_recipe
in Debian.pm with the one in ts-debian-hvm-install, and make all
Debian HVM installations use LVM.

Wei, do you agree ?  (TBH maybe I should have asked Wei to do that
when he introduced the new preseed setup in ts-debian-hvm-install.)

> > > @@ -63,7 +71,7 @@ d-i partman-auto/expert_recipe string \\
> > >                          use_filesystem{ } filesystem{ vfat } \\
> > >                          mountpoint{ /boot/efi } \\
> > >                  . \\
> > > -                5000 50 5000 ext4 \\
> > > +                10000 50 10000 ext4 \\
> > 
> > I think this needs an explanation.  You mentioned it in your commit
> > message but didn't give reasons.  I think this should perhaps be done
> > in a different way.
> 
> You mean not increase the size uniformly, but conditionally only for
> L1?

I don't know.  When you explain why this is necessary it will
hopefully become clearer to me what I think is the best way to address
the problem.

> > > +if ($nested eq 'nested_L2') {
> > > +    target_cmd_root($gho, "init 0");
> > > +    target_await_down($gho,60);
> > > +    target_ping_check_down($gho);
> > > +}
> > > +if ($nested eq 'nested_L1') {
> > > +    store_runvar("L1_host", $gn);
> > > +    store_runvar("L1_IP", $gho->{Ip});
> > > +    store_runvar("L0_Ident", $whhost);
> > > +    target_cmd_root($gho, "mkdir -p /home/osstest/.ssh && cp
> > /root/.ssh/authorized_keys /home/osstest/.ssh/");
> > > +}
> > 
> > I don't understand the purpose behind these special cases.
> 
> The first block is shut down L2 guest after proving it boots up.

This should be done as a separate test step.  I think you can use the
ts-guest-stop script.

If you want to check that the guest can shut itself off then that
would be a new kind of test step (which could perhaps profitably added
to a wider variety of recipes).


Thanks,
Ian.

  reply	other threads:[~2015-02-13 12:02 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11  9:52 [PATCH OSSTEST 00/12] Add nested xen on xen test case Robert Ho
2015-02-11  9:52 ` [PATCH OSSTEST 01/12] Add support of parsing grub which has 'submenu' primitive Robert Ho
2015-02-11 14:44   ` Ian Jackson
2015-02-12  2:01     ` Hu, Robert
2015-02-12 10:13       ` Wei Liu
2015-02-12 18:32         ` Ian Jackson
2015-02-13  7:07           ` Hu, Robert
2015-02-13  6:25         ` Hu, Robert
2015-02-12  4:23     ` Ian Campbell
2015-02-11  9:52 ` [PATCH OSSTEST 02/12] Increase boot timer to accomodate to nest test Robert Ho
2015-02-11 14:47   ` Ian Jackson
2015-02-13  8:13     ` Hu, Robert
2015-02-13 11:41       ` Ian Jackson
2015-02-11  9:52 ` [PATCH OSSTEST 03/12] Designate vif device model to e1000 Robert Ho
2015-02-11 14:49   ` Ian Jackson
2015-02-13  8:32     ` Hu, Robert
2015-02-11  9:52 ` [PATCH OSSTEST 04/12] Just some indentation adustments Robert Ho
2015-02-11 14:50   ` Ian Jackson
2015-02-11  9:52 ` [PATCH OSSTEST 05/12] Add and expose some testsupport APIs Robert Ho
2015-02-11 14:54   ` Ian Jackson
2015-02-13  8:23     ` Hu, Robert
2015-03-04  6:21     ` Pang, LongtaoX
2015-02-11  9:52 ` [PATCH OSSTEST 06/12] Manipulate $ho IP assignment for nest L2 situation Robert Ho
2015-02-11 14:58   ` Ian Jackson
2015-02-13  8:37     ` Hu, Robert
2015-02-11  9:52 ` [PATCH OSSTEST 07/12] For hvm guest configuration, config console to 'hvc0' Robert Ho
2015-02-11 17:03   ` Ian Jackson
2015-02-13  7:31     ` Hu, Robert
2015-02-11  9:52 ` [PATCH OSSTEST 08/12] Add test job for nest test case Robert Ho
2015-02-11 17:02   ` Ian Jackson
2015-02-11  9:52 ` [PATCH OSSTEST 09/12] Add build hvm job for nested test use Robert Ho
2015-02-11 17:04   ` Ian Jackson
2015-02-11  9:52 ` [PATCH OSSTEST 10/12] Compose the main body of test-nested test job Robert Ho
2015-02-11 17:07   ` Ian Jackson
2015-02-13  7:14     ` Hu, Robert
2015-02-11  9:52 ` [PATCH OSSTEST 11/12] Changes on test step of debain hvm guest install Robert Ho
2015-02-12 18:16   ` Ian Jackson
2015-02-13  6:47     ` Hu, Robert
2015-02-13 12:02       ` Ian Jackson [this message]
2015-02-15  9:43         ` Hu, Robert
2015-02-16 10:16           ` Wei Liu
2015-02-17  0:45             ` Hu, Robert
2015-02-17 10:37               ` Wei Liu
2015-02-17 10:46                 ` Wei Liu
2015-03-04  9:02                   ` Pang, LongtaoX
2015-02-17 11:24             ` Ian Jackson
2015-02-11  9:52 ` [PATCH OSSTEST 12/12] Changes to test step of xen install Robert Ho
2015-02-11 17:17   ` Ian Jackson
2015-02-12 18:20   ` Ian Jackson
2015-02-13  7:03     ` Hu, Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21725.59370.336561.485823@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jfehlig@suse.com \
    --cc=longtaox.pang@intel.com \
    --cc=robert.hu@intel.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.