]> xenbits.xensource.com Git - people/royger/osstest.git/log
people/royger/osstest.git
6 years agoosstest: use a locally built pkg repository for FreeBSD freebsd-pkg
Roger Pau Monne [Wed, 20 Feb 2019 08:50:10 +0000 (09:50 +0100)]
osstest: use a locally built pkg repository for FreeBSD

This removes the dependency on the official pkg repository, which is
dangerous when not testing stable branches, since the ABI of the
development branch is not stable, and thus it's easy for packages to
get out of sync, or for osstest to test an old FreeBSD version that
has an ABI different than the one used to build the official
packages.

The output of the package build test is tested together with the newly
built image, and if there are no regressions both are anointed in
lockstep in order to prevent temporary discrepancies between the
installer and the package repository.

Note that in order to bootstrap the first run it's possible to
manually set the package repository to use with an environment
variable:

 - FREEBSD_PACKAGES_<arch>_BUILDJOB: points to the flight.job that
   contains the binary package repository.
 - FREEBSD_PACKAGES: points to a local directory that contains the
   binary repository.

It's also possible to set the directory that contains the package
repository in the configuration file using FreeBSDPackages.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: introduce a script to build a FreeBSD package repository
Roger Pau Monne [Wed, 20 Feb 2019 08:50:10 +0000 (09:50 +0100)]
osstest: introduce a script to build a FreeBSD package repository

The building of the binary packages itself is done with the poudriere
tool, that given a set of port names generates a binary package
repository with the requested packages and all it's dependencies.

Add a packages build job in the FreeBSD flight. Note that the binary
packages generated are tied to the base system used to build them when
not using a FreeBSD stable branch, stable branches guarantee ABI
stability.

Fetching the ports tree that contain the Makefiles to build the ports
is slightly more complicated than what would expected, since the
FreeBSD base system doesn't contain a git client the fetching is done
form the svn repository using the svnlite tool from the base system.
This is required in order to assure that bootstrapping the binary
repository doesn't depend on any external tools not found in the base
system.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: introduce a helper to get the svn revision of a git commit
Roger Pau Monne [Wed, 20 Feb 2019 08:50:09 +0000 (09:50 +0100)]
osstest: introduce a helper to get the svn revision of a git commit

This only works when the svn revision is stored as a git note
with the format 'revision=<revision number>'.

Such conversion is required in order to bootstrap a FreeBSD system
without relying on external package repositories. FreeBSD base system
only contains a subversion client (no git client), and thus in order
to fetch the ports repository (that contain the external packages
build makefiles) svn must be used.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: allow to perform multiple anoints in the same transaction
Roger Pau Monne [Wed, 20 Feb 2019 08:50:09 +0000 (09:50 +0100)]
osstest: allow to perform multiple anoints in the same transaction

In the same way allow to perform several fetches in the same retrieve
transaction.

Further patches will anoint a FreeBSD image and a binary ports tree
in the same transaction, and it's required to do it in the same
transaction in order to avoid inconsistencies when fetching them.

Note that most of the changes in this patch is code movement in order
to place the database accessors inside of a loop that iterates over
the input parameters.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: introduce a helper to create a weblink to a directory
Roger Pau Monne [Wed, 20 Feb 2019 08:50:09 +0000 (09:50 +0100)]
osstest: introduce a helper to create a weblink to a directory

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: introduce a helper to stash a whole directory
Roger Pau Monne [Wed, 20 Feb 2019 08:50:08 +0000 (09:50 +0100)]
osstest: introduce a helper to stash a whole directory

Without compressing it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoREADME.hardware-acquisition
Ian Jackson [Tue, 30 Oct 2018 16:12:27 +0000 (16:12 +0000)]
README.hardware-acquisition

New document-cum-checklist, for helping with hardware procurement.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: infra@xenproject.org
CC: George Dunlap <dunlapg@umich.edu>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien.grall@arm.com
Acked-by: Lars Kurth <lars.kurth@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
6 years agobackports snapshot: Disable apt timestamp checking in right place
Ian Jackson [Thu, 14 Feb 2019 11:23:44 +0000 (11:23 +0000)]
backports snapshot: Disable apt timestamp checking in right place

We need to put this in /target or it does not take effect.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agobackports snapshot: Use 20190206T211314Z for jessie-backports
Ian Jackson [Wed, 13 Feb 2019 17:07:23 +0000 (17:07 +0000)]
backports snapshot: Use 20190206T211314Z for jessie-backports

Some time on 2019-02-07, Debian removed linux-base from
jessie-backports.  This caused everything to break: apt wasn't happy
to get linux-base from jessie-security (because of our -t
jessie-backports, probably) and that meant there was no linux-base
suitable for linux-image-4.9.x on arm64.  We ended up trying to
boot the installed system with 3.16, which does not work on our two
SoftIron arm64 test boxes.

Also, jessie-backports about to be completely removed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agobackports snapshot: Disable apt timestamp checking (sometimes)
Ian Jackson [Wed, 13 Feb 2019 17:05:20 +0000 (17:05 +0000)]
backports snapshot: Disable apt timestamp checking (sometimes)

In jessie and earlier, this has to be done with a global option.

In later releases, it can be done by putting some options in [ ]
in the relevant sources list entry.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agobackports snapshot: Provide for $apt_insert and $extra_rune
Ian Jackson [Wed, 13 Feb 2019 17:04:24 +0000 (17:04 +0000)]
backports snapshot: Provide for $apt_insert and $extra_rune

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agobackports snapshot: Honour DebianSnapshotBackports_<suite> config var
Ian Jackson [Wed, 13 Feb 2019 16:53:49 +0000 (16:53 +0000)]
backports snapshot: Honour DebianSnapshotBackports_<suite> config var

