All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 00/12] Wheezy
@ 2014-02-11 15:25 Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 01/12] ts-xen-build-prep: avoid lvextend segfault (Debian #736173) with wheezy Ian Jackson
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Workarounds for bugs and incompatibilities in wheezy:
 01/12 ts-xen-build-prep: avoid lvextend segfault
 10/12 ts-guests-nbd-mirror: set "oldstyle=true"

A bunch of bugfixes:
 02/12 ts-kernel-build: force CONFIG_BLK_DEV_NBD=y
 03/12 ts-host-install: set `IPAPPEND 2' (if
 04/12 ts-xen-install: nodhcp: restructure
 05/12 ts-xen-install: default the interface to the
 06/12 TestSupport: break out target_run_apt
 07/12 TestSupport: Suppress prompting by apt
 08/12 ts-guests-nbd-mirror: purge old packages first
 09/12 ts-guests-nbd-mirror: add checkaccessible test

And switch the default suite:
 11/12 Debian: Switch to wheezy
 12/12 make-flight: abolish special-casing of suite

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 01/12] ts-xen-build-prep: avoid lvextend segfault (Debian #736173) with wheezy
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 02/12] ts-kernel-build: force CONFIG_BLK_DEV_NBD=y Ian Jackson
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-build-prep |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index b395584..528d0a4 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -133,7 +133,9 @@ sub lvextend1 ($$$) {
 
     my $stripes_free = $stripe_count * $stripe_minfree;
     $do_limit_pe->(\$stripes_free, 'striped');
-    if ($stripe_minfree && $stripe_count>1) {
+    if ($stripe_minfree && $stripe_count>1
+	&& $ho->{Suite} !~ m/wheezy/ # bugs.debian.org/736173
+	) {
         overall_limit_pe(\$stripes_free);
         $more_pe += $stripes_free;
         target_cmd_root($ho, "lvextend -i$stripe_count -l +$stripes_free $lv");
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 02/12] ts-kernel-build: force CONFIG_BLK_DEV_NBD=y
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 01/12] ts-xen-build-prep: avoid lvextend segfault (Debian #736173) with wheezy Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 03/12] ts-host-install: set `IPAPPEND 2' (if interface isn't forced) Ian Jackson
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Otherwise, with wheezy and Linux 3.4.77:

Jan 23 04:36:42 lake-frog nbd_client[4274]: Cannot open NBD: No such file or directory#012Please ensure the nbd module is loaded.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-kernel-build |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ts-kernel-build b/ts-kernel-build
index 742d2b4..9b92ffc 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -174,6 +174,10 @@ setopt CONFIG_EXT4_FS m
 setopt CONFIG_UFS_FS m
 setopt CONFIG_UFS_FS_WRITE y
 
