]> xenbits.xensource.com Git - osstest.git/log
osstest.git
3 years agofmtarches: Use dom0arches, not hardcoded arch list
Ian Jackson [Thu, 9 Sep 2021 15:46:27 +0000 (16:46 +0100)]
fmtarches: Use dom0arches, not hardcoded arch list

This will make us reallocate fmt tests when the arch list changes.
It's not ideal because it means tests jumping about across arches and
might let regressions go through but it's better than just dropping
them, and doing a better approach is complex.

This changes some jobs and adds others, roughly:

  +               test-amd64-i386-libvirt-fraw
  -               test-amd64-i386-xl-raw
  +               test-amd64-i386-xl-vhd
  +               test-arm64-arm64-libvirt-raw
  +               test-arm64-arm64-xl-vhd
  +               test-armhf-armhf-libvirt-qcow2

(as reported by standalone-generate-dump-flight-runvars)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomfi-common: Change dom0arch list order (nfc)
Ian Jackson [Thu, 9 Sep 2021 16:13:07 +0000 (17:13 +0100)]
mfi-common: Change dom0arch list order (nfc)

Change the order to match fmtarches_outer in do_pv_debian_tests.

We are going to want to add an indirection here but not change
anything.

No change to output from standalone-generate-dump-flight-runvars.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomfi-common: break out dom0arches variable (nfc)
Ian Jackson [Thu, 9 Sep 2021 15:36:28 +0000 (16:36 +0100)]
mfi-common: break out dom0arches variable (nfc)

This will allow test choices to depend on the actual rather than
entire dom0arches.

No change to output from standalone-generate-dump-flight-runvars.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomake-flight: Drop pvgrub (pvgrub1) tests
Ian Jackson [Thu, 19 Aug 2021 12:46:21 +0000 (13:46 +0100)]
make-flight: Drop pvgrub (pvgrub1) tests

This is obsolete.  In 2017 in 6abb2f113025 we wrote:

    A consequence is that this test will test jessie forever.  Eventually
    jessie will rot so badly that this test fails and then we will no
    longer be testing pvgrub1.  Hopefully by then no-one will be using it.

This has now occurred.

I have verified with
  OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
that the only change is to drop jobs test-amd64-amd64-*-pvgrub.

CC: Jan Beulich <jbeulich@suse.com>
CC: Juergen Gross <jgross@suse.com>
CC: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agodi-version update
Ian Jackson [Tue, 22 Jun 2021 11:19:13 +0000 (12:19 +0100)]
di-version update

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agots-xen-build: Turn on CONFIG_PV32 again
Ian Jackson [Fri, 11 Jun 2021 17:01:43 +0000 (18:01 +0100)]
ts-xen-build: Turn on CONFIG_PV32 again

CC: George Dunlap <george.dunlap@citrix.com>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agohost allocation: Avoid starving out failing tests
Ian Jackson [Mon, 7 Jun 2021 14:25:24 +0000 (15:25 +0100)]
host allocation: Avoid starving out failing tests

This can result in bad pushes.  Better to wait.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agohost allocation: Check "job class" too
Ian Jackson [Mon, 7 Jun 2021 14:13:15 +0000 (15:13 +0100)]
host allocation: Check "job class" too

That is all jobs which start with the same \w* as this job.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agohost allocation: Prepare for further starvation check
Ian Jackson [Mon, 7 Jun 2021 14:12:58 +0000 (15:12 +0100)]
host allocation: Prepare for further starvation check

* Add a new job pattern parameter to $starvation_q
* Add a new $thisclass parameter to starving
* Pass 0 for now.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agots-xen-build-prep: Install figlet
Ian Jackson [Mon, 7 Jun 2021 13:00:25 +0000 (14:00 +0100)]
ts-xen-build-prep: Install figlet

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: posgtres compat: tidy messages
Ian Jackson [Tue, 27 Apr 2021 17:54:42 +0000 (18:54 +0100)]
mg-schema-test-database: posgtres compat: tidy messages

Now (postgresql 11) this prints a bunch of COPY notices.  Suppress
them with a -q.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: Fix following host_lifecycle
Ian Jackson [Tue, 27 Apr 2021 17:49:28 +0000 (18:49 +0100)]
mg-schema-test-database: Fix following host_lifecycle

This data doesn't really survive, since the tasks are all mangled.
Rather than trying to transpose it, just don't transfer it for now.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: posgtres compat: Sequences
Ian Jackson [Tue, 27 Apr 2021 17:48:25 +0000 (18:48 +0100)]
mg-schema-test-database: posgtres compat: Sequences