If this is set, use it instead of the usual DebianMirrorHost and
Subpath.  No functional change with configs that don't set it.

This is not sufficient to work right yet, because snapshots
repositories have out-of-date signatures...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoRevert "production-config: Temporarily drop arm64"
Ian Jackson [Tue, 29 Jan 2019 13:26:29 +0000 (13:26 +0000)]
Revert "production-config: Temporarily drop arm64"

This reverts commit c65d7eb3f6c424d6c1fe69c5ecfca9c0b6cf4302.

6 years agopower: ssh: Wait for the target to appear to go down
Ian Jackson [Fri, 25 Jan 2019 12:04:21 +0000 (12:04 +0000)]
power: ssh: Wait for the target to appear to go down

When we `power on' with the ssh method, we actually run ssh reboot.

On some systems (notably, FreeBSD) the kernel does not simply reboot
immediately even with the runes we provide here, ie for FreeBSD
  reboot -nq
Eg, I have seen reboots with several messages like this:
  Jan 25 14:17:59.100044 Waiting (max 60 seconds) for system thread `bufspacedaemon-2' to stop... done

This can result in the ssh method failing spuriously, because the
`power on' appears to complete while the host is still up in the
previous environment.  In one of my test runs I saw an ssh to the host
succeed, and print the uptime (of the existing environment), between
the reboot command being issued and the host actually rebooting.

So, wait (up to just over a minute) until the host does not respond to
ping.  (target_await_down runs ping -c 5.)

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: ts-freebsd-host-install: Use power_reboot_attempts
Ian Jackson [Thu, 24 Jan 2019 18:25:24 +0000 (18:25 +0000)]
power: ts-freebsd-host-install: Use power_reboot_attempts

We look at the installer environment uptime, to
 | check that this is the installer environment
as requested by the comment
 | in particular $await must only succeed if the host really did
 | reboot into the boot environment that $await expects.
near the top of power_reboot_attempts

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: ssh: Reduce timeout for script fragment
Ian Jackson [Fri, 25 Jan 2019 12:08:52 +0000 (12:08 +0000)]
power: ssh: Reduce timeout for script fragment

This is really not going to take a minute.  Probably, much less.
Waiting less long will save time when we fall back.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: ssh: Fix handling of $delay
Ian Jackson [Fri, 25 Jan 2019 12:08:41 +0000 (12:08 +0000)]
power: ssh: Fix handling of $delay

The script fragment contains a reference to $delay which is a perl
variable, not a variable in the script fragment.  We therefore need to
not ''-quote the script.

Without this, the ssh method will often fail spuriously: the exiting
parent (which will signal success back to the osstest controller)
races with the attempt to reboot.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoflight_otherjob: Use confess rather than die
Ian Jackson [Fri, 25 Jan 2019 11:53:56 +0000 (11:53 +0000)]
flight_otherjob: Use confess rather than die

When this error trips it is usually because the call site looked up an
unset runvar and it can be hard to tell what that runvar was.

If we use confess we will at least find out the calling line number...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-report-host-history: Show used power approach(es)
Ian Jackson [Thu, 24 Jan 2019 16:52:47 +0000 (16:52 +0000)]
sg-report-host-history: Show used power approach(es)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-report-host-history: Move SET LOCAL into transaction
Ian Jackson [Thu, 24 Jan 2019 17:01:50 +0000 (17:01 +0000)]
sg-report-host-history: Move SET LOCAL into transaction

Gets rid of this warning:
  WARNING:  SET LOCAL can only be used in transaction blocks

This suggests that this code was previously not effective...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoExecutive: Export $grey_* with :colours
Ian Jackson [Thu, 24 Jan 2019 17:02:44 +0000 (17:02 +0000)]
Executive: Export $grey_* with :colours

No functional change with existing callers.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoExecutive: Break out span_colour
Ian Jackson [Thu, 24 Jan 2019 16:52:32 +0000 (16:52 +0000)]
Executive: Break out span_colour

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Record approach used for power cycles in runvars
Ian Jackson [Tue, 22 Jan 2019 19:54:40 +0000 (19:54 +0000)]
power: Record approach used for power cycles in runvars

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Use `Combined' as Name for PDU+ILOM approach
Ian Jackson [Tue, 22 Jan 2019 19:35:15 +0000 (19:35 +0000)]
power: Use `Combined' as Name for PDU+ILOM approach

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-logs-capture: power: try ILOM first
Ian Jackson [Tue, 22 Jan 2019 18:00:50 +0000 (18:00 +0000)]
ts-logs-capture: power: try ILOM first

If ILOM is provided, and the host is not responding when we try logs
capture, try the ILOM before hard power cycling the host.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: power_reboot_attempts: Honour an $approach_re
Ian Jackson [Tue, 22 Jan 2019 17:58:54 +0000 (17:58 +0000)]
power: power_reboot_attempts: Honour an $approach_re

The semantics are slightly different here: not specifying it means to
try everything rather than only the hardest.  But the effect is
similar: not specifying $approach_re means we must succeed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Rename target_reboot_force from target_reboot_hard
Ian Jackson [Tue, 22 Jan 2019 17:55:53 +0000 (17:55 +0000)]
power: Rename target_reboot_force from target_reboot_hard

We are going to make this try softer methods first.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-host-powercycle: Use a lighter-weight method if available
Ian Jackson [Tue, 22 Jan 2019 17:51:50 +0000 (17:51 +0000)]
ts-host-powercycle: Use a lighter-weight method if available

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Honour approach_re in power_cycle and mg-hosts power
Ian Jackson [Tue, 22 Jan 2019 17:41:51 +0000 (17:41 +0000)]
power: Honour approach_re in power_cycle and mg-hosts power

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Document Power* host properties and power methods
Ian Jackson [Tue, 22 Jan 2019 17:00:14 +0000 (17:00 +0000)]
power: Document Power* host properties and power methods

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Try rebooting hosts with ssh first
Ian Jackson [Tue, 22 Jan 2019 14:44:57 +0000 (14:44 +0000)]
power: Try rebooting hosts with ssh first

Before we try anything with IPMI (if provided) or the PDU, try
rebooting with ssh.

I think this will dramatically reduce the rate at which we power cycle
our test hosts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Provide `ssh' power method
Ian Jackson [Tue, 22 Jan 2019 14:44:52 +0000 (14:44 +0000)]
power: Provide `ssh' power method

This is not really a power method but it can pretend to be one.  On
power off, it does nothing.  On power on it logs into the host to ask
it to do a hard reboot.

This is rather best effort, but it is eminently suitable for our new
approach/attempts arrangements because those will try another approach
if ssh didn't work.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Do not sleep between power off and power on if not needed
Ian Jackson [Tue, 22 Jan 2019 17:30:04 +0000 (17:30 +0000)]
power: Do not sleep between power off and power on if not needed

This is controlled by a new query method on power method objects.  If
every power method says it is instananeous then we do not sleep.

This is going to be most useful when we introduce the new SSH
approach, which should not sleep for the power off time.

But we do it for guests (ie, L1 nested hosts) too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: New ILOM/PDU arrangements - try just IPMI
Ian Jackson [Tue, 22 Jan 2019 15:50:00 +0000 (15:50 +0000)]
power: New ILOM/PDU arrangements - try just IPMI

We honour two new host properties PowerPDU and PowerILOM, in
preference to PowerMethod.  The semantics are going to be properly
documented in a later patch, but, briefly:

If only one of these is supplied, it works like PowerMethod, except
that `nest' is applied by default.