+setopt CONFIG_BLK_DEV_NBD y
+# At least with Linux 3.4.77 on wheezy, the nbd module is
+# not loaded automatically.
+
 END
 
 our $config_features= <<END;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 03/12] ts-host-install: set `IPAPPEND 2' (if interface isn't forced)
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 01/12] ts-xen-build-prep: avoid lvextend segfault (Debian #736173) with wheezy Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 02/12] ts-kernel-build: force CONFIG_BLK_DEV_NBD=y Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 04/12] ts-xen-install: nodhcp: restructure Ian Jackson
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

This causes BOOTIF=<mac-address> to appear on command line.  This
makes d-i use that interface.  (See also Debian #615600.)

This is a better approach to interface name instability than setting
the force interface host property.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-host-install |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-host-install b/ts-host-install
index 5c0018e..8e119ca 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -174,8 +174,10 @@ sub setup_pxeboot_firstboot($) {
     system qw(rm -rf --),"$initrd_overlay.d";
     mkdir "$initrd_overlay.d" or die "$initrd_overlay.d: $!";
 
+    my $ipappend = 2;
     my $wantphysif= get_host_property($ho,'interface force','auto');
     if ($wantphysif ne 'auto') {
+	$ipappend = 0;
 	die "need Ether for $ho->{Name} ($wantphysif)"
 	    unless defined $ho->{Ether};
         system_checked(qw(mkdir -p --), "$initrd_overlay.d/etc/udev/rules.d");
@@ -219,6 +221,7 @@ label overwrite
 	menu default
 	kernel $kernel
 	append $installcmdline
+	ipappend $ipappend
 default overwrite
 END
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 04/12] ts-xen-install: nodhcp: restructure
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (2 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 03/12] ts-host-install: set `IPAPPEND 2' (if interface isn't forced) Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces Ian Jackson
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Move target_editfile_root to contain all the meat of the function.
This is useful because we're going to possibly want to read the input
interfaces file twice.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-install |   42 +++++++++++++++++++++++-------------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/ts-xen-install b/ts-xen-install
index fc96516..09c90ce 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -206,33 +206,37 @@ END
 }
 
 sub nodhcp () {
-    my ($iface,$bridgex);
-    my $physif= get_host_property($ho,'interface force','eth0');
-    if ($initscripts_nobridge) {
-        $iface= 'xenbr0';
-        $bridgex= <<END;
+    target_editfile_root($ho, "/etc/network/interfaces",
+                         "etc-network-interfaces", sub {
+        my $physif= get_host_property($ho,'interface force',undef);
+
+	my ($iface,$bridgex);
+
+	if ($initscripts_nobridge) {
+	    $iface= 'xenbr0';
+	    $bridgex= <<END;
     bridge_ports $physif
     bridge_fd 0
     bridge_stp off
 END
-    } else {
-        $iface= $physif;
-        $bridgex= '';
-    }
+	} else {
+	    $iface= $physif;
+	    $bridgex= '';
+        }
 
-    my $routes= target_cmd_output_root($ho, "route -n");
+	my $routes= target_cmd_output_root($ho, "route -n");
 
-    $routes =~ m/^ [0-9.]+ \s+ 0\.0\.0\.0 \s+ ([0-9.]+) \s+ \S*U\S* \s /mxi
-        or die "no own local network in route ?  $routes ";
-    my $netmask= $1;
+	$routes =~ m/^ [0-9.]+ \s+ 0\.0\.0\.0 \s+ ([0-9.]+) \s+ \S*U\S* \s /mxi
+	    or die "no own local network in route ?  $routes ";
+	my $netmask= $1;
 
-    $routes =~ m/^ 0\.0\.0\.0 \s+ ([0-9.]+) \s+ 0\.0\.0\.0 \s+ \S*UG\S* \s /mxi
-        or die "no default gateway ?  $routes ";
-    my $gateway= $1;
+	$routes =~
+	    m/^ 0\.0\.0\.0 \s+ ([0-9.]+) \s+ 0\.0\.0\.0 \s+ \S*UG\S* \s /mxi
+	    or die "no default gateway ?  $routes ";
+	my $gateway= $1;
+
+	logm("iface $iface mask=$netmask gw=$gateway");
 
-    logm("iface $iface mask=$netmask gw=$gateway");
-    target_editfile_root($ho, "/etc/network/interfaces",
-                         "etc-network-interfaces", sub {
         my $suppress= 0;
         while (<EI>) {
             $suppress= 0 unless m/^\s+/;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (3 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 04/12] ts-xen-install: nodhcp: restructure Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-04-16 14:51   ` Ian Campbell
  2014-02-11 15:25 ` [OSSTEST PATCH 06/12] TestSupport: break out target_run_apt Ian Jackson
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

The default was simply eth0.  This is the other piece of automatically
coping with the boot interface not being eth0.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-install |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/ts-xen-install b/ts-xen-install
index 09c90ce..a1f5998 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -22,6 +22,7 @@ use File::Path;
 use POSIX;
 use Osstest::Debian;
 use Osstest::TestSupport;
+use Data::Dumper;
 
 my $checkmode= 0;
 
@@ -210,6 +211,23 @@ sub nodhcp () {
                          "etc-network-interfaces", sub {
         my $physif= get_host_property($ho,'interface force',undef);
 
+	if (!defined $physif) {
+	    # preread /etc/network/interfaces to figure out the interface
+	    my %candidates;
+	    while (<EI>) {
+		next unless
+		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
+		    m{^ \s* (  allow-hotplug \s+ (\S+)      ) \s* $}x ||
+		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) \s* $}x ;
+		push @{ $candidates{$2} }, $1;
+	    }
+	    EI->error and die $!;
+	    delete $candidates{'lo'};
+	    die Dumper(\%candidates)." -- cannot determine default interface"
+		unless (scalar keys %candidates) == 1;
+	    ($physif,) = keys %candidates;
+	    seek EI,0,0 or die $!;
+	}
 	my ($iface,$bridgex);
 
 	if ($initscripts_nobridge) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 06/12] TestSupport: break out target_run_apt
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (4 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 07/12] TestSupport: Suppress prompting by apt Ian Jackson
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

We are going to add some environment variables to the apt invocation,
so centralise where this happens.  No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index a513540..e546dc9 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -56,6 +56,7 @@ BEGIN {
 		      target_putfilecontents_root_stash
                       target_put_guest_image
                       target_editfile_root target_file_exists
+                      target_run_apt
                       target_install_packages target_install_packages_norec
                       target_extract_jobdistpath target_guest_lv_name
 
@@ -416,16 +417,21 @@ sub target_putfile ($$$$;$) {
 sub target_putfile_root ($$$$;$) {
     tputfileex('root', @_);
 }
+sub target_run_apt {
+    my ($ho, $timeout, @aptopts) = @_;
+    target_cmd_root($ho,
+                    "apt-get @aptopts",
+                    $timeout);
+}
 sub target_install_packages {
     my ($ho, @packages) = @_;
-    target_cmd_root($ho, "apt-get -y install @packages",
-                    300 + 100 * @packages);
+    target_run_apt($ho, 300 + 100 * @packages,
+		   qw(-y install), @packages);
 }
 sub target_install_packages_norec {
     my ($ho, @packages) = @_;
-    target_cmd_root($ho,
-                    "apt-get --no-install-recommends -y install @packages",
-                    300 + 100 * @packages);
+    target_run_apt($ho, 300 + 100 * @packages,
+		   qw(--no-install-recommends -y install), @packages);
 }
 
 sub target_somefile_getleaf ($$$) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 07/12] TestSupport: Suppress prompting by apt
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (5 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 06/12] TestSupport: break out target_run_apt Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first Ian Jackson
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Always set DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y in
environment of apt, to suppress some prompts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index e546dc9..545095f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -420,7 +420,7 @@ sub target_putfile_root ($$$$;$) {
 sub target_run_apt {
     my ($ho, $timeout, @aptopts) = @_;
     target_cmd_root($ho,
-                    "apt-get @aptopts",
+   "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y apt-get @aptopts",
                     $timeout);
 }
 sub target_install_packages {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (6 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 07/12] TestSupport: Suppress prompting by apt Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 09/12] ts-guests-nbd-mirror: add checkaccessible test Ian Jackson
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Purge any old nbd-client and nbd-server _before_ we make their config.

This only has any effect if the packages are installed before this
script starts, which isn't the case in any of the automatically-run
recipes.  But it can occur when the script is being tested by hand.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-guests-nbd-mirror |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index 89508dd..c0a021a 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -52,6 +52,8 @@ sub findvols () {
 }
 
 sub configserver () {
+    target_cmd_root($sho, "dpkg --purge nbd-server ||:");
+
     my $scfg= <<END;
 # generated by $0
 [generic]
@@ -67,7 +69,6 @@ END
 END
     }
 
-    target_cmd_root($sho, "dpkg --purge nbd-server ||:");
     target_cmd_root($sho, "mkdir -p /etc/nbd-server");
     target_putfilecontents_root_stash($sho,10, $scfg,
         "/etc/nbd-server/config", "${srvhost}_nbd-server_config");
@@ -75,6 +76,8 @@ END
 }
 
 sub configclient () {
+    target_cmd_root($cho, "dpkg --purge nbd-client ||:");
+
     my $mydaemon= '/root/nbd-client-async';
     target_putfilecontents_root_stash($cho,10,<<'END',$mydaemon);
 #!/bin/sh
@@ -99,7 +102,6 @@ NBD_HOST[$v->{Ix}]=$sho->{Name}
 NBD_PORT[$v->{Ix}]=$v->{Port}
 END
     }
-    target_cmd_root($cho, "dpkg --purge nbd-client ||:");
     target_putfilecontents_root_stash($cho,10,$ccfg,"/etc/nbd-client");
     target_install_packages($cho, qw(nbd-client));
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 09/12] ts-guests-nbd-mirror: add checkaccessible test
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (7 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 10/12] ts-guests-nbd-mirror: set "oldstyle=true" Ian Jackson
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

If the NBD devices are not properly accessible on the client, bomb out
here rather than futilely starting a guest, and then timing out when
the guest fails to boot because it can't find its root fs.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-guests-nbd-mirror |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index c0a021a..af200f4 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -116,7 +116,18 @@ sub shuffleconfigs () {
     }
 }
 
+sub checkaccessible () {
+    foreach my $v (@vols) {
+	my $finfo = target_cmd_output_root($cho, "file -Ls $v->{Path}");
+	chomp $finfo;
+	logm("file(1) on $v->{Path}: $finfo");
+	die "unexpected contents for $v->{Path}, nbd failed?"
+	    unless $finfo =~ m/filesystem|swap/i;
+    }
+}
+
 findvols();
 configserver();
 configclient();
 shuffleconfigs();
+checkaccessible();
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 10/12] ts-guests-nbd-mirror: set "oldstyle=true"
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (8 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 09/12] ts-guests-nbd-mirror: add checkaccessible test Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 11/12] Debian: Switch to wheezy Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 12/12] make-flight: abolish special-casing of suite for armhf Ian Jackson
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Newer NBDs (wheezy's and later) need a config option to say we're
using the old-style port-based addressing.  At some point we will
probably switch to using the new-style addressing, but not yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-guests-nbd-mirror |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index af200f4..ee7ff60 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -59,6 +59,9 @@ sub configserver () {
 [generic]
     user = root
 END
+    $scfg .= <<END unless $sho->{Suite} =~ m/sarge|lenny|squeeze/;
+    oldstyle = true
+END
     foreach my $v (@vols) {
 	$v->{Port}= unique_incrementing_runvar("${srvhost}_nextport",4000);
 	$v->{Path}= "/dev/$v->{Gho}{Vg}/$v->{Lv}";
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 11/12] Debian: Switch to wheezy
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (9 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 10/12] ts-guests-nbd-mirror: set "oldstyle=true" Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  2014-02-11 15:25 ` [OSSTEST PATCH 12/12] make-flight: abolish special-casing of suite for armhf Ian Jackson
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Ian Jackson

From: Ian Jackson <iwj@woking.cam.xci-test.com>

This involves updating the d-i version too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest.pm        |    2 +-
 production-config |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Osstest.pm b/Osstest.pm
index 9ba2882..8df0c15 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -59,7 +59,7 @@ our %c = qw(
     Logs logs
     Results results
 
-    DebianSuite squeeze
+    DebianSuite wheezy
     DebianMirrorSubpath debian
 
     TestHostKeypairPath id_rsa_osstest
diff --git a/production-config b/production-config
index a0e73cb..1ee0ba0 100644
--- a/production-config
+++ b/production-config
@@ -71,7 +71,7 @@ TftpPxeDir /
 TftpPxeTemplates %ipaddrhex%/pxelinux.cfg
 
 TftpPxeGroup osstest
-TftpDiVersion 2013-09-23
+TftpDiVersion 2013-12-12
 
 XenUsePath /usr/groups/xencore/systems/bin/xenuse
 XenUseUser osstest
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 12/12] make-flight: abolish special-casing of suite for armhf
  2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
                   ` (10 preceding siblings ...)
  2014-02-11 15:25 ` [OSSTEST PATCH 11/12] Debian: Switch to wheezy Ian Jackson
@ 2014-02-11 15:25 ` Ian Jackson
  11 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-02-11 15:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Since the suite is now wheezy by default this is no longer needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mfi-common |    2 --
 1 file changed, 2 deletions(-)

diff --git a/mfi-common b/mfi-common
index 8f56092..a95703d 100644
--- a/mfi-common
+++ b/mfi-common
@@ -79,7 +79,6 @@ create_build_jobs () {
     esac
 
     case "$arch" in
-    armhf) suite="wheezy";;
     *)     suite=$defsuite;;
     esac
 
@@ -267,7 +266,6 @@ test_matrix_iterate () {
     esac
 
     case "$xenarch" in
-    armhf) suite="wheezy";  guestsuite="wheezy";;
     *)     suite=$defsuite; guestsuite=$defguestsuite;;
     esac
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces
  2014-02-11 15:25 ` [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces Ian Jackson
@ 2014-04-16 14:51   ` Ian Campbell
  2014-04-16 15:02     ` Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Campbell @ 2014-04-16 14:51 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Tue, 2014-02-11 at 15:25 +0000, Ian Jackson wrote:
> The default was simply eth0.  This is the other piece of automatically
> coping with the boot interface not being eth0.
> 
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

I think/suspect this change is causing ts-xen-install to create me a
bridge with bridge_ports == xenbr0 on the second time (i.e. when using a
host).

I notice that the second half of this function explicitly suppresses
xenbr0 -- perhaps this first half should do something similar?

(I haven't tried but I assume using the "interface force" host prop
would fix this...)

> ---
>  ts-xen-install |   18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/ts-xen-install b/ts-xen-install
> index 09c90ce..a1f5998 100755
> --- a/ts-xen-install
> +++ b/ts-xen-install
> @@ -22,6 +22,7 @@ use File::Path;
>  use POSIX;
>  use Osstest::Debian;
>  use Osstest::TestSupport;
> +use Data::Dumper;
>  
>  my $checkmode= 0;
>  
> @@ -210,6 +211,23 @@ sub nodhcp () {
>                           "etc-network-interfaces", sub {
>          my $physif= get_host_property($ho,'interface force',undef);
>  
> +	if (!defined $physif) {
> +	    # preread /etc/network/interfaces to figure out the interface
> +	    my %candidates;
> +	    while (<EI>) {
> +		next unless
> +		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
> +		    m{^ \s* (  allow-hotplug \s+ (\S+)      ) \s* $}x ||
> +		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) \s* $}x ;
> +		push @{ $candidates{$2} }, $1;
> +	    }
> +	    EI->error and die $!;
> +	    delete $candidates{'lo'};
> +	    die Dumper(\%candidates)." -- cannot determine default interface"
> +		unless (scalar keys %candidates) == 1;
> +	    ($physif,) = keys %candidates;
> +	    seek EI,0,0 or die $!;
> +	}
>  	my ($iface,$bridgex);
>  
>  	if ($initscripts_nobridge) {

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces
  2014-04-16 14:51   ` Ian Campbell