Now (postgresql 11) start_value is in a different table.  We don't
really care about it very much and mostly care about the last value,
so we fix that (and launder the for-db comparison dumps).

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: GetOpt compat: work around arg bundling bug
Ian Jackson [Tue, 27 Apr 2021 17:47:40 +0000 (18:47 +0100)]
mg-schema-test-database: GetOpt compat: work around arg bundling bug

With -qff it now complains, daftly, that -q doesn't take a value.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: posgtres compat: Cope with schema name
Ian Jackson [Tue, 27 Apr 2021 17:46:40 +0000 (18:46 +0100)]
mg-schema-test-database: posgtres compat: Cope with schema name

The dump now (postgresql 11) contains lots of "public." which made
these regexps not match.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: Be slightly more defensive
Ian Jackson [Tue, 27 Apr 2021 17:46:04 +0000 (18:46 +0100)]
mg-schema-test-database: Be slightly more defensive

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-schema-test-database: posgtres compat: psql transactions
Ian Jackson [Tue, 27 Apr 2021 17:43:23 +0000 (17:43 +0000)]
mg-schema-test-database: posgtres compat: psql transactions

Now (postgresql 11):

 * psql transaction behaviour has changed so that now we want to
   use the -1 option.  This obviates a few BEGIN and COMMITs.

 * SET implicitly starts a transaction and DROP and CREATE DATABASE
   aren't transactional and now complain if they are run in a
   transaction.  So we must add COMMIT after SET.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocr-for-branches: Add Xen 4.15, we are branching now
Ian Jackson [Wed, 24 Mar 2021 16:18:19 +0000 (16:18 +0000)]
cr-for-branches: Add Xen 4.15, we are branching now

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoUpdate cache proxy certificate
Dominic Brekau [Tue, 23 Mar 2021 11:29:36 +0000 (12:29 +0100)]
Update cache proxy certificate

4 years agoDisable updates for ssapshot.debian.org
Ian Jackson [Wed, 10 Feb 2021 16:41:12 +0000 (16:41 +0000)]
Disable updates for ssapshot.debian.org

security updates are a separate apt source.

The point of using snapshot is to avoid pulling in uncontrolled
updates, so we need to disable security updates.

The non-security SUITE-updates are disabled by this too.  But
everything is on fire and I don't want another iteration while I
figure out the proper syntax for disabling only the security updates.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoproduction-config: Update d-i version to older Debian snapshot
Ian Jackson [Wed, 10 Feb 2021 13:37:10 +0000 (13:37 +0000)]
production-config: Update d-i version to older Debian snapshot

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoproduction-config: Rewind buster armhf snapshot to 2021-01-124
Ian Jackson [Wed, 10 Feb 2021 13:19:46 +0000 (13:19 +0000)]
production-config: Rewind buster armhf snapshot to 2021-01-124

It seems that XXXX

CC: Julien Grall <julien@xen.org>
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoproduction-config: Update d-i; use snapshot for buster armhf
Ian Jackson [Tue, 9 Feb 2021 12:31:46 +0000 (12:31 +0000)]
production-config: Update d-i; use snapshot for buster armhf

This version was generated by running mg-debian-installer-update-all
with the recent changes to handle snapshots, and to use that for
buster armhf.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoproduction-config: Use a snapshot for buster armhf
Ian Jackson [Tue, 9 Feb 2021 12:28:40 +0000 (12:28 +0000)]
production-config: Use a snapshot for buster armhf

The recent Debian update broke some guest setup.  Roll back.

CC: Julien Grall <julien@xen.org>
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoDebian mirror: Disable timestamp verification for snapshot.d.o
Ian Jackson [Tue, 9 Feb 2021 16:05:17 +0000 (16:05 +0000)]
Debian mirror: Disable timestamp verification for snapshot.d.o

This is kind of duplicative of the logic in preseed_backports_packages
but I don't want to mess with that now.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-debian-installer-update: Use Debian mirror selection
Ian Jackson [Tue, 9 Feb 2021 12:28:01 +0000 (12:28 +0000)]
mg-debian-installer-update: Use Debian mirror selection

NFC with existing config.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoDebian mirror selection: Provide debian_archive_url_suite_arch
Ian Jackson [Tue, 9 Feb 2021 12:27:34 +0000 (12:27 +0000)]
Debian mirror selection: Provide debian_archive_url_suite_arch

mg-debian-installer-update is going to want this.  NFC.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoDebian mirror selection: Introduce DebianMirror[_<suite>[_<arch>]]
Ian Jackson [Tue, 9 Feb 2021 12:18:04 +0000 (12:18 +0000)]
Debian mirror selection: Introduce DebianMirror[_<suite>[_<arch>]]