If both are supplied, we make two approaches: one is just ILOM.  The
other is to use ILOM and PDU together, with pause in between, and with
try_off applied to ILOM.

The current configuration in Massachusetts is, for hosts with IPMI, to
provide a PowerMethod specifying ad hoc to use PDU and then IPMI, and
also to provide both PowerPDU and PowerILOM.

The overall result of this patch, with that configuration, is to avoid
using the PDU at all if an IPMI-requested reboot is successful.  This
should significantly reduce the number of hard power cycles for hosts
with IMPI.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Provide `try_off' pdu method; deprecate ipmi_try
Ian Jackson [Tue, 22 Jan 2019 17:01:02 +0000 (17:01 +0000)]
power: Provide `try_off' pdu method; deprecate ipmi_try

We are going to want to use this magically, in our new approach.  Make
a general version, and deprecate ipmi_try (which will be obsoleted by
the new approach and which has probably not been used very much).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: power_reboot_attempts: Try multiple approaches
Ian Jackson [Tue, 22 Jan 2019 15:11:05 +0000 (15:11 +0000)]
power: power_reboot_attempts: Try multiple approaches

Actually iterate over PowerApproaches, rather than calling power_state
with no approach selector regexp.

No overall functional change right now because nothing puts more
than one entry in PowerApproaches.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: PowerApproaches replaces $ho->{PowerMethobjs}
Ian Jackson [Tue, 22 Jan 2019 11:11:14 +0000 (11:11 +0000)]
power: PowerApproaches replaces $ho->{PowerMethobjs}

This new variable contains a list of different approaches to try.

* Move the meat of power_state into power_approach_invoke.
* power_state now looks for a single approach to try.
* The default for power_state is to pick the last approach in
  the list, which by definition is supposed to be the most reliable.
* Currently there will only be one approach, `Only'.

No overall functional change other than to log messages.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower handling: Introduce power_reboot_attempts
Ian Jackson [Fri, 18 Jan 2019 15:23:54 +0000 (15:23 +0000)]
power handling: Introduce power_reboot_attempts

This is going to be the new preferred interface for rebooting a host.

Introduce the first two call sites in ts-host-install and
ts-freebsd-host-install.  power_cycle_sleep is an internal function
now.

No overall functional change, since currently power_reboot_attempts
only ever tries one method.

Do not adjust ts-freebsd-host-install yet as we have a problem there,
which will be discussed in a moment.

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower handling: Break out power_cycle_parse_method
Ian Jackson [Tue, 22 Jan 2019 10:51:03 +0000 (10:51 +0000)]
power handling: Break out power_cycle_parse_method

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Osstest::PDU::*: reuse default new method where applicable
Ian Jackson [Tue, 22 Jan 2019 14:59:48 +0000 (14:59 +0000)]
power: Osstest::PDU::*: reuse default new method where applicable

These two modules both had the same `new' as `unsupported'.  Now that
we have `use parent' they can be removed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: ipmi_try: Use `use parent' instead of Exporter
Ian Jackson [Tue, 22 Jan 2019 14:44:46 +0000 (14:44 +0000)]
power: ipmi_try: Use `use parent' instead of Exporter

This module already has a superclass, `ipmi'.  Import it with `use
parent' instead of Exporter.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Osstest::PDU::*: use parent ::unsupported
Ian Jackson [Tue, 22 Jan 2019 14:38:21 +0000 (14:38 +0000)]
power: Osstest::PDU::*: use parent ::unsupported

This will allow us to introduce default methods, which everyone
inherits unless overridden.  These changes are all textually
identical.

We will do ipmi_try in a moment: that one is special as it actually
has a parent module.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agopower: Osstest::PDU::*: drop Exporter blocks
Ian Jackson [Tue, 22 Jan 2019 14:43:29 +0000 (14:43 +0000)]
power: Osstest::PDU::*: drop Exporter blocks