@ 2014-04-16 15:02     ` Ian Jackson
  2014-04-16 15:05       ` Ian Campbell
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 2014-04-16 15:02 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces"):
> On Tue, 2014-02-11 at 15:25 +0000, Ian Jackson wrote:
> > The default was simply eth0.  This is the other piece of automatically
> > coping with the boot interface not being eth0.
> > 
> > Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> I think/suspect this change is causing ts-xen-install to create me a
> bridge with bridge_ports == xenbr0 on the second time (i.e. when using a
> host).
> 
> I notice that the second half of this function explicitly suppresses
> xenbr0 -- perhaps this first half should do something similar?

Yes, it probably should.  Do you want to write the patch or shall I do
it ?

> (I haven't tried but I assume using the "interface force" host prop
> would fix this...)

Yes, it ought to.

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces
  2014-04-16 15:02     ` Ian Jackson
@ 2014-04-16 15:05       ` Ian Campbell
  2014-04-17 15:13         ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Campbell @ 2014-04-16 15:05 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2014-04-16 at 16:02 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces"):
> > On Tue, 2014-02-11 at 15:25 +0000, Ian Jackson wrote:
> > > The default was simply eth0.  This is the other piece of automatically
> > > coping with the boot interface not being eth0.
> > > 
> > > Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > 
> > I think/suspect this change is causing ts-xen-install to create me a
> > bridge with bridge_ports == xenbr0 on the second time (i.e. when using a
> > host).
> > 
> > I notice that the second half of this function explicitly suppresses
> > xenbr0 -- perhaps this first half should do something similar?
> 
> Yes, it probably should.  Do you want to write the patch or shall I do
> it ?