No functional change with existing configs.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-debian-installer-update: Honour redirect for dtbs
Ian Jackson [Tue, 9 Feb 2021 13:03:32 +0000 (13:03 +0000)]
mg-debian-installer-update: Honour redirect for dtbs

When using snapshots, we can get a redirect and then we don't
recurse.  There doesn't seem to be a suitable option for wget, so do
this by hand before we call wget -m.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoproduction-config: d-i version update
Ian Jackson [Mon, 8 Feb 2021 10:39:58 +0000 (10:39 +0000)]
production-config: d-i version update

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomake-flight: Stripy xenstored
Ian Jackson [Fri, 22 Jan 2021 15:11:01 +0000 (15:11 +0000)]
make-flight: Stripy xenstored

Previously, we let the Xen build system and startup scripts choose
which xenstored to use.  Before we upgraded to Debian buster, that
gave us C xentored tests on ARM.  Since then, armhf and arm64 have
both had enough ocaml support and we haven't been testing C xenstored
at all !

Change this, by selecting between C xenstored and Ocaml xenstored
"at random".  Actually, this is based on the job name.  So the same
job in different branches will use the same xenstored - which helps
avoid confusion.

I have diffed the output of standalone-generate-dump-flight-runvars.
As expected, this addes a variable all_host_xenstored to every job.

To make sure we have enough diversity, I eyeballed the results.  In
particular:
  * The smoke tests now have 2 C and 2 Ocaml, one of each on
    ARM and x86.
  * XTF tests have 2 oxenstored and 3 C xenstored.
  * The ovmf flight has one of each
  * The seabios and libvirt flights look reasonably mixed.

Most other flights have enough jobs that I think things are diverse
enough without looking at them all in detail.

I think this lack of testing needs fixing for the Xen 4.15 release.
So after review I intend to push this to osstest pretest, and may
force push it even if shows regressions.

CC: Edwin Török <edvin.torok@citrix.com>
CC: Andrew Cooper <Andrew.Cooper3@citrix.com>
CC: Jürgen Groß <jgross@suse.com>
CC: Wei Liu <wl@xen.org>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
4 years agomfi-common: Provide stripy_rand
Ian Jackson [Fri, 22 Jan 2021 15:09:45 +0000 (15:09 +0000)]
mfi-common: Provide stripy_rand

We will use this in a moment.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agots-xen-install: Honour xenstored target var
Ian Jackson [Fri, 22 Jan 2021 14:41:22 +0000 (14:41 +0000)]
ts-xen-install: Honour xenstored target var

Nothing sets this yet.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agots-xen-install: Break out @commons_config
Ian Jackson [Fri, 22 Jan 2021 14:38:35 +0000 (14:38 +0000)]
ts-xen-install: Break out @commons_config

We are going to set other things here too.  Prepare for that.

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agots-xen-install: Rename $commons_config_file
Ian Jackson [Fri, 22 Jan 2021 14:37:01 +0000 (14:37 +0000)]
ts-xen-install: Rename $commons_config_file

This is the shell script config for xencommons.  We are going to set
other things here too.

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agotarget_editfile_kvp_replace: Add a bit of logging
Ian Jackson [Fri, 22 Jan 2021 14:51:38 +0000 (14:51 +0000)]
target_editfile_kvp_replace: Add a bit of logging

This helps see what's going on without fishing individual
before-and-after files out of the log directory.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agotarget_editfile_kvp_replace: Support changing multiple keys
Ian Jackson [Fri, 22 Jan 2021 14:36:20 +0000 (14:36 +0000)]
target_editfile_kvp_replace: Support changing multiple keys

No functional change with existing callers.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Actually look at retest flights (part 2)
Ian Jackson [Thu, 19 Nov 2020 16:55:48 +0000 (16:55 +0000)]
sg-report-flight: Actually look at retest flights (part 2)

To avoid going down ratholes (especially for jobs which reuse outputs
from their previous selves), the primary flight/job finder in
sg-report-flight does not recurse indefinitely through build jobs.
Instead, it restricts the build jobs investigated to those within the
same flight as the job which might be of interest.

As a result, retest jobs are, unfortunately, discarded at this stage
because we insist that the build jobs we find did use the tree
revision we are investigating.

Fix this by recursing into the corresponding primary flight too.
In the $flightsq->fetchrow loop that's $xflight.

For the primary flight, ie the first half of the UNION, that's just
the fligth itself.  So there this has no change.

For the retest flights, it is the flight that all the build jobs refer
to.  Despite the CROSS JOIN, this will be unique for any particular
"retest flight", because the query on the runvars insists that all of
the (at least some) buildjob runvars for f1 point to f0.  Ie, f1 has
no build jobs and refers to f0 for build jobs; so it can't refer to
any other f0' in the cross join.

