]> xenbits.xensource.com Git - osstest.git/log
osstest.git
9 years agomake-flight: Trim the matrix of disk format flights
Ian Jackson [Wed, 30 Sep 2015 12:01:40 +0000 (13:01 +0100)]
make-flight: Trim the matrix of disk format flights

We don't need to test every combination of toolstack, architecture,
and disk format.  We don't expect many architecture-specific bugs in
the per-disk-format code in the toolstack layers.

We _do_ want to test every combination of toolstack and disk format
(since the format configuration machinery is toolstack specific) and a
reasonable selection of architectures for each disk format (since
arch-specific bugs in actual underlying disk drivers are a
possibility).

The implementation strategy is for do_pv_debian_tests to select a
particular architecture for each combination of toolstack and format.
(Because the architecture is actually in an outer loop, we recalculate
that selection multiple times, and skip inner iterations for the other
architectures.  This is all in bash code so the wasted computation is
not particularly important.)

We have a safety catch which spots if any architecture is entirely
untested in any of these combinations; this would happen if a new
architecture is introduced elsewhere and not added to the list.  We do
not have a safety catch which spots when a (toolstack,format)
combination becomes untested due to deletion of an architecture.
(That would be more fiddly to implement without restructuring.)

We list armhf twice because we would like to do at least as many ARM
as x86 tests (particularly given our current workload and capacity).

The result is that the set of generated jobs is adjusted as follows:

   keep  test-amd64-i386-xl-raw
     -   test-amd64-i386-xl-vhd
     -   test-amd64-i386-xl-qcow2
     -   test-amd64-i386-libvirt-raw
     -   test-amd64-i386-libvirt-vhd
     -   test-amd64-i386-libvirt-qcow2
     -   test-amd64-amd64-xl-raw
     -   test-amd64-amd64-xl-vhd
   keep  test-amd64-amd64-xl-qcow2
     -   test-amd64-amd64-libvirt-raw
   keep  test-amd64-amd64-libvirt-vhd
     -   test-amd64-amd64-libvirt-qcow2
     -   test-armhf-armhf-xl-raw
   keep  test-armhf-armhf-xl-vhd
     -   test-armhf-armhf-xl-qcow2
   keep  test-armhf-armhf-libvirt-raw
     -   test-armhf-armhf-libvirt-vhd
   keep  test-armhf-armhf-libvirt-qcow2

