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

Re: [Xen-devel] [PATCH OSSTEST 3/5] Cope with Jessie's d-i vg name



On Wed, 2015-05-20 at 18:56 +0100, Wei Liu wrote:
> In ts-xen-build-prep, replace matching lenny with jessie since lenny is
> not used in production anymore.

AIUI the default VG name scheme changed? Can you say how here please.

Also I think in general we should aim for the "non-exceptional" case to
be the default one, and use explicit matching for issues with historical
versions. IOW test for wheezy and earlier and override the default (i.e.
Jessie) name. The rationale is that we shouldn't need to add Stretch
here too unless it also differs from Jessie.

That principal seems to apply to a some of the following patches too.

WRT "wheezy and earlier" I've been wondering about providing a function
to transform a Debian code name to a sortable integer. e.g.

sub debver($) {
    my %vers = qw(Lenny 50
                  Squeeze 60
                  Wheezy 70
                  Jessie 80
                  Stretch 90
                  Sid 1000000);
    # Unknown is > sid...
    return $vers{ucfirst($_[0])) // 1000001;
}

so you can do things like
    if ( debver($ho->{Suite}) < debver('jessie') ) {
        workaround_a_thing();

Thoughts?
Ian.

> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
>  ts-host-install   | 4 +++-
>  ts-xen-build-prep | 4 ++--
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ts-host-install b/ts-host-install
> index b73c7ff..6e2106e 100755
> --- a/ts-host-install
> +++ b/ts-host-install
> @@ -87,7 +87,9 @@ END
>  
>      await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);
>  
> -    our $vgname= $ho->{Name};
> +    our $vgname= $ho->{Suite} =~ m/jessie/
> +                 ? "$ho->{Name}-vg"
> +                 : $ho->{Name};
>  
>      if ($ho->{Suite} =~ m/lenny/) {
>          $vgname .= ".$c{TestHostDomain}";
> diff --git a/ts-xen-build-prep b/ts-xen-build-prep
> index 4dece65..25ba3d4 100755
> --- a/ts-xen-build-prep
> +++ b/ts-xen-build-prep
> @@ -53,8 +53,8 @@ sub overall_limit_pe ($) {
>  
>  sub determine_vg_lv () {
>      $vg=
> -        $ho->{Suite} =~ m/lenny/
> -        ? "$ho->{Name}.$c{TestHostDomain}"
> +        $ho->{Suite} =~ m/jessie/
> +        ? "$ho->{Name}-vg"
>          : $ho->{Name};
>      $lv = "/dev/$vg/$lvleaf";
>  }



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