With this change, a -retest flight can now actually be used to justify
a push.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Actually look at retest flights (part 1)
Ian Jackson [Thu, 19 Nov 2020 16:24:32 +0000 (16:24 +0000)]
sg-report-flight: Actually look at retest flights (part 1)

The existing approach does not find retest flights.  This is because
it starts by looking for flights whose runvars say they built the
version in question, and then looks to see if they contain the
relevant job.

Retest flights don't contain build jobs; they reuse the builds from
the primary flight.

Rather than making a fully general recursion scheme (which would
involve adding another index so we could quickly find all flights
which refer to this one), we add a one-level recursion.

This recursion is restricted to the flights named on the command line.
This means it takes nearly no time (as opposed to searching the whole
db for things that might be relevant - see above re need for an
index).

We filter the command line flights, looking ones which refer to the
only the primarily found flights as build jobs.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Rename "sub" to more descriptive "relevant_flights"
Ian Jackson [Thu, 19 Nov 2020 15:53:51 +0000 (15:53 +0000)]
sg-report-flight: Rename "sub" to more descriptive "relevant_flights"

No functional change.  We're going to add another WITH...

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocr-daily-branch: Sort out retest build reuse
Ian Jackson [Fri, 13 Nov 2020 17:34:32 +0000 (17:34 +0000)]
cr-daily-branch: Sort out retest build reuse

Retest flights ought to reuse precisely the builds from the flight
which prompts the retests.

mg-adjust-flight-makexrefs is the wrong tool for this job.  It can
often leave the retry flights with no build jobs and no references to
the main flights' build jobs, so the results are just broken jobs.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agopdu-snmp: Fix sleeping
Ian Jackson [Tue, 27 Oct 2020 12:17:12 +0000 (12:17 +0000)]
pdu-snmp: Fix sleeping

sleep takes only an integer.  We have to use select to sleep for
fractions of a second.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU::snmp, PDU::msw: Rename from msw to snmp
Ian Jackson [Tue, 27 Oct 2020 12:09:37 +0000 (12:09 +0000)]
PDU::snmp, PDU::msw: Rename from msw to snmp

Retain the old name for compatibility with existing configuration.

No change other than to messages.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agopdu-snmp: Support ServerTech PDUs "Pro 1/2" aka "Sentry4"
Ian Jackson [Tue, 27 Oct 2020 12:01:40 +0000 (12:01 +0000)]
pdu-snmp: Support ServerTech PDUs "Pro 1/2" aka "Sentry4"

Values from Sentry4.mib, from
  https://www.servertech.com/support/sentry-mib-oid-tree-downloads

Useful runes used when developing and testing, with "Sentry.mib" from
the Servertech zipfile renamed to "mibs/Sentry4-MIB":
  snmpwalk -On -m Sentry4-MIB -M +:mibs/ -Ci -v 2c -c private pdu1 iso.3.6.1.4.1.1718.4
  snmpwalk -m Sentry4-MIB -M +:mibs/ -Ci -v 2c -c private pdu1 iso.3.6.1.4.1.1718.4
  snmptranslate -Td -m Sentry4-MIB -M +:mibs/ Sentry4-MIB::st4OutletControlAction.1.1.2

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agopdu-snmp: Refactor model handling
Ian Jackson [Tue, 27 Oct 2020 11:51:26 +0000 (11:51 +0000)]
pdu-snmp: Refactor model handling

This makes it easier to see waht is going on and to add new model(s).

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agopdu-snmp: Centralise base OIDs
Ian Jackson [Tue, 27 Oct 2020 11:43:12 +0000 (11:43 +0000)]
pdu-snmp: Centralise base OIDs

Do not hardcoode .3 and .4 in the main logic.

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agopdu-snmp: Rename from pdu-msw
Ian Jackson [Tue, 27 Oct 2020 11:39:17 +0000 (11:39 +0000)]
pdu-snmp: Rename from pdu-msw

We are going to make this script control PDUs other than APC ones.

No overall functional change for internal callers.  Anyone out-of-tree
using this script will need to change the name of the program they run.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoREADME: Fix a typo
Ian Jackson [Tue, 27 Oct 2020 11:37:06 +0000 (11:37 +0000)]
README: Fix a typo

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agots-xen-build-prep: Install ninja
Anthony PERARD [Tue, 20 Oct 2020 09:35:49 +0000 (10:35 +0100)]
ts-xen-build-prep: Install ninja

QEMU upstream now requires ninja to build. (Probably since QEMU commit
09e93326e448 ("build: replace ninjatool with ninja"))

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agoproduction-config-cambridge: Set TftpDiVersion for buster
Ian Jackson [Tue, 8 Sep 2020 11:03:24 +0000 (12:03 +0100)]
production-config-cambridge: Set TftpDiVersion for buster