Looks like some funky Perl might be involved, so I'll leave it to you if
that's ok...

> 
> > (I haven't tried but I assume using the "interface force" host prop
> > would fix this...)
> 
> Yes, it ought to.
> 
> Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp
  2014-04-16 15:05       ` Ian Campbell
@ 2014-04-17 15:13         ` Ian Jackson
  2014-04-17 15:13           ` [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop Ian Jackson
                             ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Ian Jackson @ 2014-04-17 15:13 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

This regexp would never match because of the spurious $.  Remove the
$ and also the preceding unnecessary \s*.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-xen-install |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-xen-install b/ts-xen-install
index 4a810e4..70e90ed 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -221,7 +221,7 @@ sub nodhcp () {
 		next unless
 		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
 		    m{^ \s* (  allow-hotplug \s+ (\S+)      ) \s* $}x ||
-		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) \s* $}x ;
+		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) }x ;
 		push @{ $candidates{$2} }, $1;
 	    }
 	    EI->error and die $!;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop
  2014-04-17 15:13         ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Jackson
@ 2014-04-17 15:13           ` Ian Jackson
  2014-04-17 15:13           ` [OSSTEST PATCH 3/3] ts-xen-install: nodhcp: Make idempotent Ian Jackson
  2014-04-22  8:41           ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Campbell
  2 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-04-17 15:13 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

We are going to want to process other kinds of lines too.  So change
this loop around by inverting the condition and not using "next".

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-xen-install |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ts-xen-install b/ts-xen-install
index 70e90ed..c59fdd3 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -218,11 +218,13 @@ sub nodhcp () {
 	    # preread /etc/network/interfaces to figure out the interface
 	    my %candidates;
 	    while (<EI>) {
-		next unless
+		if (
 		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
 		    m{^ \s* (  allow-hotplug \s+ (\S+)      ) \s* $}x ||
-		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) }x ;
-		push @{ $candidates{$2} }, $1;
+		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) }x
+		    ) {
+		    push @{ $candidates{$2} }, $1;
+		}
 	    }
 	    EI->error and die $!;
 	    delete $candidates{'lo'};
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [OSSTEST PATCH 3/3] ts-xen-install: nodhcp: Make idempotent
  2014-04-17 15:13         ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Jackson
  2014-04-17 15:13           ` [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop Ian Jackson
@ 2014-04-17 15:13           ` Ian Jackson
  2014-04-22  8:41           ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Campbell
  2 siblings, 0 replies; 20+ messages in thread
From: Ian Jackson @ 2014-04-17 15:13 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

If run more than once, this function would erroneously determine that
xenbr0 was the primary physical interface name and try to enroll it
into the bridge (also named xenbr0).

Instead, spot the "bridge_ports" line and use it to extract the
physical interface name.  Eliminate from consideration any interfaces
matching xenbr\d+.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-xen-install |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/ts-xen-install b/ts-xen-install
index c59fdd3..4215ed3 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -217,6 +217,7 @@ sub nodhcp () {
 	if (!defined $physif) {
 	    # preread /etc/network/interfaces to figure out the interface
 	    my %candidates;
+	    my @bridges;
 	    while (<EI>) {
 		if (
 		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
@@ -225,10 +226,24 @@ sub nodhcp () {
 		    ) {
 		    push @{ $candidates{$2} }, $1;
 		}
+		if (
+			(
+			 (m{^ \s* iface \s+ (xenbr\w*) \s+ inet \s+ }x
+			      ? ((push @bridges, $1), 1) : 0)
+			 ...
+			 !m{^ [ \t] }x
+			)
+		    &&
+			m{^ \s+ bridge_ports \s+ (\S+) \s }x
+		    ) {
+		    push @{ $candidates{$1} }, "$bridges[$#bridges] $_";
+		}
 	    }
 	    EI->error and die $!;
 	    delete $candidates{'lo'};
-	    die Dumper(\%candidates)." -- cannot determine default interface"
+	    delete $candidates{$_} foreach @bridges;
+	    die Dumper(\%candidates, \@bridges).
+		" -- cannot determine default interface"
 		unless (scalar keys %candidates) == 1;
 	    ($physif,) = keys %candidates;
 	    seek EI,0,0 or die $!;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp
  2014-04-17 15:13         ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Jackson
  2014-04-17 15:13           ` [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop Ian Jackson
  2014-04-17 15:13           ` [OSSTEST PATCH 3/3] ts-xen-install: nodhcp: Make idempotent Ian Jackson
@ 2014-04-22  8:41           ` Ian Campbell
  2 siblings, 0 replies; 20+ messages in thread
From: Ian Campbell @ 2014-04-22  8:41 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, 2014-04-17 at 16:13 +0100, Ian Jackson wrote:
> This regexp would never match because of the spurious $.  Remove the
> $ and also the preceding unnecessary \s*.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

I've been running with this series in standalone mode on the system
which I initially had this trouble with and it seems to be doing the
right thing for both reused and freshly installed hosts.

Tested-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  ts-xen-install |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ts-xen-install b/ts-xen-install
> index 4a810e4..70e90ed 100755
> --- a/ts-xen-install
> +++ b/ts-xen-install
> @@ -221,7 +221,7 @@ sub nodhcp () {
>  		next unless
>  		    m{^ \s* (  auto \s+ (\S+)               ) \s* $}x ||
>  		    m{^ \s* (  allow-hotplug \s+ (\S+)      ) \s* $}x ||
> -		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) \s* $}x ;
> +		    m{^ \s* (  iface \s+ (\S+) \s+ inet \s+ ) }x ;
>  		push @{ $candidates{$2} }, $1;
>  	    }
>  	    EI->error and die $!;

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-04-22  8:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 15:25 [OSSTEST PATCH 00/12] Wheezy Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 01/12] ts-xen-build-prep: avoid lvextend segfault (Debian #736173) with wheezy Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 02/12] ts-kernel-build: force CONFIG_BLK_DEV_NBD=y Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 03/12] ts-host-install: set `IPAPPEND 2' (if interface isn't forced) Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 04/12] ts-xen-install: nodhcp: restructure Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 05/12] ts-xen-install: default the interface to the one in /etc/network/interfaces Ian Jackson
2014-04-16 14:51   ` Ian Campbell
2014-04-16 15:02     ` Ian Jackson
2014-04-16 15:05       ` Ian Campbell
2014-04-17 15:13         ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Jackson
2014-04-17 15:13           ` [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop Ian Jackson
2014-04-17 15:13           ` [OSSTEST PATCH 3/3] ts-xen-install: nodhcp: Make idempotent Ian Jackson
2014-04-22  8:41           ` [OSSTEST PATCH 1/3] ts-xen-install: nodhcp: Fix iface regexp Ian Campbell
2014-02-11 15:25 ` [OSSTEST PATCH 06/12] TestSupport: break out target_run_apt Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 07/12] TestSupport: Suppress prompting by apt Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 09/12] ts-guests-nbd-mirror: add checkaccessible test Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 10/12] ts-guests-nbd-mirror: set "oldstyle=true" Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 11/12] Debian: Switch to wheezy Ian Jackson
2014-02-11 15:25 ` [OSSTEST PATCH 12/12] make-flight: abolish special-casing of suite for armhf Ian Jackson

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.