This is all very obsolete.  These that we are removing are all empty,
and nowadays perl has `use parent'.  These changes are all textually
identical.

We will do ipmi_try in a moment: that one is special as it actually
has a parent module.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoline wrapping: In one place pipe through cr-fold-long-lines
Ian Jackson [Thu, 17 Jan 2019 15:25:14 +0000 (15:25 +0000)]
line wrapping: In one place pipe through cr-fold-long-lines

This is the remaining place where long lines might get into emails.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoline wrapping: Replace many uses of cat with cr-fold-long-lines
Ian Jackson [Thu, 17 Jan 2019 15:23:11 +0000 (15:23 +0000)]
line wrapping: Replace many uses of cat with cr-fold-long-lines

These are the nicely uniform bits of this change.

This arranges that many of the places where stuff gets put into emails
has their lines wrapped.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoline wrapping: Use tmp/$flight.report in two extra places
Ian Jackson [Thu, 17 Jan 2019 15:20:11 +0000 (15:20 +0000)]
line wrapping: Use tmp/$flight.report in two extra places

The output from sg-report-flight might in principle contain long
lines, although this is not expected.  So we are going to want to feed
it through the new cr-fold-long-lines.

Rather than piping, we are going to keep a copy of the .report file,
like is done in mg-execute-flight.  So for now, just make that change.

No overall change other than to leave behind the tmp/$flight.report
file.  It will be tidied up by the usual cleanup processes.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoline wrapping: Provide cr-fold-long-lines script
Ian Jackson [Thu, 17 Jan 2019 15:17:22 +0000 (15:17 +0000)]
line wrapping: Provide cr-fold-long-lines script

This is a reversible transformation which usually just introduces a \
where it splits lines.

We are going to use this to wrap the lines in our emails.  SMTP has a
999-byte length limit (including a CR-LF pair).  This can cause our
emails to go astray.  We don't really want our messages to be q-p or
base64-encoded if we can avoid it, and MTAs don't do that anyway (so
we would have to organise it).  So instead, we will simply wrap any
long lines that occur.

This transformation is not suitable for headers, but we don't intend
or want to generate long lines which would need further wrapping.  (A
reversible transformation suitable for headers would be quite ugly and
would only be right for a subset of headers anyway...)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-try-bisect: When bisection is done, keep the old mro as mro.done
Ian Jackson [Thu, 17 Jan 2019 11:43:51 +0000 (11:43 +0000)]
cr-try-bisect: When bisection is done, keep the old mro as mro.done

This will help with debugging, or if we want to manually reset/restart
things.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-livepatch-run: Fix erroneous $$ in double-check
Ian Jackson [Wed, 16 Jan 2019 11:32:06 +0000 (11:32 +0000)]
ts-livepatch-run: Fix erroneous $$ in double-check

The doubled $s here are simply a mistake.  The result is to make this
test ineffective, since `$$file' means `the value of the variable
whose name is in the variable $file', which here will never exist.
This produces a `Use of uninitialized value' warning and substitutes
the empty string, so overall we test the existence of the directory.

The missing check is not of much consequence since this check is not
really expected ever to fail, and if it does, some actual test
execution would fail due to the missing file.

So overall I think the only change is to log output.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agots-livepatch-run: Print a message about expected failures
Ian Jackson [Wed, 16 Jan 2019 11:30:49 +0000 (11:30 +0000)]
ts-livepatch-run: Print a message about expected failures

target_cmd_output_root_status prints the command exit status.  If that
was a failure and the failure was as expected, this can be confusing
to readers who do not know that this is a possibility.  So print a
message about it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agots-livepatch-run: Treat (just) falseish from OutputCheck as fail
Ian Jackson [Wed, 16 Jan 2019 11:28:49 +0000 (11:28 +0000)]
ts-livepatch-run: Treat (just) falseish from OutputCheck as fail

This is more idiomatic.  All existing OutputChecks return booleans, so
no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agoproduction-config: Temporarily drop arm64
Ian Jackson [Mon, 13 Aug 2018 14:54:25 +0000 (15:54 +0100)]
production-config: Temporarily drop arm64

Both our arm64 boxes are out of commission again.

I have filed a ticket to have the recently failed box investigated.
And I am working on the stretcb upgrade which will bring our
Thunder-X into service.

But for now this is the best we can do to unblock everything.

CC: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoproduction-config*: Update to fishdescriptor with chroot bugfix
Ian Jackson [Mon, 19 Nov 2018 16:24:42 +0000 (16:24 +0000)]
production-config*: Update to fishdescriptor with chroot bugfix

Deployment note: I have copied this binary to the images directory in
Cambridge and Massachusetts.  The corresponding patch to chiark-utils
is on its way to my upstream hat.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-depriv-audit-qemu: chmod +x qemu's chroot
Ian Jackson [Mon, 19 Nov 2018 16:22:04 +0000 (16:22 +0000)]
ts-depriv-audit-qemu: chmod +x qemu's chroot

libxl creates this directory with mode 0.  That prevents
fishdescriptor from working.  chmod it.  This is OK for testing.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-depriv-audit-qemu: Create complete /run/user in appropriate root
Ian Jackson [Mon, 19 Nov 2018 16:19:44 +0000 (16:19 +0000)]
ts-depriv-audit-qemu: Create complete /run/user in appropriate root

* Use mkdir -p, rather than trying to only create /run/user/$uid.
  That helps if /run and/or /run/user do not exist, as they do in
  libxl-made chroots with recent libxl (which gets qemu to chroot).

* Do all of this in the root directory of the qemu process, not our
  own root directory.  So it works if qemu is chrooted.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Actually use $qpid rather than hardcoding 8123 !

squash! ts-depriv-audit-qemu: Create complete /run/user in appropriate root

6 years agots-xen-build: Force reliance on ipxe tarball
Ian Jackson [Mon, 5 Nov 2018 18:31:04 +0000 (18:31 +0000)]
ts-xen-build: Force reliance on ipxe tarball

xen.git/tools/firmware/etherboot/Makefile tries to get a tarball from
xen-extfiles first and if that fails, tries cloning from ipxe.org.

ipxe.org is sometimes down (or half-down) and when that happens
without a tarball the build breaks and is hard to fix.

We would like, therefore, to ensure that the tarball is always made
before the commit which refers to it is in xen.git#master.

osstest has no knowledge of ipxe as a separate thing and just lets
xen.git have whatever version is in Config.mk.  So osstest never needs
to specify particular ipxe version by hash, or the like.

So simply make osstest rely on the tarball existing, by having it
specify a completely invalid URL for the git clone.  This will detect
attempts to update IPXE_GIT_TAG without making a corresponding
tarball.

CC: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agomfi-common: Enable livepatch tests in 4.10 and 4.11 as intended (!)
Ian Jackson [Thu, 1 Nov 2018 13:02:50 +0000 (13:02 +0000)]
mfi-common: Enable livepatch tests in 4.10 and 4.11 as intended (!)

The pattern xen-4.1* matches xen-4.10-testing, xen-4.11-testing, etc.
The right approach is to state the excluded branch names explicitly
as is done elsewhere.

Resulting changes (standalone-generate-dump-flight-runvars):
 * new jobs: test-amd64-{amd64,i386}-livepatch
 * runvar set: enable_livepatch=true in build-ARCH, build-ARCH-xsm
 * all of the above in branches: xen-4.10-testing xen-4.11-testing

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agomfi-common: Do not set enable_livepatch on build-*-prev
Ian Jackson [Thu, 1 Nov 2018 13:25:50 +0000 (13:25 +0000)]
mfi-common: Do not set enable_livepatch on build-*-prev

branch_wants_livepatch checks the current Xen version.  We don't want
to try enabling livepatch on trees that don't have it.  And for the
-prev build we care about forward migration etc., not about
livepatching the previous version.

Resulting changes (standalone-generate-dump-flight-runvars):
  runvar removed: enable_livepatch=true
  in jobs:        build-amd64-prev build-i386-prev
  in branches:    xen-4.8-testing xen-4.9-testing xen-unstable

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agocr-for-branches: Add linux-4.19
Ian Jackson [Tue, 30 Oct 2018 16:04:56 +0000 (16:04 +0000)]
cr-for-branches: Add linux-4.19

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoproduction-config-cambridge: Use squid cache, not local apt proxy
Ian Jackson [Fri, 26 Oct 2018 10:57:42 +0000 (11:57 +0100)]
production-config-cambridge: Use squid cache, not local apt proxy

debian.uk.xensource.com is no more (and the service name seems to have
been discarded).  There is repo.citrite.net instead but it is a
proprietary appliance which - although it claims to be able to handle
apt repositories - is not compatible with debian-installer; at least,
jessie's d-i.

Swap to ftp.uk.debian.org (and rely for caching on the squid cache
which we have for non-apt stuff already).  That works well enough for
stable suites, at least.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomfi-common: Drop freebsd builds on non-freebsd flights
Ian Jackson [Wed, 24 Oct 2018 10:16:32 +0000 (11:16 +0100)]
mfi-common: Drop freebsd builds on non-freebsd flights

Something is wrong with the freebsd repositories.  This causes freebsd
host installation to fail.  This problem has persisted for a while now
and is blocking other work.

For now, drop these.  The jobs being dropped are
      build-amd64-xen-freebsd
      build-amd64-xen-xsm-freebsd
in the branches
      osstest
      xen-unstable
(verified with standalone-generate-dump-flight-runvars).

CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agostandalone-generate-dump-flight-runvars: Add example usage
Ian Jackson [Wed, 24 Oct 2018 10:25:38 +0000 (11:25 +0100)]
standalone-generate-dump-flight-runvars: Add example usage

I have to reinvent these runes each time, which is somewhat annoying.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosa-init-db: Fix argument parsing
Ian Jackson [Wed, 24 Oct 2018 10:24:36 +0000 (11:24 +0100)]
sa-init-db: Fix argument parsing

It claimed to have a default db name, but it didn't.  Rework the
option parsing to make the usage message true.  (That saves me typing
  sa-init-db standalone
and getting bizarre errors as sqlite tries to treat the shell script
`standalone' as if it were a database file.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-for-branches: Add linux 4.4 branch as that is an LTS
Ian Jackson [Wed, 17 Oct 2018 15:47:28 +0000 (16:47 +0100)]
cr-for-branches: Add linux 4.4 branch as that is an LTS