Just ran ./mg-debian-installer-update-all.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohost reuse fixes: Properly clear out old static tasks from history
Ian Jackson [Fri, 23 Oct 2020 16:08:02 +0000 (17:08 +0100)]
host reuse fixes: Properly clear out old static tasks from history

The algorithm for clearing out old lifecycle entries was wrong: it
would delete all entries for non-live tasks.

In practice this would properly remove all the old entries for
non-static tasks, since ownd tasks typically don't releease things
until the task ends (and it becomes non-live).  And it wouldn't remove
more than it should do unless some now-not-live task had an allocation
overlapping with us, which is not supposed to be possible if we are
doing a host wipe.  But it would not remove static tasks ever, since
they are always live.

Change to a completely different algorithm:

 * Check that only us (ie, $ttaskid) has (any shares of) this host
   allocated.  There's a function resource_check_allocated_core which
   already does this and since we're conceptually part of Executive
   it is proper for us to call it.  This is just a sanity check.

 * Delete all lifecycle entries predating the first entry made by
   us.  (We could just delete all entries other than ours, but in
   theory maybe some future code could result in a siutation where
   someone else could have had another share briefly at some point.)

This removes old junk from the "Tasks that could have affected" in
reports.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agostarvation: Do not count more than half a flight as starved
Ian Jackson [Thu, 22 Oct 2020 14:38:12 +0000 (15:38 +0100)]
starvation: Do not count more than half a flight as starved

This seems like a sensible rule.

This also prevents the following bizarre behaviour: when a flight has
a handful of jobs that cannot be run at all (eg because it's a
commissioning flight for only hosts of a particular arch), those jobs
can complete quite quickly.  Even with a high X value because only a
smallish portion of the flight has finished, this can lead to a modest
threshhold value.  This combines particularly badly with commissioning
flights, where the duraation estimates are often nonsense.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse fixes: Do not break host-reuse if no host allocated
Ian Jackson [Thu, 22 Oct 2020 14:02:18 +0000 (15:02 +0100)]
host reuse fixes: Do not break host-reuse if no host allocated

If host allocation failed, or our dependency jobs failed, then we
won't have allocated a host.  The host runvar will not be set.
In this case, we want to do nothing.

But we forgot to pass $noneok to selecthost.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoreporting: Minor fix to reporting of tasks with no subtask
Ian Jackson [Wed, 21 Oct 2020 18:22:33 +0000 (19:22 +0100)]
reporting: Minor fix to reporting of tasks with no subtask

subtask can be NULL.  If so, do not include it.

This change fixes a warning and a minor cosmetic defect.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPrefix guest LV names with the job name
Ian Jackson [Mon, 19 Oct 2020 11:41:27 +0000 (12:41 +0100)]
Prefix guest LV names with the job name

This means that a subsequent test which reuses the same host will not
use the same LVs.  This is a good idea because reusing the same LV
names in a subsequent job means relying on the "ad hoc run" cleanup
code.  This is a bad idea because that code is rarely tested.

And because, depending on the situation, the old LVs may even still be
in use.  For example, in a pair test, the guest's LVs will still be
set up for use with nbd.

It seems better to fix this by using a fresh LV rather than adding
more teardown code.

The "wear limit" on host reuse is what prevents the disk filling up
with LVs from old guests.

ts-debian-fixup needs special handling, because Debian's xen-tools'
xen-create-image utility hardcodes its notion of LV name construction.
We need to rename the actual LVs (perhaps overwriting old ones from a
previous ad-hoc run) and also update the config.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoIntroduce guest_mk_lv_name
Ian Jackson [Mon, 19 Oct 2020 11:40:23 +0000 (12:40 +0100)]
Introduce guest_mk_lv_name

This changes the way the disk name is constructed but not to any
overall effect.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse fixes: Fix runvar entry for adhoc tasks
Ian Jackson [Wed, 21 Oct 2020 17:38:51 +0000 (18:38 +0100)]
host reuse fixes: Fix runvar entry for adhoc tasks

When processing an item from the host lifecycle table into the runvar,
we don't want to do all the processing of flight and job.  Instead, we
should simply put the ?<taskid> into the runvar.

Previously this would produce ?<taskid>: which the flight reporting
code would choke on.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse fixes: Fix running of steps adhoc
Ian Jackson [Wed, 21 Oct 2020 16:28:07 +0000 (17:28 +0100)]
host reuse fixes: Fix running of steps adhoc

When a ts script is run by hand, for adhoc testing, there is no
OSSTEST_TESTID variable in the environment and the script does not
know it's own step number.  Such adhoc runs are not tracked as steps
in the steps table.