(Where `-' means `drop this job'.)

Or to look at it another way:

                         i386   amd64   armhf

                 raw     keep     -       -
                 vhd       -      -     keep
                 qcow2     -    keep      -

         libvirt raw       -      -     keep
         libvirt vhd       -    keep      -
         libvirt qcow2     -      -     keep

I have diffed standalone-generate-dump-flight-runvars output before
and after and it looks plausible.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-hosts-allocate-Executive: Print more info about booking to main log
Ian Jackson [Tue, 29 Sep 2015 14:51:21 +0000 (15:51 +0100)]
ts-hosts-allocate-Executive: Print more info about booking to main log

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Fix whitespace style issue.

9 years agots-hosts-allocate-Executive: Finish a couple of transactions
Ian Jackson [Tue, 29 Sep 2015 14:25:47 +0000 (15:25 +0100)]
ts-hosts-allocate-Executive: Finish a couple of transactions

Call $equivflagscheckq->finish() at the end, rather than in the
candidate search loop.  This avoids missing a `next' control path.

Call $resprop_q->finish() at all.

One of these is responsible for this message:

  DBI::db=HASH(0x88e79c4)->disconnect invalidates 1 active statement
  handle (either destroy statement handles or call finish on them
  before disconnecting) at Osstest/Executive.pm line 708, <GEN4> line
  53.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-hosts-allocate-Executive: Do not allocate specific host with wrong blessing
Ian Jackson [Tue, 29 Sep 2015 13:47:33 +0000 (14:47 +0100)]
ts-hosts-allocate-Executive: Do not allocate specific host with wrong blessing

If the job contains a runvar specifying a specific host, still check
that host's blessing.  Otherwise bisections can run on unblessed
hosts.  They should fail instead.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDo not multiply console hvc0 getty entries
Ian Jackson [Tue, 29 Sep 2015 13:19:05 +0000 (14:19 +0100)]
Do not multiply console hvc0 getty entries

target_kernkind_console_inittab is supposed to edit inittab to make
sure that there is a getty running on hvc0.

However:
 - It is not idempotent; if run more than once it can produce duplicate
   entries `1:' and `xc:'.
 - It works by copying and editing the entry `1:' but it might be that
   there is already another console entry for hvc0 for some other
   reason.

If we end up with multiple entries for hvc0, we can have two copies of
getty fighting, and if you manage to log in, one of them will be
fighting with your shell.

Guard the script with a grep, which looks for inittab entries
mentioning the intended console.  This makes makes it do nothing if
nothing is needed (and therefore it also makes it idempotent).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-fixup: Set password
Ian Jackson [Tue, 29 Sep 2015 13:04:20 +0000 (14:04 +0100)]
ts-debian-fixup: Set password

Previously this script would try to set an empty password.  However,
default installs have a configuration which hates empty passwords.

Instead, set the password `xenroot'.  The value is the output of:
  perl -e '$x = crypt "xenroot", "aa"; print "$x\n"'

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agobranch-settings.osstest: exit 0 on baseline tests flight-62620 flight-62622 flight-62624 flight-62625 flight-62628 flight-62629 flight-62630 flight-62631 flight-62632 flight-62633 flight-62634 flight-62635 flight-62636 flight-62639 flight-62641 flight-62642 flight-62643 flight-62644 flight-62645 flight-62646 flight-62647 flight-62648 flight-62649 flight-62650 flight-62651 flight-62652 flight-62653 flight-62654 flight-62655 flight-62656 flight-62657 flight-62658 flight-62659 flight-62660 flight-62661 flight-62662 flight-62663 flight-62664 flight-62665 flight-62666 flight-62668 flight-62669 flight-62670 flight-62671 flight-62672 flight-62673 flight-62674 flight-62675 flight-62677 flight-62678 flight-62679 flight-62680 flight-62681 flight-62682 flight-62683 flight-62684 flight-62685 flight-62686 flight-62687 flight-62688 flight-62689 flight-62690 flight-62691 flight-62692 flight-62693 flight-62694 flight-62695 flight-62696 flight-62698 flight-62699 flight-62700 flight-62701 flight-62702 flight-62704 flight-62705 flight-62706 flight-62707 flight-62709 flight-62710 flight-62711 flight-62712 flight-62713 flight-62714 flight-62716 flight-62717 flight-62718 flight-62719 flight-62720 flight-62721 flight-62722 flight-62723 flight-62724 flight-62725 flight-62726 flight-62727 flight-62728 flight-62729 flight-62730 flight-62731
Ian Campbell [Fri, 2 Oct 2015 10:13:15 +0000 (11:13 +0100)]
branch-settings.osstest: exit 0 on baseline tests

Otherwise this generates unwanted cronspam

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-fixup: Install the overlays flight-62539 flight-62605
Ian Jackson [Mon, 28 Sep 2015 15:51:24 +0000 (16:51 +0100)]
ts-debian-fixup: Install the overlays

We want debootstrap-installed guests to get these overlays too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Use a tmpfile rather than a stashfile for the tarball.

9 years agots-debian-fixup: Put "/mnt" in a Perl variable
Ian Jackson [Mon, 28 Sep 2015 15:00:36 +0000 (16:00 +0100)]
ts-debian-fixup: Put "/mnt" in a Perl variable

No functional change now, but this will allow us to change the
mountpoint.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDebian preseed: Break out debian_overlays
Ian Jackson [Mon, 28 Sep 2015 15:49:35 +0000 (16:49 +0100)]
Debian preseed: Break out debian_overlays

We are going to want to handle the overlays elswhere too, so factor
out the iteration over them.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTestSupport: Provide target_cmd_inputfh_root
Ian Jackson [Mon, 28 Sep 2015 15:38:40 +0000 (16:38 +0100)]
TestSupport: Provide target_cmd_inputfh_root

No caller yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTestSupport: Honour $stdin fh argument to cmd, tcmd and tcmdex
Ian Jackson [Mon, 28 Sep 2015 15:29:33 +0000 (16:29 +0100)]
TestSupport: Honour $stdin fh argument to cmd, tcmd and tcmdex

These are internal functions, so the change is entirely within
TestSupport.  All the call sites are adjusted to pass undef so there
is no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTestSupport::open_unique_stashfile: Provide a RDWR filehandle
Ian Jackson [Tue, 29 Sep 2015 12:26:33 +0000 (13:26 +0100)]
TestSupport::open_unique_stashfile: Provide a RDWR filehandle

The caller can then rewind and reread it if they feel like.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDebian installs: Nobble /etc/network/if-up.d/openssh-server
Ian Jackson [Mon, 28 Sep 2015 15:19:31 +0000 (16:19 +0100)]
Debian installs: Nobble /etc/network/if-up.d/openssh-server

(See the comment in the new file for the explanation.)

This change affects all our Debian installs (both hosts and guests)
which are done with preseeding, because preseed_base() arranges to
install overlay/.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocrontabs: Provide way to install crontabs, with a safety catch
Ian Jackson [Mon, 28 Sep 2015 10:12:27 +0000 (11:12 +0100)]
crontabs: Provide way to install crontabs, with a safety catch

With this setup you can say
  ./mg-crontab-install CRONTAB
or even
  ./crontab
  ./crontab-cambridge

And you can't accidentally install the intended crontab on the wrong
host, etc.  (As I did recently!)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoShell fixup: Use bash in posix mode
Ian Jackson [Thu, 24 Sep 2015 17:03:00 +0000 (18:03 +0100)]
Shell fixup: Use bash in posix mode

When bash is started as /bin/sh it run in posix compatibility mode.
But when invoked as /bin/bash it does some things ... differently.

Most notably:

   Subshells spawned to execute command substitutions inherit the
   value of the -e option from the parent shell.  When not in posix
   mode, bash clears the -e option in such subshells.

It is a mystery why anyone thought the `non-posix' behaviour was
desirable.  One effect in practice is that osstest's cr-daily-branch
can blunder on if one of its version fetches fails.

AFAICT the only documented way to get rid of this anomalous behaviour
is to switch bash to posix mode.  I have read through the wheezy
bash(1) manpage and searched for posix, and the following behavioural
differences are described:

 * Differences in interative startup (not relevant to us).
 * Minor (irrelevant) differences in which startup files are read
   during noninteractive startup.  (Eg, BASH_ENV not honoured.)
 * Differences to the parsing of invocations of `time'
 * `test a == b' may be unsupported (but it's wrong and we say `=')
 * -e not inherited by some subshells (this is what I am trying to fix)
 * `.' and `source' do not search the cwd.
 * `set' with no arguments does not print shell functions etc.

So I think, with the previous patch, that these changes are all
desirable or at least harmless.

I have not added `set -o posix' to shell script fragments invoked by
various scripts (eg Perl and Tcl scripts).  Those scripts might be
processed by bash if /bin/sh is bash, but when is invoked as sh it
runs in posix mode anyway.

I have done some ad-hoc testing but it seems like much of this is
difficult to test.  I suggest we push it at a time when we can keep a
close eye on the behaviour.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
9 years agoShell fixup: Make all invocations of `.' (`source') use ./
Ian Jackson [Thu, 24 Sep 2015 15:46:44 +0000 (16:46 +0100)]
Shell fixup: Make all invocations of `.' (`source') use ./

In POSIX, `.' (the shell builtin) respects PATH, and does not search
`.' (the current directory).

Change all the invocations which refer to files which are part of
osstest to say `. ./foo' instead of simply `. foo'.

I have checked the results of
  git-grep '^[ \t]*\. [^./]'
after this patch and the remaining five hits are of no concern.

As a double-check of my hand-editing, I have also done this
  perl -i~ -pe 's#^(\s*\. )\./#$1#' *
and verified that the resulting tree is almost identical to that
before this commit.  There is one difference, where the original
code already said `. ./job'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
9 years agoRemove obsolete file "test.sched"
Ian Jackson [Thu, 24 Sep 2015 16:53:02 +0000 (17:53 +0100)]
Remove obsolete file "test.sched"

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
9 years agoDo not run baseline tests on osstest branch. flight-62445 flight-62527 flight-62528 flight-62529 flight-62530 flight-62531 flight-62532 flight-62535 flight-62536 flight-62537 flight-62538 flight-62540 flight-62541 flight-62542 flight-62543 flight-62544 flight-62545 flight-62546 flight-62547 flight-62548 flight-62549 flight-62550 flight-62551 flight-62552 flight-62553 flight-62554 flight-62555 flight-62556 flight-62557 flight-62559 flight-62560 flight-62561 flight-62562 flight-62563 flight-62564 flight-62565 flight-62566 flight-62568 flight-62569 flight-62570 flight-62571 flight-62572 flight-62573 flight-62574 flight-62575 flight-62576 flight-62577 flight-62578 flight-62579 flight-62580 flight-62581 flight-62582 flight-62583 flight-62584 flight-62585 flight-62586 flight-62587 flight-62589 flight-62590 flight-62591 flight-62592 flight-62594 flight-62595 flight-62596 flight-62597 flight-62598 flight-62599 flight-62600 flight-62601 flight-62602 flight-62603 flight-62604 flight-62606 flight-62607 flight-62608 flight-62609 flight-62610 flight-62611 flight-62612 flight-62613 flight-62614 flight-62615 flight-62616 flight-62617 flight-62618 flight-62619
Ian Campbell [Fri, 25 Sep 2015 10:21:08 +0000 (11:21 +0100)]
Do not run baseline tests on osstest branch.

If an osstest instance is running flights with
OSSTEST_BASELINES_ONLY=y (e.g. on a secondary site, like the Citrix
Cambridge instance) then it will also be running a regular osstest
flight to merge from the upstream osstest and does not want to also do
baseline testing.

I expect this will be the normal configuration in all sites other than
the master colo production instance, so arrange for it via
branch-settings.osstest rather than some site local configuration file.

In the colo production instance we never set OSSTEST_BASELINES_ONLY=y,
so this has no effect. If we did set that option I think suppressing it
for the osstest branch would still be correct.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoms-queuedaemon: Add report-projection
Ian Campbell [Thu, 17 Sep 2015 16:14:54 +0000 (17:14 +0100)]
ms-queuedaemon: Add report-projection

No semantic change. Eventually more work will be done which is wanted
in report-projection but not report-plan.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoms-queuedaemon: Break out catching-internally
Ian Jackson [Thu, 17 Sep 2015 16:14:53 +0000 (17:14 +0100)]
ms-queuedaemon: Break out catching-internally

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoms-queuedaemon: report-plan: Use rename-into-place for data-*.final.pl
Ian Jackson [Thu, 17 Sep 2015 16:14:52 +0000 (17:14 +0100)]
ms-queuedaemon: report-plan: Use rename-into-place for data-*.final.pl

This means that data-projection.final.pl is never a half-written file.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDebian: Wait for udev devices to settle in erase-other-disks
Ian Campbell [Wed, 23 Sep 2015 15:48:36 +0000 (16:48 +0100)]
Debian: Wait for udev devices to settle in erase-other-disks

Otherwise we, apparently, have a race between the "test -b" + dd
against the sda1 device node being removed and end up creating a file
called /dev/sda1 containing 32K of zeroes, which will later render
mke2fs very confused.

For some reason we seem to reliably loose the race on Jessie i386 host
installs, but not on Wheezy or other arches on Jessie.

This was tricky to diagnose because the Debian installer main-menu
process appears to buffer the output of things it runs before logging
them to /var/log/syslog, which means the output of "set -x" and the
actual affect of the commands (e.g. in the kernel messages) can be
presented in very confusing orders. Hence this patch also adds
extensive use of logger(1) to record what it is actually doing at the
time it does it. These logs include the pid of the command too  since
main-menu only logs its own pid, not that of the subcommand which
gneerated the output.

Lastly this patch adds an explicit test that each device it touches is
actually still a block device afterwards.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-xen-build-prep: don't attempt to extend volume group by 0.
Ian Campbell [Wed, 23 Sep 2015 10:51:38 +0000 (11:51 +0100)]
ts-xen-build-prep: don't attempt to extend volume group by 0.

overall_limit_pe can set its argument to 0 if the VG is already as
large as it is allowed to be.

In which case we would end up passing "-l +0" to lvextend, which it
complains about and then fails.

Move the clamping of $vg_more_free_pe to outside the check for it
being 0.

Based on a patch by Robert Ho.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Robert Ho <robert.hu@intel.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomake_qcow2: Look for qemu-img under /usr as well as /usr/local
Ian Campbell [Fri, 18 Sep 2015 15:34:43 +0000 (16:34 +0100)]
make_qcow2: Look for qemu-img under /usr as well as /usr/local

Older Xen's installed in /usr by default, so we need to check where
qemu-img if we want these tests to work on those versions.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: handle move of ip(8) to /sbin in Jessie
Ian Campbell [Mon, 21 Sep 2015 15:14:33 +0000 (16:14 +0100)]
Debian: handle move of ip(8) to /sbin in Jessie

Unfortunately udev treats non-absolute commands as relative to
/lib/udev rather than consulting $PATH, so we have to figure out the
path based on the suite.

Without this the force-mac-address workaround (needed on Arndale)
doesn't work.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoHost install: Move target_core_dump_setup call
Ian Jackson [Fri, 25 Sep 2015 11:16:14 +0000 (12:16 +0100)]
Host install: Move target_core_dump_setup call

Move this into host_install_postboot_complete.  All hosts subject to
host_install_postboot_complete should have the coredump settings too.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v14: New patch.
     Dropped patch which adds core_dump_setup call to ts-nested-setup

9 years agoHost install: Break out target_core_dump_setup
Ian Jackson [Fri, 25 Sep 2015 11:09:09 +0000 (12:09 +0100)]
Host install: Break out target_core_dump_setup

We are going to want to do this for nested HVM L1s too.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v14: Split this nfc patch out from other changes
     Drop changes to whitespace usage
     Rename new function from `core_dump_setup'
     Drop introduction of an unnecessary mkdir -p

9 years agoHost install: Break out host_install_postboot_complete
Robert Ho [Mon, 17 Aug 2015 06:15:24 +0000 (14:15 +0800)]
Host install: Break out host_install_postboot_complete

We are going to want to do this for nested HVM L1s too.

No functional change.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v14: Squashed two patches into this one.

9 years agoDebian HVM guests: Honour enable_nestedhvm guest runvar
Robert Ho [Mon, 17 Aug 2015 05:55:15 +0000 (13:55 +0800)]
Debian HVM guests: Honour enable_nestedhvm guest runvar

There are not yet any jobs which set this.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v14: Use guest_var_boolean

9 years agoDebian HVM guests: Honour guest disk and ram size runvars
Robert Ho [Mon, 17 Aug 2015 05:48:04 +0000 (13:48 +0800)]
Debian HVM guests: Honour guest disk and ram size runvars

Allow runvars to specify guest disk and ram size, turning previous
values into defaults:

The default disk size for the guest is `10000M' which is not going to
be sufficient for nested HVM tests.  We are going to want to use a
larger disk size for the nested L1.  The appropriate disk_size will be
defined in make-flight, in forthcoming changes.

Also, also allow ram size to be defined by runvar.  The runvar takes
precedence over the default (which is calculated based on host RAM
etc.)

No functional change with current sets of runvars.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian HVM guests: Comment out CDROM entry in HVM guest VM
Robert Ho [Mon, 17 Aug 2015 05:52:35 +0000 (13:52 +0800)]
Debian HVM guests: Comment out CDROM entry in HVM guest VM

Comment out the CDROM entry in the installed system's sources.list.
The installation ISO is not generally present in the virtual CDROM
while the guest is running, so this entry is nonfunctional.

Removing it causes the L1 HVM guest VM to use the http entry instead.
The result is that now `apt-get' works in the guest.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian grub2: Correct a mistake in Xen entry parsing pattern
Robert Ho [Mon, 17 Aug 2015 05:46:18 +0000 (13:46 +0800)]
Debian grub2: Correct a mistake in Xen entry parsing pattern

In b77a6a2522d8 "Changes to support '/boot' leading paths of kernel,
xen, in grub", this pattern was erroneously changed.

Revert that aspect of that commit, so that we once again require Xen
image versions to start with a digit.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian grub2: Optimize and re-format submenu parsing
Robert Ho [Mon, 17 Aug 2015 03:34:04 +0000 (11:34 +0800)]
Debian grub2: Optimize and re-format submenu parsing

* space between ')' and '{'; and after '='
* omit unnecessary 'define' and '!defined' usage
* break long '{}' into several lines

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v14: Drop removal of MenuEntryPath setting in grub2 submenu parse

9 years agoTcl: Provide lunappend
Ian Jackson [Tue, 30 Jun 2015 15:57:39 +0000 (16:57 +0100)]
Tcl: Provide lunappend

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Tested-by: Robert Ho <robert.hu@intel.com>
9 years agoCorrect html syntax error color=="#xxxxxx" => color="#xxxxxx" flight-62284 flight-62345 flight-62351 flight-62352 flight-62353 flight-62354 flight-62356 flight-62357 flight-62358 flight-62359 flight-62360 flight-62361 flight-62362 flight-62363 flight-62364 flight-62365 flight-62366 flight-62367 flight-62368 flight-62369 flight-62370 flight-62371 flight-62372 flight-62373 flight-62374 flight-62375 flight-62376 flight-62377 flight-62378 flight-62379 flight-62380 flight-62381 flight-62382 flight-62383 flight-62384 flight-62385 flight-62386 flight-62387 flight-62388 flight-62389 flight-62390 flight-62391 flight-62392 flight-62393 flight-62394 flight-62395 flight-62396 flight-62397 flight-62398 flight-62399 flight-62400 flight-62401 flight-62402 flight-62403 flight-62404 flight-62405 flight-62406 flight-62407 flight-62408 flight-62409 flight-62410 flight-62411 flight-62412 flight-62413 flight-62414 flight-62415 flight-62416 flight-62417 flight-62418 flight-62419 flight-62420 flight-62421 flight-62422 flight-62423 flight-62424 flight-62425 flight-62426 flight-62427 flight-62428 flight-62429 flight-62430 flight-62431 flight-62432 flight-62433 flight-62434 flight-62435 flight-62436 flight-62437 flight-62438 flight-62439 flight-62440 flight-62441 flight-62442 flight-62443 flight-62444 flight-62446 flight-62447 flight-62448 flight-62449 flight-62450 flight-62451 flight-62452 flight-62453 flight-62454 flight-62455 flight-62456 flight-62457 flight-62458 flight-62459 flight-62460 flight-62461 flight-62462 flight-62463 flight-62464 flight-62465 flight-62466 flight-62467 flight-62468 flight-62469 flight-62470 flight-62471 flight-62472 flight-62473 flight-62474 flight-62475 flight-62476 flight-62477 flight-62478 flight-62479 flight-62480 flight-62481 flight-62482 flight-62483 flight-62484 flight-62485 flight-62486 flight-62490 flight-62491 flight-62492 flight-62493 flight-62494 flight-62495 flight-62496 flight-62497 flight-62498 flight-62499 flight-62500 flight-62501 flight-62502 flight-62503 flight-62504 flight-62505 flight-62506 flight-62507 flight-62508 flight-62509 flight-62510 flight-62511 flight-62512 flight-62513 flight-62514 flight-62515 flight-62516 flight-62517 flight-62518 flight-62519 flight-62520 flight-62521 flight-62522 flight-62523 flight-62524 flight-62525 flight-62526
Ian Campbell [Mon, 21 Sep 2015 10:40:52 +0000 (11:40 +0100)]
Correct html syntax error color=="#xxxxxx" => color="#xxxxxx"

Strangely the effect of this (with iceweasel) was that everything was
cyan (#00fff0?) instead of the intended black or white.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: Avoid uninitialised string warn when getting host firmware property
Ian Campbell [Mon, 21 Sep 2015 15:14:30 +0000 (16:14 +0100)]
Debian: Avoid uninitialised string warn when getting host firmware property

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoproduction-config-cambridge: Use git-cache.daemon.osstest.xs.citrite.net
Ian Campbell [Tue, 22 Sep 2015 11:30:07 +0000 (12:30 +0100)]
production-config-cambridge: Use git-cache.daemon.osstest.xs.citrite.net

This currently points to drall, so no actual change, but it decouples
the service from the host which happens to run it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoExecutive: Delay releasing build host shares by 90s
Ian Jackson [Mon, 21 Sep 2015 16:49:48 +0000 (17:49 +0100)]
Executive: Delay releasing build host shares by 90s

When a build job finishes, the same flight may well want to do a
subsequent build that depended on the first.  When this happens, we
have a race:

One the one hand, we have the flight: after sg-run-job exits,
sg-execute-flight needs to double-check the job status, and search the
flight for more jobs to run; it will spawn ts-allocate-hosts-Executive
for the new job, which needs to get its head together, parse its
arguments, become a client of the queue daemon, and ask to be put in
the queue.

On the other hand, we have the planning system: currently, as soon as
sg-run-job exits, the connection to the ownerdaemon closes.  The
ownerdaemon tells the queue daemon, and the planning queue is
restarted.  It might even happen that coincidentally the planning
queue is about to start.

If the planning system wins the race, another job will pick up the
newly-freed resource.  Often this will mean unsharing the build host,
which is very wasteful if the releasing flight hasn't finished its
builds for that architecture: it means that the next build job needs
to regroove a host for builds.

Add a bodge to try to make the race go the other way: after a build
job completes successfuly, do not give up the share for a further 90
seconds.  (We have to use setsid because sg-execute-flight kills the
process group to clean up stray processes, which this sleep definitely
is.)

A better solution would be to move the wait-for-referenced-job logic
from sg-execute-flight to ts-hosts-allocate-*.  But that would be much
more complicated.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: New patch

9 years agocri-common: Add a missing semicolon
Ian Jackson [Fri, 18 Sep 2015 17:13:25 +0000 (18:13 +0100)]
cri-common: Add a missing semicolon

This is not technically needed as bash interprets `a=1 b=2' as
settings of both a and b.  But it's not idiomatic sh within osstest to
use this syntax.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDebian i386 HVM tests: Increase installation timeout
Ian Jackson [Fri, 18 Sep 2015 16:28:46 +0000 (17:28 +0100)]
Debian i386 HVM tests: Increase installation timeout

The Debian i386 image boots a 32-bit non-PAE kernel which therefore
cannot have any PV drivers on our 64-bit hypervisors.  This makes it a
bit slow: in my test on a machine under my desk it took 1400s out of
the allowed 2000s.

With this change the timeout is 3000s instead.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTimeouts: Honour guest-related timeout-adjustment runvars
Ian Jackson [Fri, 18 Sep 2015 16:26:44 +0000 (17:26 +0100)]
Timeouts: Honour guest-related timeout-adjustment runvars

We look up a guest runvar GUEST_CONTEXT_timeoutfactor (according to
the usual rules for guest runvars).

Here CONTEXT can currently be `general' or `install'.  (`install'
applies when the guest is being installed.)  If the runvar exists, all
timeouts relating to that guest in that context are increased by the
specified factor.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTimeouts: Introduce target_adjust_timeout
Ian Jackson [Fri, 18 Sep 2015 16:23:39 +0000 (17:23 +0100)]
Timeouts: Introduce target_adjust_timeout

This function is now called for almost every timeout.

Specifically, it is called in the cases in TestSupport where a guest-
or host-related timeout is passed from code which has a $ho or $gho,
to code which does not: all callers of poll_loop, and tcmd.

Currently the function is a no-op.  Its existence and use will allow
us to introduce various provocations for adjusting timeouts, of which
I have one planned.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-hvm-install: Use /dev/sda for i386, not /dev/xvda
Ian Jackson [Fri, 18 Sep 2015 15:24:24 +0000 (16:24 +0100)]
ts-debian-hvm-install: Use /dev/sda for i386, not /dev/xvda

The device shows up as /dev/sda in the installer.  This is because the
i386 installer image (in wheezy and jessie, at least) is not PAE, and
therefore does not load PVHVM drivers and therefore does not switch
from the emulated device (which shows up as /dev/sda) to blockfront
(/dev/xvda).

There are ways it might be possible to provide an i386 install image
with PVHVM drivers (for example, the Xen-enabled i386 kernel on the
multi-arch ISO).  However it is useful to have a test job which tests
both emulated devices and PVHVM ones, within a single job, and even on
my ancient under-desk test box (bedbug) the whole test takes only 28
minutes, which seems fine even as part of the fast smoke test.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-hvm-install: Do not create EFI partition if EFI not in use
Ian Jackson [Fri, 18 Sep 2015 15:21:45 +0000 (16:21 +0100)]
ts-debian-hvm-install: Do not create EFI partition if EFI not in use

If we are booting our install ISO using a non-EFI executable, don't
try to provide an EFI for the installed system either.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Fix regexp to match efi.img (!)
    Rebased, fixed code motion conflict.

9 years agots-debian-hvm-install: Set $gsuite after $gho
Ian Jackson [Fri, 18 Sep 2015 14:35:47 +0000 (15:35 +0100)]
ts-debian-hvm-install: Set $gsuite after $gho

$gsuite was set from guest_var, but before $gho was set, leading to an
undefined value warning from Perl.

This would ignore any guest-specific suite runvars.  AFAICT these are
set by some of the jobs in make-distros-flight.  I think the effect of
this change is to apply workarounds for the intended suite, rather
than for wheezy.

(Although there is another assignment to $gho later in
ts-debian-hvm-install, for stage 2, the stage 2 code does some trivial
TestSupport calls and does not need $gsuite.  So there is no need to
make arrangements to assign to $gsuite - or, for that matter, $kernel
or $ramdisk, in that path.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-hvm-install: Cope with images containing only isolinux
Ian Jackson [Fri, 18 Sep 2015 14:30:57 +0000 (15:30 +0100)]
ts-debian-hvm-install: Cope with images containing only isolinux

debian-7.2.0-i386-CD-1.iso contains no grub, only isolinux.

If the specified EFI grub file does not exist, fall back to isolinux.
This requires a -c option as well, according to
  https://wiki.debian.org/DebianInstaller/Modify/CD

Only try to set up a grub config if we are booting grub.  (The i386
image in question does not contain a [debian]/boot/grub directory.)

If boot/grub/efi.img _does_ exist (ie, for other existing tests), the
only difference in behaviour is to reorder slightly the options to
genisoimage: `-b boot/grub/efi.img' now occurs after `-no-emul-boot
-r' rather than before.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Log $bootfile value.
    Preseed generation now happens later due to previous patch;
      so $bootfile setting now also deferred.  Context change only.

9 years agots-debian-hvm-install: Defer preseed generation
Ian Jackson [Mon, 21 Sep 2015 14:13:23 +0000 (15:13 +0100)]
ts-debian-hvm-install: Defer preseed generation

Defer preseed file generation until after we have fetched and looked
inside the install image, because we are going to want to make changes
to the preseed file based on the image contents.

No overall functional change, although some things happen in a
different order now, and the ISO manipulation takes place in two calls
to target_cmd_root rather than one.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: New patch.  Needed because otherwise the test for the grub install
    image (to be introduced in the next patch) happens before the ISO
    is unpacked, and we would then always fall back to isolinux.

9 years agots-debian-hvm-install, etc.: Do not hardcode in-iso path
Ian Jackson [Fri, 18 Sep 2015 13:57:47 +0000 (14:57 +0100)]
ts-debian-hvm-install, etc.: Do not hardcode in-iso path

ts-debian-hvm-install hardcoded `install.amd' as the directory in the
.iso in which to find the kernel and initrd.  This is wrong for
architectures other than amd64.

Instead, pass this information in runvars (as is done for the netinst
installs in make-distros-flight), and honour it in
ts-debian-hvm-install.

If the runvars are not set, default to the previous hardcoded values.
(This arranges that clones of old flights still work with new osstest,
eg for bisection.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocrontab: Enable xen-unstable-smoke branch every 3h at <1mod3>:51 UTC
Ian Jackson [Thu, 27 Aug 2015 15:55:13 +0000 (16:55 +0100)]
crontab: Enable xen-unstable-smoke branch every 3h at <1mod3>:51 UTC

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoap-*: Be able to fetch and push xen.git#smoke
Ian Jackson [Wed, 8 Jul 2015 15:21:05 +0000 (16:21 +0100)]
ap-*: Be able to fetch and push xen.git#smoke

The branches and push gates are now:
 xen.git#staging -[xen-unstable-smoke]-> #smoke -[xen-unstable]-> #master

Deployment note: When this passes the osstest self-push-gate, the main
xen-unstable flight will start using smoke as an input.  Therefore,
until the new cronjob is installed to run the xen-unstable-smoke
tests, an automatic process should keep xen.git#smoke up to date with
xen.git#staging.  Eg, running in screen in xen@xenbits:~/git/xen.git:
    while sleep 1800; do git fetch . staging:smoke; done

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: `xen.git#smoked' branch name changed to `#smoke'

9 years agocr-daily-branch: Use mg-adjust-flight-makexrefs to have smoke tests reuse builds
Ian Jackson [Thu, 17 Sep 2015 15:17:25 +0000 (16:17 +0100)]
cr-daily-branch: Use mg-adjust-flight-makexrefs to have smoke tests reuse builds

The smoke tests are for testing xen-unstable.  We want to avoid
building anything else.  So arrange to reuse previous builds by
calling mg-adjust-flight-makexrefs.

We rebuild libvirt too.  This is necessary because libvirt is built
against xen.git, and uses ABI-unstable APIs, so we need a libvirt
built against the right xen.git.  This means, for the smoke tests, we
need to build libvirt ourselves.  Currently this build seems to take
416 sends (from host allocation, which we - perhaps naively - hope
will be able to reuse the host from the just-finished build job).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Keep build-amd64-libvirt too.
v3: Add a comment about the --blessings=real
v2: New patch

9 years agoProvide xen-unstable-smoke branch
Ian Jackson [Fri, 3 Jul 2015 18:56:45 +0000 (19:56 +0100)]
Provide xen-unstable-smoke branch

Introduce support for branch=qemu-xen-unstable-smoke which has
xenbranch=xen-unstable-smoke.

In make-flight, this contains a very limited set of jobs
    test-amd64-amd64-libvirt
    test-amd64-amd64-xl-qemuu-debianhvm-i386
    test-armhf-armhf-xl
and the builds they depend on.

The debianhvm job exists only in this flight, and is generated by
having branch_debianhvm_arch return i386 instead of amd64.  This is so
that this branch contains a 32-bit x86 guest as well as a 64-bit one.

We override host allocator parameters to make this flight not care
about host stickiness: it just takes whatever comes to hand.  These
runvars are marked `synth' so that cs-bisection-step and
cs-adjust-flight do not copy them, as discussed in previous patches.

Later we will arrange to reuse previous builds for the build artefacts
which aren't intended subjects of the smoke test.

(Deployment note: This needs images/debian-7.2.0-i386-CD-1.iso which I
have already placed in the Cambridge and Xen Project instances.)

In ap-common we need to arrange to use the same qemu trees as for
xen-unstable, rather than looking for special smoke ones.

In select_xenbranch xen-unstable-smoke is mostly like xen-unstable.

There are only two places in osstest where xenbranch `xen-unstable' is
treated specially and only one of them needs adjusting to match
xen-unstable-smoke too.

The new branch `xen-unstable-smoke' has a `prev' branch of
`xen-unstable' according to cri-getprevxenbranch, which is technically
wrong, but this is not important because xen-unstable-smoke has no
prev tests.

We are going to sort out the push gate ref plumbing in xen.git in the
next osstest patch.

Also, use a branch-settings file to set the new branch's resource
priority to -20 to make it run ahead of anything else automatic.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Introduce xenbranch_forqemu into ap-common.
    Combine patches for make-flight and cr-*.  make-flight includes
    cri-common and ap-common (which is arguably a layering violation,
    but there we are).
    Dropped ack from Ian Campbell.
    Set `qemuubranch' correctly in select_xenbranch.
v2: Generate all the jobs that this flight's tests use, and add
    note about this to the commit message.
    Mention `synth'-ness of hostalloc runvars in commit message.
    Image is in Xen Project test colo too.

9 years agomake-flight: mfi-common: Honour $global_runvars
Ian Jackson [Wed, 16 Sep 2015 12:06:51 +0000 (13:06 +0100)]
make-flight: mfi-common: Honour $global_runvars

Provide a way for the main script to set some runvars on all jobs.  We
expect this to be mostly set with +=.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomake-flight: Run job_create_test_filter_callback on true job name
Ian Jackson [Fri, 3 Jul 2015 18:55:32 +0000 (19:55 +0100)]
make-flight: Run job_create_test_filter_callback on true job name

job_create_test would pass $job to job_create_test_filter_callback but
then later maybe append -xsm to it.  Fix this.

No functional change for existing in-tree code because all existing
tests of the $job end in *.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Fix textual conflict after dropping "make-flight: Allow separate
    specification of pre-built Xen vs others"

9 years agomake-flight: Contemplate varying architecture for Debian HVM
Ian Jackson [Fri, 3 Jul 2015 18:38:54 +0000 (19:38 +0100)]
make-flight: Contemplate varying architecture for Debian HVM

In the Debian hvm tests, ask branch_debianhvm_arch for the
architecture to use.  This currently prints only amd64.

While we are here, provide some comments about the (somewhat
confusing) argument conventions of do_hvm_debian_test_one.

No functional change yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoNew utility mg-adjust-flight-makexrefs
Ian Jackson [Thu, 17 Sep 2015 16:00:44 +0000 (17:00 +0100)]
New utility mg-adjust-flight-makexrefs

This provides a fairly cooked way of adjusting an existing flight to
reuse previous builds.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

9 years agocs-adjust-flight: Provide `jobs-del' operation
Ian Jackson [Thu, 17 Sep 2015 12:43:17 +0000 (13:43 +0100)]
cs-adjust-flight: Provide `jobs-del' operation

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Document the new operation
v2: New patch

9 years agocs-adjust-flight: Break out job removal machinery
Ian Jackson [Thu, 17 Sep 2015 12:40:53 +0000 (13:40 +0100)]
cs-adjust-flight: Break out job removal machinery

Make @job_rm_qs a global variable (initialised idempotently by a new
function prep_rm_jobs) and $rm_job into a named global subroutine
do_rm_job.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

9 years agocs-adjust-flight: Provide `jobs-list' operation
Ian Jackson [Thu, 17 Sep 2015 12:39:52 +0000 (13:39 +0100)]
cs-adjust-flight: Provide `jobs-list' operation

This makes no change to the target flight.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

9 years agosg-check-tested: New --pass-job= option
Ian Jackson [Wed, 16 Sep 2015 15:48:05 +0000 (16:48 +0100)]
sg-check-tested: New --pass-job= option

Specifies that returned information should relate to a flight in which
a particular job existed and passed.  The option can be repeated if
desired (to specify flights in which _all_ those jobs passed).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

9 years agosg-report-flight: Better searching for used revisions
Ian Jackson [Mon, 21 Sep 2015 13:35:15 +0000 (13:35 +0000)]
sg-report-flight: Better searching for used revisions

The old algorithm used for determining which flight might be a
suitable test of a particular revision was rather crude, in two ways:

 * It would look at _all_ jobs in a flight referred to from the flight
   of interest, not just at the relevant jobs;

 * It would only look at the direct referents of the flight in
   question.  So for example, if a flight of interest contained
   test-amd64-i386-libvirt, it would find a referenced
   build-i386-libvirt in another flight, but that build refers to
   build-i386, and it would not look at that (unless it happened to be
   in the same flight).

Fix this by redoing the revision archaeology, with some $why tracking
to explain how we found a particular revision.

cs-bisection-step and sg-check-tested arguably ought to do do it this
way too.  But I am leaving centralising this new logic, and using it
in those other programs, for another day.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: New patch

9 years agots-host-alloc-Executive: Honour various hostalloc_* runvars
Ian Jackson [Thu, 2 Jul 2015 17:27:28 +0000 (18:27 +0100)]
ts-host-alloc-Executive: Honour various hostalloc_* runvars

We honour
  hostalloc_maxbonus_variation
  hostalloc_bonus_previousfail
  hostalloc_bonus_sharereuse
and make them default to their previous values.

These should be set as `synth' runvars during flight construction, so
that they are not copied into flights generated by cs-bisection-step
or cs-adjust-flight.  cs-bisection-step makes its own arrangements for
host specification.  So should the caller of cs-adjust-flight (perhaps
via the blessing system).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Incorporate note about `synth'-ness in commit message.

9 years agostandalone-generate-dump-flight-runvars: Show synth runvars
Ian Jackson [Wed, 16 Sep 2015 12:14:47 +0000 (13:14 +0100)]
standalone-generate-dump-flight-runvars: Show synth runvars

Pass -a to mg-show-flight-runvars.  That way when we use the new
cs-job-create feature to set synth runvars during creation, we will
see them in the dump.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomg-show-flight-runvars: Decorate synth runvar names with ~
Ian Jackson [Wed, 16 Sep 2015 12:09:01 +0000 (13:09 +0100)]
mg-show-flight-runvars: Decorate synth runvar names with ~

Make mg-show-flight-runvars -a append ~ to the names of synth runvars.
(This is consistent with the new syntax in cs-job-create.)

We do this by editing $row[1] (and $colws[1]) so we can avoid
disturbing the general column format calculation and printing.

We switch to fetchrow_array rather than fetchrow_arrayref.  This is
clearer and also avoids having to copy $row (because the value in the
DB $row from fetchrow_hashref would be readonly).

We have to check for $synth eq 'f' as well as $synth being boolean
false, because SQLite's typeless nature (or, to put it another way,
DBD::SQLite's failure to look at the schema) means that a boolean
field's value of 'f' or 't' is simply returned as a string to Perl.
But of course "f" is trueish in Perl.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Use fetchrow_array instead.
    Do not mistakenly drop the $synthcond assignment (!)

9 years agocs-job-create: Permit creation of `synth' runvars
Ian Jackson [Thu, 2 Jul 2015 17:33:19 +0000 (18:33 +0100)]
cs-job-create: Permit creation of `synth' runvars

This will be useful for some hostalloc_* runvars which we are going to
introduce shortly.

This is going to be the way to set a runvar which is not copied by
cs-bisection-step or cs-adjust-flight.  Using `synth' for this is
arguably slightly wrong but it does the right thing in all existing
cases.  The alternative would be a schema change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Defer some of the discussion to later commit messages.

9 years agomg-debian-installer-update: download default armhf kernel as "linux" flight-62130 flight-62217 flight-62234 flight-62236 flight-62238 flight-62239 flight-62243 flight-62244 flight-62245 flight-62246 flight-62247 flight-62248 flight-62249 flight-62251 flight-62252 flight-62254 flight-62255 flight-62256 flight-62257 flight-62258 flight-62259 flight-62260 flight-62261 flight-62262 flight-62263 flight-62264 flight-62265 flight-62266 flight-62267 flight-62268 flight-62269 flight-62270 flight-62271 flight-62272 flight-62273 flight-62274 flight-62275 flight-62277 flight-62278 flight-62279 flight-62280 flight-62281 flight-62282 flight-62285 flight-62287 flight-62288 flight-62290 flight-62291 flight-62292 flight-62293 flight-62294 flight-62295 flight-62296 flight-62297 flight-62298 flight-62299 flight-62300 flight-62302 flight-62303 flight-62304 flight-62305 flight-62306 flight-62307 flight-62308 flight-62310 flight-62312 flight-62313 flight-62314 flight-62315 flight-62316 flight-62317 flight-62318 flight-62319 flight-62320 flight-62321 flight-62322 flight-62323 flight-62324 flight-62325 flight-62326 flight-62327 flight-62328 flight-62329 flight-62331 flight-62334 flight-62337 flight-62338 flight-62339 flight-62340 flight-62342 flight-62343 flight-62344 flight-62346 flight-62348 flight-62349 flight-62350
Ian Campbell [Fri, 18 Sep 2015 14:45:11 +0000 (15:45 +0100)]
mg-debian-installer-update: download default armhf kernel as "linux"

This is what the other arches do, and is what ts-host-install expects.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoREADME.dev: Some words on what is needed when updating the daemons.
Ian Campbell [Thu, 17 Sep 2015 15:09:37 +0000 (16:09 +0100)]
README.dev: Some words on what is needed when updating the daemons.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomake-flight: Add a minimum linux version requirement to all linux-* branches
Ian Campbell [Wed, 16 Sep 2015 11:47:44 +0000 (12:47 +0100)]
make-flight: Add a minimum linux version requirement to all linux-* branches

We have some hosts in the colo which are not supported by older Linux
versions.

Add a suitable hostflag using the new resource conditions syntax to
cause this to occur.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoAdd support for selecting resources based on their properties.
Ian Campbell [Wed, 16 Sep 2015 11:47:43 +0000 (12:47 +0100)]
Add support for selecting resources based on their properties.

In particular for allocating hosts based on host properties.

To do this we extend the hostflags syntax with "condition:arg1:arg2".
This specifies that the candidate host must pass the condition given
the arguments.

Each "condition" is a new module in the Osstest::ResourceCondition
namespace. For each condition an object is constructed using the given
arguments (split on ':') and stored in $hid.

When allocating for each candidate host the object's ->check method is
called giving $restype and $resname and will return true or false
depending on whether the given host meets the condition.

Only a single condition is implemented here "PropMinVer" which
requires that a given property on the resource has at least the given
value when compared as a version string. Enforce that the database and
the resource property both use the canonical CamelCase naming through
the use of the newly added here propname_check function. Lack of the
property being compared is taken a "no restriction" and hence is
allowed.

Osstest::cfgvar_re is exported for use in the new propname_check
function.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-hosts-allocate-Executive: add a label to loop over candidates
Ian Campbell [Wed, 16 Sep 2015 11:47:42 +0000 (12:47 +0100)]
ts-hosts-allocate-Executive: add a label to loop over candidates

I'm going to want to "next CANDIDATE" from within a nested loop.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-hosts-allocate-Executive: Allow dry-run
Ian Campbell [Wed, 16 Sep 2015 11:47:41 +0000 (12:47 +0100)]
ts-hosts-allocate-Executive: Allow dry-run

Provide a new -n command line option which causes no allocations to be
done, for debugging.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agosg-run-job: support dropping in adhoc test recipes
Ian Campbell [Tue, 15 Sep 2015 09:00:46 +0000 (10:00 +0100)]
sg-run-job: support dropping in adhoc test recipes

By reading sg-run-job-adhoc if it exists.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs
Ian Campbell [Tue, 15 Sep 2015 09:00:45 +0000 (10:00 +0100)]
cs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs

When constructing an adhoc test it may be useful to copy an existing
job's configuration but run it with a custom recipe.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocr-ensure-disk-space: Take the flights db lock
Ian Jackson [Fri, 3 Jul 2015 16:54:28 +0000 (17:54 +0100)]
cr-ensure-disk-space: Take the flights db lock

This eliminates the race with cs-bisection-step (and other
flight-construction tools which might reuse previous flights, provided
that they also do not pass previous flight numbers from hand to hand
with the db unlocked).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocr-ensure-disk-space: Make main loop body into a subroutine
Ian Jackson [Fri, 3 Jul 2015 16:50:46 +0000 (17:50 +0100)]
cr-ensure-disk-space: Make main loop body into a subroutine

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocr-ensure-disk-space: Look at referring flights
Ian Jackson [Fri, 3 Jul 2015 16:39:41 +0000 (17:39 +0100)]
cr-ensure-disk-space: Look at referring flights

Previously the flight to delete was simply the one with the lowest
flight number.  Now we sort flights not by their own flight number,
but by the highest flight number of any referencing flight.

This means that flights whose builds are being reused are kept as long
as the reusing flights.

This almost-entirely fixes a largely-theoretical race in the way
cs-bisection-step works (where the flight's logs and build outputs
might be deleted between the setup and execution of the referring
flight).

A smaller race still exists because the stash check in
cs-bisection-step occurs before the being-created flight is visible to
other db clients.  We will have to fix this by taking the flights
lock.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocr-ensure-disk-space: Honour -D
Ian Jackson [Fri, 3 Jul 2015 16:39:08 +0000 (17:39 +0100)]
cr-ensure-disk-space: Honour -D

Provide DEBUG and use db_prepare.  For now that is the only debugging
output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoap-push: Use refs/heads/ for destinations
Ian Jackson [Thu, 27 Aug 2015 15:37:17 +0000 (16:37 +0100)]
ap-push: Use refs/heads/ for destinations

When the destination is a branch, specify refs/heads/ explicitly.
This makes ap-push work even if the ref does not yet exist on the
destination.

There is no functional change for an existing installation pushing to
an existing branch.  But for a hypothetical new installation, this
would be necessary.

And, more relevantly, when new "branches" are invented, the use of an
existing ap-push case as a template will generate a new case which
creates the branch as is necessary.

I leave the more complex osstest case alone.  It's not clear to me
whether the destination ref not existing is an installation problem of
such severity that indeed ap-push should fail.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoap-fetch-version*: Unwrap xen-unstable lines
Ian Jackson [Thu, 27 Aug 2015 15:11:35 +0000 (16:11 +0100)]
ap-fetch-version*: Unwrap xen-unstable lines

Whitespace and \ change only.  Makes the next patch a bit clearer.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomfi-common: Use job_create_build for build-*-prev
Ian Jackson [Fri, 28 Aug 2015 17:47:10 +0000 (18:47 +0100)]
mfi-common: Use job_create_build for build-*-prev

This causes it to call job_create_build_filter_callback but has no
ultimate functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agostandalone mode: Fix two SQL `TRUE's
Ian Jackson [Thu, 17 Sep 2015 15:40:52 +0000 (16:40 +0100)]
standalone mode: Fix two SQL `TRUE's

SQL has no portable boolean true literal (really).  SQLite3 does not
understand `TRUE'.  Use `1=1' instead.

This means that mg-show-flight-runvars -a will work in standalone
mode.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch

9 years agostandalone-generate-dump-flight-runvars: memoise ap-fetch
Ian Jackson [Fri, 28 Aug 2015 18:11:27 +0000 (19:11 +0100)]
standalone-generate-dump-flight-runvars: memoise ap-fetch

This makes it _much_ faster.

Also you can say AP_FETCH_MEMO_KEEP=1 to make it reuse old
information, which is useful for making comparisons.

For a further speed improvement, one can use `eatmydata'.  This is not
the default because it risks corruption of `standalone.db' which is
used for other purposes too.  Add a comment about possibly improving
this.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomemoise: New utility
Ian Jackson [Fri, 28 Aug 2015 18:09:27 +0000 (19:09 +0100)]
memoise: New utility

Give this a GPLv2+ licence so that we can move it into some other
FLOSS package later.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Do not use FSF street address in copyright notice.
    Ship a copy of GPL-3.

9 years agocr-daily-branch: Honour AP_FETCH_PFX
Ian Jackson [Fri, 28 Aug 2015 17:53:18 +0000 (18:53 +0100)]
cr-daily-branch: Honour AP_FETCH_PFX

This environment variable is prefixed to all cr-daily-branch's command
lines involving ap-fetch.  We are going to use this for memoisation.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agostandalone: Set very long SQLite3 busy timeout in Perl
Ian Jackson [Tue, 15 Sep 2015 17:24:17 +0000 (18:24 +0100)]
standalone: Set very long SQLite3 busy timeout in Perl

Without this, big standalone-generate-dump-flight-runvars jobs may
trying to serialise so much work that SQLite3 times out.  And we are
about to introduce an optimisation which makes this much more likely.

In standalone mode we probably don't care much about this timeout at
all.  (It might even be that the user is using sqlite(3) and has
effectively locked the database interactively for an extended period.)

We would prefer to rely on the user to stop anything that seems to
have become stuck.  So set the timeout to 10ks.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agostandalone: Do not blunder on after errors
Ian Jackson [Wed, 16 Sep 2015 12:34:28 +0000 (13:34 +0100)]
standalone: Do not blunder on after errors

./standalone's with_logging function would _log_ errors, but it
wouldn't exit immediately.  As a result, the script would blunder on.

Normally it wouldn't do very much more since most of the with_logging
calls are the last thing it does - but the exit status would be wrong
(0, from echo).

As a result, for example, standalone-generate-dump-flight-runvars
would never properly report make-flight failures.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomg-list-all-branches: Suppress `maintjobs'
Ian Jackson [Wed, 16 Sep 2015 13:00:42 +0000 (14:00 +0100)]
mg-list-all-branches: Suppress `maintjobs'

This is not a real branch; it's a cron working directory, only.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoExecutive: cs-job-create: Check that OSSTEST_FLIGHT is not set
Ian Jackson [Wed, 16 Sep 2015 12:28:54 +0000 (13:28 +0100)]
Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set

If OSSTEST_FLIGHT is set on entry to JobDB::Executive::flight_create,
fail.  This obviously represents some kind of mistake.

One effect is that standalone-generate-dump-flight-runvars won't fill
an Executive database with test flights.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agodocs: Document OSSTEST_RESOURCE_PRIORITY values in README.planner
Ian Jackson [Wed, 16 Sep 2015 13:26:45 +0000 (14:26 +0100)]
docs: Document OSSTEST_RESOURCE_PRIORITY values in README.planner

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoExecutive: Abolish use of the `configdb' flight-61994 flight-62072 flight-62127 flight-62128 flight-62129 flight-62131 flight-62132 flight-62139 flight-62140 flight-62141 flight-62142 flight-62144 flight-62145 flight-62146 flight-62147 flight-62148 flight-62149 flight-62150 flight-62151 flight-62152 flight-62153 flight-62154 flight-62155 flight-62156 flight-62157 flight-62158 flight-62159 flight-62161 flight-62163 flight-62164 flight-62167 flight-62168 flight-62169 flight-62170 flight-62171 flight-62172 flight-62173 flight-62174 flight-62175 flight-62176 flight-62177 flight-62178 flight-62179 flight-62180 flight-62181 flight-62182 flight-62183 flight-62184 flight-62185 flight-62186 flight-62187 flight-62188 flight-62189 flight-62190 flight-62191 flight-62192 flight-62193 flight-62194 flight-62195 flight-62196 flight-62197 flight-62198 flight-62199 flight-62200 flight-62201 flight-62202 flight-62203 flight-62204 flight-62205 flight-62206 flight-62207 flight-62208 flight-62209 flight-62210 flight-62211 flight-62212 flight-62213 flight-62214 flight-62215 flight-62216 flight-62218 flight-62219 flight-62220 flight-62221 flight-62222 flight-62223 flight-62224 flight-62225 flight-62226 flight-62227 flight-62228 flight-62229 flight-62230
Ian Jackson [Mon, 14 Sep 2015 10:55:08 +0000 (11:55 +0100)]
Executive: Abolish use of the `configdb'

This was a database used by networking infrastructure on the
now-obsolete XenClient network in the Citrix Cambridge office (which
used some management tools developed by Mythic Beasts).

The production database in Cambridge no longer has the configdb, and
both instances have `HostDB_Executive_NoConfigDB 1' in the
configuration.  We think it very unlikely that anyone has as similar
arrangement.

Remove all the code for accessing this database.  We leave the config
settings `NoConfigDB' for now, for the benefit of ad-hoc trees which
are not immediately updated but which use their site's official
production-config.  They can be deleted later.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocs-bisection-step: Cope with graph-out (testids) containing ( ) etc.
Ian Jackson [Fri, 11 Sep 2015 15:27:08 +0000 (16:27 +0100)]
cs-bisection-step: Cope with graph-out (testids) containing ( ) etc.

cr-try-bisect launders / in the testid but relies on other characters
being handled appropriately by cs-bisection-step.  So for example it
can pass

  graph-out=/home/logs/results/bisect/linux-linus/test-armhf-armhf-xl-arndale.leak-check--basis(8)

But cs-bisection step foolishly assumed that the --graph-out argument
did not contain any shell metacharacters.  Fix this.

Specifically:

 * Change invocations of perl's open to use the 3-argument form
 * Change invocations of system to pass individual arguments rather
   than constructing a shell script fragment and relying on the shell
   to split it up.
 * In particular, in the png processing pipeline, use the "sh -ec
   <script> x <arg>..."  technique to pass the input and output
   filenames in a way that does not expose them to the shell's parser.
   To avoid making this code more tangled than it already is, also
   break out the construction of what is now $scriptlet.
 * Escape metacharacters in the URIs we put in the html output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocrontab-cambridge: Add distros-debian-stretch
Ian Campbell [Mon, 14 Sep 2015 10:20:07 +0000 (11:20 +0100)]
crontab-cambridge: Add distros-debian-stretch

I thought I'd done this ages ago...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocrontab-cambridge: Change the days when we run a given distro-debian suite
Ian Campbell [Mon, 14 Sep 2015 10:20:06 +0000 (11:20 +0100)]
crontab-cambridge: Change the days when we run a given distro-debian suite

The weekly CD images which are used by the snapshot flight are
generated Sunday-Monday, so running that on a Saturday as we have been
doing ensures that it will take at least two iterations/weeks to get
any issues fixed.

Also the current ordering of the existing releases made it hard to
decide where to insert a new release (e.g. Stretch).

So reorder as:
 - Run the Sid daily run on a Monday
 - Run the Snapshot run on a Tuesday (to pick up the weekly builds
   from Monday)
 - Run Squeeze on Wednesday and continue with newer releases
   chronologically from there.

New releases can then be added at the end (wrapping the days).

Also add some blank lines to aid clarity.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocri-common: Refactor select_prevxenbranch to cri-getprevxenbranch
Ian Campbell [Fri, 11 Sep 2015 09:52:49 +0000 (10:52 +0100)]
cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch

This moves it outside any prevailing set -x and reduces the amount of
noise in various logs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-xen-build: Do not set QEMU_REMOTE unless $r{tree_qemu} is set
Ian Campbell [Fri, 11 Sep 2015 10:07:03 +0000 (11:07 +0100)]
ts-xen-build: Do not set QEMU_REMOTE unless $r{tree_qemu} is set

4.4 and earlier do not check if QEMU_REMOTE is empty before using it.
From 4.5 onwards if QEMU_REMOTE is empty then default is used.

This should fix the build-*-prev job for 4.5 and earlier. In this job
we deliberately don't specify tree_qemu since we want whatever
that branch gives us.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-xen-install: Rewrite /etc/hosts to comment out 127.0.1.1 entry flight-61791 flight-61973 flight-61992 flight-61995 flight-61996 flight-61997 flight-61998 flight-61999 flight-62000 flight-62002 flight-62003 flight-62004 flight-62006 flight-62007 flight-62009 flight-62010 flight-62011 flight-62012 flight-62013 flight-62015 flight-62016 flight-62017 flight-62018 flight-62019 flight-62020 flight-62021 flight-62022 flight-62023 flight-62024 flight-62025 flight-62026 flight-62027 flight-62028 flight-62029 flight-62030 flight-62035 flight-62036 flight-62037 flight-62038 flight-62039 flight-62040 flight-62041 flight-62042 flight-62043 flight-62044 flight-62045 flight-62046 flight-62047 flight-62048 flight-62049 flight-62051 flight-62052 flight-62053 flight-62054 flight-62055 flight-62056 flight-62057 flight-62058 flight-62059 flight-62060 flight-62061 flight-62062 flight-62064 flight-62065 flight-62066 flight-62067 flight-62068 flight-62069 flight-62070 flight-62071 flight-62073 flight-62074 flight-62075 flight-62076 flight-62077 flight-62078 flight-62079 flight-62080 flight-62081 flight-62082 flight-62083 flight-62084 flight-62085 flight-62087 flight-62088 flight-62089 flight-62090 flight-62091 flight-62092 flight-62093 flight-62094 flight-62095 flight-62096 flight-62097 flight-62098 flight-62099 flight-62100 flight-62101 flight-62102 flight-62103 flight-62104 flight-62105 flight-62106 flight-62107 flight-62108 flight-62109 flight-62110 flight-62111 flight-62112 flight-62113 flight-62114 flight-62115 flight-62116 flight-62117 flight-62118
Ian Campbell [Mon, 7 Sep 2015 12:58:29 +0000 (13:58 +0100)]
ts-xen-install: Rewrite /etc/hosts to comment out 127.0.1.1 entry

Debian creates an entry such as:
127.0.1.1             lace-bug.xs.citrite.net         lace-bug

This causes local lookups of the FQDN to get 127.0.1.1, which is
unhelpful if you are looking for an address to bind to and were hoping
to get the public IP address, as libvirt does on the target host for
migration.

Here we remove (actually, comment) any 127.0.1.1 line in /etc/hosts.
This means that lookups of a hosts own name (fqdn or just dn) now rely
on DNS, which may not be ideal. However for a host which uses DHCP I'm
not aware of a way to keep /etc/hosts up to date with the actual IP
address the machine has.  In our infra the test host IP addresses are
all static, but I don't think we want to rely on at any more that we
already do.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocambridge: arrange to test each new baseline
Ian Campbell [Thu, 13 Aug 2015 15:18:37 +0000 (16:18 +0100)]
cambridge: arrange to test each new baseline

Provide a new cr-daily-branch setting OSSTEST_BASELINES_ONLY which
causes it to only attempt to test the current baseline (if it is
untested) and never the tip version. Such tests will not result in any
push.

Each new baseline is tested exactly once (i.e. we aren't repeating
hoping for a pass), hence the correct revision is just the one tested
by the last run on the branch.

Add a cronjob to Cambridge which runs in this manner, ensuring that
there will usually be some sort of reasonably up to date baseline for
any given branch which can be used for comparisons in adhoc testing or
bisections.

This will also give us some data on the success of various branches on
the set of machines in Cambridge, which can be useful/interesting.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocr-daily-branch: Begin to support other reasons for forcing a baseline.
Ian Campbell [Thu, 13 Aug 2015 15:18:36 +0000 (16:18 +0100)]
cr-daily-branch: Begin to support other reasons for forcing a baseline.

By converting the current boolean $force_baseline into a keyword
indicating the reason.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoOsstest/TestSupport: Hide $ho->{Toolstack} from casual use
Ian Campbell [Fri, 31 Jul 2015 10:58:48 +0000 (11:58 +0100)]
Osstest/TestSupport: Hide $ho->{Toolstack} from casual use

This should only be accessed via toolstack($ho), which is responsible
for caching the value. Rename the field to _Toolstack to deter code
from using it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>