6 years agolibvirt.pm: Drop some unneeded parens (no functional change0
Ian Jackson [Thu, 27 Sep 2018 10:29:23 +0000 (11:29 +0100)]
libvirt.pm: Drop some unneeded parens (no functional change0

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-xen-build-prep: install libgnutls28-dev for libvirt build
Wei Liu [Wed, 26 Sep 2018 16:37:04 +0000 (17:37 +0100)]
ts-xen-build-prep: install libgnutls28-dev for libvirt build

d54ecf31b2 placed the build dependency in a wrong file. This patch
adds the dependency to the right file.  Add a runtime dependency in
libvirt.pm.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomake-flight: Test with `sched=credit'
Ian Jackson [Wed, 19 Sep 2018 10:52:37 +0000 (11:52 +0100)]
make-flight: Test with `sched=credit'

The default in xen-unstable#staging is soon to be sched=credit2.  That
leaves osstest not testing credit1 at all.

Add a job that does this.  It's a copy of the -credit2 job.  (It's
a pretty nugatory test but it will probably do.)

We call the test -credit1, although the Xen parameter is =credit.

I have verified with standalone-generate-dump-flight-runvars that the
effect is to add the appropriately mutated copy of the credit2 job to
every flight.  The mutations are solely the sched= parameter and the
job name.

CC: George Dunlap <george.dunlap@citrix.com>
CC: Dario Faggioli <dfaggioli@suse.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
6 years agostandalone: Mention sa-init-db on missing standalone.db
Ian Jackson [Wed, 19 Sep 2018 10:29:18 +0000 (11:29 +0100)]
standalone: Mention sa-init-db on missing standalone.db

I usually do not use standalone mode.  But I use it for
  standalone-generate-dump-flight-runvars

That means I have to have a standalone.db.  ./standalone prints a
message about standalone-reset, which does a lot of undesirable stuff.

Mention sa-init-db too.  That just creates the db with empty tables
and is sufficient for standalone-generate-dump-flight-runvars.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibvirt: Install GnuTLS for libvirt builds
Jim Fehlig [Wed, 5 Sep 2018 21:43:12 +0000 (15:43 -0600)]
libvirt: Install GnuTLS for libvirt builds

Since libvirt commit 60d9ad6f GnuTLS is required to build libvirt. The
various libvirt build tests in osstest began failing after the commit
hit libvirt.git master. Adding libgnutls28-dev to the list of packages
needed to build libvirt will fix the currently broken builds.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoREADME.dev: Document things that are now handled by ansible in Mass
Ian Jackson [Thu, 13 Sep 2018 16:51:55 +0000 (17:51 +0100)]
README.dev: Document things that are now handled by ansible in Mass

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-run-job: Pair tests: Repeat the migration 10x
Ian Jackson [Fri, 7 Sep 2018 17:50:44 +0000 (18:50 +0100)]
sg-run-job: Pair tests: Repeat the migration 10x

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add missing disk driver name
Roger Pau Monne [Wed, 5 Sep 2018 14:11:39 +0000 (16:11 +0200)]
osstest: add missing disk driver name

elbling boxes uses the mfi driver and have the hard disks in
passthrough mode, which means the mfi driver will expose them as
mfisyspd? instead of mfid?. In order for the installer to detect such
disks add mfisyspd0 to the list of disks to probe.

This should fix the host-install issues reported on elbling boxes:

http://logs.test-lab.xenproject.org/osstest/logs/127304/

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoRevert "production-config: Temporarily drop arm64"
Ian Jackson [Wed, 22 Aug 2018 10:49:35 +0000 (11:49 +0100)]
Revert "production-config: Temporarily drop arm64"

This reverts commit 2d3fd8087e746bc5f64d3cf01014aac388a1bb7e.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Julien Grall <julien.grall@arm.com>
6 years agoosstest: configure git proxy for FreeBSD
Roger Pau Monne [Mon, 20 Aug 2018 10:49:43 +0000 (12:49 +0200)]
osstest: configure git proxy for FreeBSD

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: make git proxy setup common
Roger Pau Monne [Mon, 20 Aug 2018 10:00:19 +0000 (12:00 +0200)]
osstest: make git proxy setup common

By moving it into TestSupport. No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add a FreeBSD Xen build job to osstest flights
Roger Pau Monne [Wed, 18 Jul 2018 15:49:40 +0000 (17:49 +0200)]
osstest: add a FreeBSD Xen build job to osstest flights

The runvar diff is the following:

+osstest build-amd64-xen-freebsd     all_host_os        freebsd
+osstest build-amd64-xen-xsm-freebsd all_host_os        freebsd
+osstest build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-freebsd     arch               amd64
+osstest build-amd64-xen-xsm-freebsd arch               amd64
+osstest build-amd64-xen-freebsd     build_lvextend_max 50
+osstest build-amd64-xen-xsm-freebsd build_lvextend_max 50
+osstest build-amd64-xen-freebsd     enable_livepatch   true
+osstest build-amd64-xen-xsm-freebsd enable_livepatch   true
+osstest build-amd64-xen-freebsd     enable_ovmf        false
+osstest build-amd64-xen-xsm-freebsd enable_ovmf        false
+osstest build-amd64-xen-freebsd     enable_xend        false
+osstest build-amd64-xen-xsm-freebsd enable_xend        false
+osstest build-amd64-xen-freebsd     enable_xsm         false
+osstest build-amd64-xen-xsm-freebsd enable_xsm         true
+osstest build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+osstest build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build
+osstest build-amd64-xen-freebsd     revision_minios
+osstest build-amd64-xen-xsm-freebsd revision_minios
+osstest build-amd64-xen-freebsd     revision_ovmf
+osstest build-amd64-xen-xsm-freebsd revision_ovmf
+osstest build-amd64-xen-freebsd     revision_qemu
+osstest build-amd64-xen-xsm-freebsd revision_qemu
+osstest build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-xsm-freebsd revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-freebsd     revision_seabios
+osstest build-amd64-xen-xsm-freebsd revision_seabios
+osstest build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-xsm-freebsd revision_xen       ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-freebsd     tree_minios
+osstest build-amd64-xen-xsm-freebsd tree_minios
+osstest build-amd64-xen-freebsd     tree_ovmf
+osstest build-amd64-xen-xsm-freebsd tree_ovmf
+osstest build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+osstest build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+osstest build-amd64-xen-freebsd     tree_seabios
+osstest build-amd64-xen-xsm-freebsd tree_seabios
+osstest build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+osstest build-amd64-xen-xsm-freebsd tree_xen           git://xenbits.xen.org/xen.git

Suggested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add FreeBSD Xen build job
Roger Pau Monne [Fri, 29 Jun 2018 10:09:37 +0000 (12:09 +0200)]
osstest: add FreeBSD Xen build job

To both the FreeBSD and the xen-unstable flights.

This is the runvar difference of all flights:

+freebsd-master build-amd64-xen-freebsd     all_host_os        freebsd
+freebsd-master build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+freebsd-master build-amd64-xen-freebsd     arch               amd64
+freebsd-master build-amd64-xen-freebsd     enable_ovmf
+freebsd-master build-amd64-xen-freebsd     enable_xend
+freebsd-master build-amd64-xen-freebsd     enable_xsm
+freebsd-master build-amd64-xen-freebsd     freebsdbuildjob    build-amd64-freebsd
+freebsd-master build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+freebsd-master build-amd64-xen-freebsd     recipe_testinstall true
+freebsd-master build-amd64-xen-freebsd     revision_minios
+freebsd-master build-amd64-xen-freebsd     revision_ovmf
+freebsd-master build-amd64-xen-freebsd     revision_qemu
+freebsd-master build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+freebsd-master build-amd64-xen-freebsd     revision_seabios
+freebsd-master build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
+freebsd-master build-amd64-xen-freebsd     tree_minios
+freebsd-master build-amd64-xen-freebsd     tree_ovmf
+freebsd-master build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+freebsd-master build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+freebsd-master build-amd64-xen-freebsd     tree_seabios
+freebsd-master build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-freebsd     all_host_os        freebsd
+xen-unstable   build-amd64-xen-xsm-freebsd all_host_os        freebsd
+xen-unstable   build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-freebsd     arch               amd64
+xen-unstable   build-amd64-xen-xsm-freebsd arch               amd64
+xen-unstable   build-amd64-xen-freebsd     build_lvextend_max 50
+xen-unstable   build-amd64-xen-xsm-freebsd build_lvextend_max 50
+xen-unstable   build-amd64-xen-freebsd     enable_livepatch   true
+xen-unstable   build-amd64-xen-xsm-freebsd enable_livepatch   true
+xen-unstable   build-amd64-xen-freebsd     enable_ovmf        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_ovmf        false
+xen-unstable   build-amd64-xen-freebsd     enable_xend        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xend        false
+xen-unstable   build-amd64-xen-freebsd     enable_xsm         false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xsm         true
+xen-unstable   build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-freebsd     revision_minios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_minios
+xen-unstable   build-amd64-xen-freebsd     revision_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd revision_ovmf
+xen-unstable   build-amd64-xen-freebsd     revision_qemu
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemu
+xen-unstable   build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-freebsd     revision_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_seabios
+xen-unstable   build-amd64-xen-freebsd     revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-freebsd     tree_minios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_minios
+xen-unstable   build-amd64-xen-freebsd     tree_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd tree_ovmf
+xen-unstable   build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-freebsd     tree_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_seabios
+xen-unstable   build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_xen           git://xenbits.xen.org/xen.git

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Only add FreeBSD Xen buildjobs to the xen-* branches.

Changes since v1:
 - Fix enabling of FreeBSD Xen buildjob based on branch.
 - Introduce a helper to add the FreeBSD Xen build jobs.
 - Introduce the ts-xen-build-freebsd wrapper around ts-xen-build for
   FreeBSD.
 - Introduce a create_xen_build_job helper.

6 years agoosstest: introduce a helper to create Xen build jobs
Roger Pau Monne [Thu, 12 Jul 2018 14:54:41 +0000 (16:54 +0200)]
osstest: introduce a helper to create Xen build jobs

This is currently a non-functional change, since no new jobs are
added, and the existing ones should stay unchanged. Runvars of all
flights remain unchanged.

The purpose of the helper is to allow adding different Xen build jobs,
with likely different runvars in the future.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: set the make command to use for xen-build
Roger Pau Monne [Fri, 29 Jun 2018 08:18:04 +0000 (10:18 +0200)]
osstest: set the make command to use for xen-build

The default make on FreeBSD is the BSD make, and Xen requires the GNU
make in order to build. Set the make command based on the OS for the
Xen build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Use gmake for all BSDs.

6 years agoosstest: limit FreeBSD jobs to hardware booting in BIOS mode
Roger Pau Monne [Wed, 4 Jul 2018 16:06:17 +0000 (18:06 +0200)]
osstest: limit FreeBSD jobs to hardware booting in BIOS mode

There's no support yet in osstest to install FreeBSD from UEFI, so for
the time being limit the FreeBSD jobs to boxes booting with legacy
BIOS.

The hostflags are not set for examine jobs, in order to avoid them
from only running on BIOS boxes.

The runvar difference with this patch applied is:

+freebsd-master build-amd64-freebsd       all_hostflags PropEq:Firmware:bios:bios
+freebsd-master build-amd64-freebsd-again all_hostflags PropEq:Firmware:bios:bios

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Fix hosts flight to not require BIOS firmware.

Changes since v1:
 - Fix nonbreaking space.
 - Fix long line.

6 years agoosstest: abstract code to create a FreeBSD build job
Roger Pau Monne [Wed, 4 Jul 2018 15:21:48 +0000 (17:21 +0200)]
osstest: abstract code to create a FreeBSD build job

Into a helper. A diff of the runvars of flights generated with and
without the patch show no differences.

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: remove duplicate set_freebsd_runvars
Roger Pau Monne [Fri, 29 Jun 2018 11:45:09 +0000 (13:45 +0200)]
osstest: remove duplicate set_freebsd_runvars

The set_freebsd_runvars helper in mfi-common is a superset of the
original function present in make-freebsd-flight, and will attempt to
fetch the last anointed FreeBSD build as a last resort option if no
FreeBSD build is signaled from the FreeBSD env vars. There's no reason
to have this duplication, since the set_freebsd_runvars in mfi-common
is perfectly suitable to be used by make-freebsd-flight.

This duplication was wrongly introduced by d36a7d892f by adding a
set_freebsd_runvars to mfi-common without removing the original
function in make-freebsd-flight.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Add commit message.

6 years agoosstest: allow appending to existing runvars
Ian Jackson [Wed, 4 Jul 2018 15:21:15 +0000 (17:21 +0200)]
osstest: allow appending to existing runvars

So that the contents of the runvar can be expanded. There are
currently two ways to do this:

 - Using += will append to the end of the runvar.
 - Using ,= will append to the end of the runvar using ',' as the
   separator.

Note that if the runvar is empty {,|+}= just sets the runvar.

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
6 years agodummy flight generation: cs-hosts-list should not print { }
Ian Jackson [Tue, 17 Jul 2018 14:51:42 +0000 (14:51 +0000)]
dummy flight generation: cs-hosts-list should not print { }

With newer bash, this causes
      local envvar="FREEBSD_${arch^^}_BUILDJOB"
      if [ -n "${!envvar}" ]; then
to (properly) report a syntax error.

As Roger says, it is better to print a dummy host for each
architecture, so do that.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodummy flight generation: Tolerate lack of repos
Ian Jackson [Tue, 17 Jul 2018 14:50:35 +0000 (14:50 +0000)]
dummy flight generation: Tolerate lack of repos

In particular
  OSSTEST_CONFIG=standalone-config-example eatmydata bash -x ./standalone-generate-dump-flight-runvars
should not require ~/osstest-repos to exist.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Work with --push-harness but no remote git
Ian Jackson [Tue, 14 Aug 2018 09:48:02 +0000 (10:48 +0100)]
cr-publish-flight-logs: Work with --push-harness but no remote git

--push-harness might be specified even though there is no git tree to
push to.  In that situation, do not daftly not even push the logs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoproduction-config: Temporarily drop arm64
Ian Jackson [Mon, 13 Aug 2018 14:54:25 +0000 (15:54 +0100)]
production-config: Temporarily drop arm64

Both our arm64 boxes are out of commission and repairing them is
taking too long.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
6 years agoPublish: Cambridge: Get the public URL right master
Ian Jackson [Wed, 11 Jul 2018 14:10:30 +0000 (15:10 +0100)]
Publish: Cambridge: Get the public URL right

This URL is now accessible, although there are some webserver tweaks
remaining to do.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Cambridge: Publish to new public host
Ian Jackson [Wed, 11 Jul 2018 11:20:00 +0000 (12:20 +0100)]
Publish: Cambridge: Publish to new public host

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Introduce {Logs,Results}PublishSshOpts
Ian Jackson [Wed, 11 Jul 2018 11:06:12 +0000 (12:06 +0100)]
Publish: Introduce {Logs,Results}PublishSshOpts

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Introduce publish_ssh_opts
Ian Jackson [Wed, 11 Jul 2018 11:15:50 +0000 (12:15 +0100)]
Publish: Introduce publish_ssh_opts

We need to pass it $cfgbase because this will soon be configurable.

No functional change right now.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Refactor rsync -e option construction
Ian Jackson [Wed, 11 Jul 2018 11:07:47 +0000 (12:07 +0100)]
cr-publish-flight-logs: Refactor rsync -e option construction

Previously this was hardcoded.  Now we make a variable @ssh, and use
rsync's quoting scheme to transform it into a value suitable for -e.

No overall functional change, although now the rsync command contains
additional quotes in the -e option.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Refactor copydir args
Ian Jackson [Wed, 11 Jul 2018 11:02:26 +0000 (12:02 +0100)]
cr-publish-flight-logs: Refactor copydir args

Have it take $cfgbase and $subdir instead.  This allows us to lift the
config test into it.  And it will be even more useful in a moment.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Default LogsPublish and ResultsPublish from Publish
Ian Jackson [Wed, 11 Jul 2018 10:48:40 +0000 (11:48 +0100)]
Publish: Default LogsPublish and ResultsPublish from Publish

And delete the explicit settings from production-config.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-ensure-disk-space: With -D, print check_space command
Ian Jackson [Wed, 11 Jul 2018 13:20:07 +0000 (14:20 +0100)]
cr-ensure-disk-space: With -D, print check_space command

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoresource allocation: PropEq, PropMinVer: support defaults
Ian Jackson [Wed, 4 Jul 2018 10:53:11 +0000 (11:53 +0100)]
resource allocation: PropEq, PropMinVer: support defaults

Now you can pass another :-separated argument, the default value to
use if none is specified.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoresource allocation: PropEq, PropMinVer: Honour HostProp_...
Ian Jackson [Wed, 4 Jul 2018 10:52:27 +0000 (11:52 +0100)]
resource allocation: PropEq, PropMinVer: Honour HostProp_...

We need to take these from the config too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoresource allocation: PropCompareBase: Break out _get_val
Ian Jackson [Wed, 4 Jul 2018 10:41:22 +0000 (11:41 +0100)]
resource allocation: PropCompareBase: Break out _get_val

This is going to make defaulting etc. a bit easier.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoPDU: ipmi: Pass further options to ipmitool
Ian Jackson [Wed, 11 Jul 2018 14:31:30 +0000 (14:31 +0000)]
PDU: ipmi: Pass further options to ipmitool

This is useful, for example, for passing `-I lanplus'.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU: ipmi: Only log the first cmd run
Ian Jackson [Wed, 11 Jul 2018 14:31:03 +0000 (14:31 +0000)]
PDU: ipmi: Only log the first cmd run

This quietens the output again.

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