For host lifecycle purposes, treat these as ad-hoc out-of-flight uses,
based only on the taskid (which will usually be a person's personal
static task).

Without this, these adhoc runs fail with a constraint violating trying
to insert a flight/job/step row into the host lifecycle table: the
constraint requires the step to be specified but it is NULL.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSU: Retransmit on/off until PDU has changed
Ian Jackson [Wed, 21 Oct 2020 15:14:17 +0000 (16:14 +0100)]
PDU/MSU: Retransmit on/off until PDU has changed

The main effect of this is that the transcript will actually show the
new PDU state.  Previously we would call show(), but APC PDUs would
normally not change immediately, so the transcript would show the old
state.

This also guards against an unresponsive PDU or a packet getting lost.
I don't think we have ever seen that.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSW: Make show() return the value from get()
Ian Jackson [Wed, 21 Oct 2020 15:13:26 +0000 (16:13 +0100)]
PDU/MSW: Make show() return the value from get()

No-one uses this return value yet, so NFC.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSW: Actually implement delayed-*
Ian Jackson [Wed, 21 Oct 2020 15:05:50 +0000 (16:05 +0100)]
PDU/MSW: Actually implement delayed-*

Nothing in our tree uses this but having it here is useful docs for
the protocol so I shan't just delete it.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSW: Break out action_value()
Ian Jackson [Wed, 21 Oct 2020 15:05:36 +0000 (16:05 +0100)]
PDU/MSW: Break out action_value()

This is going to be useful in a moment.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSW: Break out get()
Ian Jackson [Wed, 21 Oct 2020 15:03:05 +0000 (16:03 +0100)]
PDU/MSW: Break out get()

This is going to be useful in a moment.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/MSW: Warn that SNMP status is often not immediately updated
Ian Jackson [Wed, 21 Oct 2020 14:41:33 +0000 (15:41 +0100)]
PDU/MSW: Warn that SNMP status is often not immediately updated

If you don't know this, it's very confusing.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoPDU/IPMI: Retransmit, don't just wait
Ian Jackson [Wed, 21 Oct 2020 14:39:57 +0000 (15:39 +0100)]
PDU/IPMI: Retransmit, don't just wait

We have a system for which
   ipmitool -H sabro0m -U root -P XXXX -I lanplus power on
seems to work but doesn't take effect the first time.

Retransit each retry.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoshare in jobdb: Move out-of-flight special case higher up
Ian Jackson [Wed, 21 Oct 2020 15:01:23 +0000 (16:01 +0100)]
share in jobdb: Move out-of-flight special case higher up

This avoids running the runvar computation loop outside flights.
This is good amongst other things because that loop prints warnings
about undef $flight and $job.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoshare in jobdb: Break out $checkconstraints and move call
Ian Jackson [Wed, 21 Oct 2020 14:54:20 +0000 (15:54 +0100)]
share in jobdb: Break out $checkconstraints and move call

This must happen after we introduce our new row or it is not
effective!

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoDo not mark hosts used for pair test as reusable
Ian Jackson [Fri, 16 Oct 2020 16:49:38 +0000 (17:49 +0100)]
Do not mark hosts used for pair test as reusable

We do not currently tear down the nbd, and that means the next test
cannot remove our LVs.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-run-job: Allow per-job control of test host reuse
Ian Jackson [Fri, 16 Oct 2020 16:48:04 +0000 (17:48 +0100)]
sg-run-job: Allow per-job control of test host reuse

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoRevert "host reuse: Reuse hosts only in same role (for now)"
Ian Jackson [Fri, 16 Oct 2020 16:35:22 +0000 (17:35 +0100)]
Revert "host reuse: Reuse hosts only in same role (for now)"

This workaround is no longer needed because I have fixed the problem
properly.

Also, it didn't work anyway, because at that point $ho isn't set, so
all this did was produce some Perl warnings.

This reverts commit f3668acae2c6201c680dc7b4e9085ab184136d7e.

4 years agoknown hosts handling: Ensure things are good for multi-host jobs
Ian Jackson [Fri, 16 Oct 2020 15:28:58 +0000 (16:28 +0100)]
known hosts handling: Ensure things are good for multi-host jobs

When a multi-host job reuses host(s) from earlier jobs, the set of
hosts set up in the on-host known_hosts files may be insufficient,
since the hosts we are using now may not have been in any of the
flight's runvars when the earlier job set them up.

So we need to update the known_hosts.  We use the flight's current
set, which will include all of our hosts.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoknown_hosts handling: Fix over-broad SQL query
Ian Jackson [Fri, 16 Oct 2020 15:28:48 +0000 (16:28 +0100)]
known_hosts handling: Fix over-broad SQL query

