Il giorno 07/apr/2013 10:48, "Guido Trotter" <[email protected]> ha
scritto:
>
> Interdiff: fix typo in this function's docstring:
> diff --git a/qa/qa_instance.py b/qa/qa_instance.py
> index c294556..f331b5d 100644
> --- a/qa/qa_instance.py
> +++ b/qa/qa_instance.py
> @@ -888,7 +888,7 @@ def TestBackupListFields():
>
>
>  def TestRemoveInstanceOfflineNode(instance, snode, set_offline,
set_online):
> -  """gtn-instance remove with an off-line node
> +  """gnt-instance remove with an off-line node
>
>    @param instance: instance
>    @param snode: secondary node, to be set offline
>
> On Sun, Apr 7, 2013 at 7:40 AM, Guido Trotter <[email protected]>
wrote:
> > - The cleanup should only happen for non externally mirrored disk
> >   templates
> > - It should behave differently for file and lvm based instances
> > - It should definitely *not* be explicit in the qa file :/ (but it's
> >   more important to fix qa, as of now)
> >
> > Signed-off-by: Guido Trotter <[email protected]>
> > ---
> >  qa/qa_instance.py |   16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/qa/qa_instance.py b/qa/qa_instance.py
> > index 0f3b877..c294556 100644
> > --- a/qa/qa_instance.py
> > +++ b/qa/qa_instance.py
> > @@ -902,7 +902,15 @@ def TestRemoveInstanceOfflineNode(instance, snode,
set_offline, set_online):
> >      TestInstanceRemove(instance)
> >    finally:
> >      set_online(snode)
> > -  # Clean up the disks on the offline node
> > -  for minor in info["drbd-minors"][snode.primary]:
> > -    AssertCommand(["drbdsetup", str(minor), "down"], node=snode)
> > -  AssertCommand(["lvremove", "-f"] + info["volumes"], node=snode)
> > +
> > +  # Clean up the disks on the offline node, if necessary
> > +  if instance.disk_template not in constants.DTS_EXT_MIRROR:
> > +    # FIXME: abstract the cleanup inside the disks
> > +    if info["storage-type"] == constants.ST_LVM_VG:
> > +      for minor in info["drbd-minors"][snode.primary]:
> > +        AssertCommand(["drbdsetup", str(minor), "down"], node=snode)
> > +      AssertCommand(["lvremove", "-f"] + info["volumes"], node=snode)
> > +    elif info["storage-type"] == constants.ST_FILE:
> > +      filestorage = pathutils.DEFAULT_FILE_STORAGE_DIR
> > +      disk = os.path.join(filestorage, instance.name)
> > +      AssertCommand(["rm", "-rf", disk], node=snode)
> > --
> > 1.7.10.4
> >
>
>
>
> --
> Guido Trotter
> Ganeti engineering
> Google Germany

LGTM, thanks.

Michele

Reply via email to