This should match only "*_host" and "host".  We don't want it matching
"*host" without a "_".

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse: Reuse hosts only in same role (for now)
Ian Jackson [Fri, 16 Oct 2020 12:33:15 +0000 (13:33 +0100)]
host reuse: Reuse hosts only in same role (for now)

This is a workaround.  There is a problem with hoat key setup in a
group of hosts, which means that when a pair test reuses a host set up
by a different test, we can get
   Host key verification failed.
during the src-to-dst migration.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocr-daily-branch: Heuristics for when to do immediate retest flight
Ian Jackson [Mon, 12 Oct 2020 15:48:26 +0000 (16:48 +0100)]
cr-daily-branch: Heuristics for when to do immediate retest flight

Do not do a retest if it would involve retesting more than 10% of the
original flight, or if it wouldn't get a push even if the retests
pass.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Include count of blockers, and of jobs, in mro
Ian Jackson [Mon, 12 Oct 2020 15:26:15 +0000 (16:26 +0100)]
sg-report-flight: Include count of blockers, and of jobs, in mro

The mro will now contain exactly one of "blockers" or "tolerable".

Nothing uses this yet.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocr-daily-branch: Do not do immediate retry of failing xtf flights
Ian Jackson [Thu, 8 Oct 2020 19:02:33 +0000 (20:02 +0100)]
cr-daily-branch: Do not do immediate retry of failing xtf flights

CC: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoHonour OSSTEST_SIMULATE_FAIL_RETRY for immediate retries
Ian Jackson [Thu, 8 Oct 2020 16:46:39 +0000 (17:46 +0100)]
Honour OSSTEST_SIMULATE_FAIL_RETRY for immediate retries

This is primarily useful for debugging the immediate-retry logic, but
it seems churlish to delete it again.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocr-daily-branch: Immediately retry failing tests
Ian Jackson [Thu, 16 Jul 2020 14:51:41 +0000 (15:51 +0100)]
cr-daily-branch: Immediately retry failing tests

We exclude the self-tests because we don't want to miss breakage, and
the Xen smoke tests because they will be run again RSN anyway.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agocri-args-hostlists: Move flight_html_dir variable
Ian Jackson [Thu, 8 Oct 2020 17:35:43 +0000 (18:35 +0100)]
cri-args-hostlists: Move flight_html_dir variable

This is only used in report_flight.  We are going to want to call
report_flight from outside start_email, without having to set that
variable ourselves.

The variable isn't actually used in start_email.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoIntroduce real-retry blessing
Ian Jackson [Fri, 17 Jul 2020 16:43:37 +0000 (17:43 +0100)]
Introduce real-retry blessing

Nothing produces this yet.  (There's play-retry as well of course but
we don't need to document that really.)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Nicer output for --refer-to-flight option
Ian Jackson [Thu, 8 Oct 2020 18:02:14 +0000 (19:02 +0100)]
sg-report-flight: Nicer output for --refer-to-flight option

Sort the flight summary lines together, before the URLs.  This makes
it considerably easier to read.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Provide --refer-to-flight option
Ian Jackson [Fri, 17 Jul 2020 17:01:13 +0000 (18:01 +0100)]
sg-report-flight: Provide --refer-to-flight option

This just generates an extra heading and URL at the top of the output.
In particular, it doesn't affect the algorithms which calculate
regressions.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agosg-report-flight: Break out printout_flightheader
Ian Jackson [Fri, 17 Jul 2020 16:54:27 +0000 (17:54 +0100)]
sg-report-flight: Break out printout_flightheader

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agocri-args-hostlists: Break out report_flight and publish_logs
Ian Jackson [Fri, 17 Jul 2020 16:50:31 +0000 (17:50 +0100)]
cri-args-hostlists: Break out report_flight and publish_logs

NFC.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agocri-args-hostlists: New debug var $OSSTEST_REPORT_JOB_HISTORY_RUN
Ian Jackson [Thu, 16 Jul 2020 15:09:21 +0000 (16:09 +0100)]
cri-args-hostlists: New debug var $OSSTEST_REPORT_JOB_HISTORY_RUN

No effect if this is empty.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-job-history: eval $DAILY_BRANCH_PREEXEC_HOOK
Ian Jackson [Thu, 16 Jul 2020 14:59:17 +0000 (15:59 +0100)]
sg-report-job-history: eval $DAILY_BRANCH_PREEXEC_HOOK

Put the call to this debugging/testing variable inside an eval.  This
allows a wider variety of stunts.  The one in-tree reference is
already compatible with this new semantics.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agomg-execute-flight: Do not include the transcript in reports
Ian Jackson [Thu, 15 Oct 2020 13:16:02 +0000 (14:16 +0100)]
mg-execute-flight: Do not include the transcript in reports

These are large and not very useful.  A copy is in the tree if needed.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Consider all blessings for "never pass"
Ian Jackson [Thu, 15 Oct 2020 13:15:26 +0000 (14:15 +0100)]
sg-report-flight: Consider all blessings for "never pass"

$anypassq is used for the "never pass" check; the distinction between
this and simply "fail" is cosmetic (although it can be informative).

On non-"real" flights, it can easily happen that the flight never
passed *on this branch with this blessing* but has passed on real.  So
the steps subquery does not find us an answer within reasonable time.

Work around this by always searching for "real".  This keeps the
performance within acceptable bounds even during ad-hoc testing.

We don't actually use the row from this query, so the only effect is
that when the job passed in a "real" flight, we go on to the full
regresson analysis rather than short-circuiting and reporting "never
pass".

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoHonour OSSTEST_SIMULATE_FAIL in sg-run-job
Ian Jackson [Thu, 8 Oct 2020 16:15:25 +0000 (17:15 +0100)]
Honour OSSTEST_SIMULATE_FAIL in sg-run-job

This is a Tcl list of globs for <job>.<step>, and allows for
simulating particular test failures.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoHonour OSSTEST_SIMULATE=2 to actually run dummy flight
Ian Jackson [Thu, 8 Oct 2020 16:01:50 +0000 (17:01 +0100)]
Honour OSSTEST_SIMULATE=2 to actually run dummy flight

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Word-wrapping improvements to job and step names
Ian Jackson [Mon, 5 Oct 2020 16:23:54 +0000 (17:23 +0100)]
sg-report-flight: Word-wrapping improvements to job and step names

Use <wbr>.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Sharing reports: more task finished info
Ian Jackson [Mon, 5 Oct 2020 17:47:12 +0000 (18:47 +0100)]
sg-report-flight: Sharing reports: more task finished info

Other steps from jobs affecting this host either started after we are
running, and therefore didn't affect the stuff we're reporting, or
already in the db.  Furthermore, any such effects for steps which have
finished must have completed by the max finished time  But if there
are unfinished steps, we don't know the finish time.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agotsreadconfig: Change misleading "setting" message
Ian Jackson [Fri, 2 Oct 2020 16:13:34 +0000 (17:13 +0100)]
tsreadconfig: Change misleading "setting" message

These are the *existing* runvars and it is confusing that we print
"setting" for them.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoflight other job reporting: Further improvements to ordering
Ian Jackson [Thu, 3 Sep 2020 17:59:23 +0000 (18:59 +0100)]
flight other job reporting: Further improvements to ordering

We want to definitely put these NULLs last.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agoflight other job reporting: Put nulls last in the report
Ian Jackson [Thu, 3 Sep 2020 15:33:14 +0000 (16:33 +0100)]
flight other job reporting: Put nulls last in the report

Cosmetic change only, but this makes the results easier to understand.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Improvements to other job (share/reuse) reporting
Ian Jackson [Fri, 2 Oct 2020 15:19:29 +0000 (16:19 +0100)]
sg-report-flight: Improvements to other job (share/reuse) reporting

* Prefer to show "prep" (purple) rather than "share".
* Show our own relationship, in particular to show if it was prep.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agosg-report-flight: Reformat slightly
Ian Jackson [Fri, 2 Oct 2020 15:19:04 +0000 (16:19 +0100)]
sg-report-flight: Reformat slightly

This is more regular and will make the next commit easier to
understand.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse: New protocol between sg-run-job and ts-host-reuse
Ian Jackson [Thu, 3 Sep 2020 10:58:30 +0000 (11:58 +0100)]
host reuse: New protocol between sg-run-job and ts-host-reuse

Abolish post-test-ok (which runs only if successful) and replace it
with final (which sets the runvar to indicate finality, and runs
regardless).

This allows a subsequent job which reuses the host to see that this
job had finished using the host.  This is relevant for builds, where a
host can be reused even after a failed job.

"Lies", where we claim the use of the host was done, are
avoided (barring unlikely races) because selecthost de-finalises the
runvar.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse: ts-host-reuse: Prepare for argument handling
Ian Jackson [Thu, 3 Sep 2020 10:57:29 +0000 (11:57 +0100)]
host reuse: ts-host-reuse: Prepare for argument handling

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
4 years agohost reuse: sg-run-job: Reanme post-test-ok parameter
Ian Jackson [Thu, 3 Sep 2020 10:47:55 +0000 (11:47 +0100)]
host reuse: sg-run-job: Reanme post-test-ok parameter

This is more accurate.

No overall functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>