]> xenbits.xensource.com Git - osstest.git/log
osstest.git
21 months agots-xen-build-prep: force use of git protocol v2
Anthony PERARD [Thu, 22 Jun 2023 09:09:18 +0000 (09:09 +0000)]
ts-xen-build-prep: force use of git protocol v2

Recent version of QEMU (to be 8.1) started to use meson subproject to
clone extra repo. With the example of the subproject "dtc", they do a
shallow clone with a sha1. Meson end up running:

    git fetch --depth 1 origin b6910bec11614980a21e46fbccc35934b671bd81

This command fails. I think the error message is something like "the
remote end hung up unexpectedly", on Debian Buster. A more useful
message with more recent version of git seems to be "couldn't find
remote ref".

If we allow git to communicate with the protocol v2, then the shallow
clone works. But git on buster still use v1 by default. Force it to
use v2.

This needs a git-cache-proxy version that can allow to switch to v2 of
the protocol. A bug is open upstream to track this change:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040476

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
22 months agoUse updated mirror for buster armhf, and update debian-installer
Anthony PERARD [Mon, 19 Jun 2023 14:37:14 +0000 (14:37 +0000)]
Use updated mirror for buster armhf, and update debian-installer

This reverts commit b838a9daeb3b ("production-config: Use a snapshot
for buster armhf")

Installation now fails with "Invalid Release signature", while
downloading the "Release" file of a repo.

But, using the main mirror for armhf boxes seems to work fine now.

To use the live mirror, we need to update the debian-installer as
there's a newer version of the kernel. Otherwise, installation fails
with the installer not able to find the disk.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
23 months agots-xen-build-prep: Install python3-venv for QEMU
Anthony PERARD [Mon, 22 May 2023 13:54:48 +0000 (13:54 +0000)]
ts-xen-build-prep: Install python3-venv for QEMU

Since QEMU commit 81e2b198a8cb ("configure: create a python venv
unconditionally"), a python venv is always created and this new package
is needed on Debian.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2 years agoUpdate cache proxy certificate
Anthony PERARD [Mon, 3 Apr 2023 14:46:07 +0000 (15:46 +0100)]
Update cache proxy certificate

2 years agoPDU/IPMI: Be less aggressive with IPMI commands
Anthony PERARD [Fri, 10 Mar 2023 17:07:21 +0000 (17:07 +0000)]
PDU/IPMI: Be less aggressive with IPMI commands

The machine rimava0 doesn't power off or power on when we keep doing
"power status" then "power off" ipmi command without waiting.

Currently, osstest does:
    loop
ipmitool power status
ipmitool power off
sleep 1

This loop goes on forever, the machine never change power state.
Adding some wait in between both command works.

While here, test for timeout just after a status check instead of
sending the `power off` command again which we would never check the
result of.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoap-common: Fix qemu.git URL
Anthony PERARD [Mon, 6 Mar 2023 13:57:31 +0000 (13:57 +0000)]
ap-common: Fix qemu.git URL

Cloning from "git://git.qemu.org/qemu.git" haven't work for maybe a
month.

While "https://git.qemu.org/qemu.git" seems to work, it only redirects
to gitlab.com.

qemu.org website point to a repo hosted by gitlab.com.

So, switch to "https://gitlab.com/qemu-project/qemu.git".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2 years agocr-for-branches: Add Xen and QEMU 4.17 branch
Julien Grall [Thu, 1 Dec 2022 10:32:33 +0000 (10:32 +0000)]
cr-for-branches: Add Xen and QEMU 4.17 branch

Signed-off-by: Julien Grall <julien@xen.org>
2 years agolibvirt: disable Werror for non-libvirt flights
Roger Pau Monne [Tue, 13 Sep 2022 08:39:48 +0000 (10:39 +0200)]
libvirt: disable Werror for non-libvirt flights

Current usage of Werror=switch-enum by default for libvirt builds out
of the git tree causes issues when new items are added to libxl public
API enums if those are used in a switch statement in libvirt code.
This leads to libvirt build failures for seemingly unrelated libxl
changes.

In order to prevent those errors from blocking the push gate, disable
Werror for libvirt builds when not in a libvirt specific flight.

The errors will be reported on the libvirt flight, and block the
pushes there.  So the author of the changes in libxl is still expected
to send a fix to libvirt code.  This is no ideal, but the other option
is to just disable Werror for all libvirt builds and let libvirt
developers fix the breakage when they notice it.

runvar differences for a xen-unstable flight are:

--- /dev/fd/63  2022-09-15 15:57:44.340581730 +0000
+++ /dev/fd/62  2022-09-15 15:57:44.340581730 +0000
@@ -574,6 +574,10 @@
 test-xtf-amd64-amd64-3                                arch                            amd64
 test-xtf-amd64-amd64-4                                arch                            amd64
 test-xtf-amd64-amd64-5                                arch                            amd64
+build-amd64-libvirt                                   autogen_options                 --disable-werror
+build-arm64-libvirt                                   autogen_options                 --disable-werror
+build-armhf-libvirt                                   autogen_options                 --disable-werror
+build-i386-libvirt                                    autogen_options                 --disable-werror
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    bios                            seabios
 test-amd64-amd64-qemuu-nested-amd                     bios                            seabios
 test-amd64-amd64-qemuu-nested-intel                   bios                            seabios
@@ -1217,6 +1221,10 @@
 build-arm64-libvirt                                   make_njobs                      1
 build-armhf-libvirt                                   make_njobs                      1
 build-i386-libvirt                                    make_njobs                      1
+build-amd64-libvirt                                   meson_options                   -Dwerror=false
+build-arm64-libvirt                                   meson_options                   -Dwerror=false
+build-armhf-libvirt                                   meson_options                   -Dwerror=false
+build-i386-libvirt                                    meson_options                   -Dwerror=false
 test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict recipe_dmrestrict               true
 test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict  recipe_dmrestrict               true
 test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict recipe_nomigrate                true

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
Changes since v1:
 - Use -Dwerror=false instead of -Dgit_werror=disabled
---
Cc: Ian Jackson <iwj@xenproject.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Julien Grall <julien@xen.org>
2 years agots-libvirt-build: Rework to build with meson
Anthony PERARD [Fri, 29 Jul 2022 13:39:52 +0000 (14:39 +0100)]
ts-libvirt-build: Rework to build with meson

libvirt have switch build system to Meson + Ninja, there is no more
autogen.sh script.

Add missing dependency "libtirpc-dev" and "meson".

libvirt needs at least meson 0.54, the version avaiable in Debian
Buster is too old, but we can install it from backports.

In order to find out if Meson is used or not, we'll check if the
"autogen.sh" script is missing. And in the build dir, we will look for
a "Makefile".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoTestSupport: Add support for installing from backport repo
Anthony PERARD [Mon, 1 Aug 2022 16:36:41 +0000 (17:36 +0100)]
TestSupport: Add support for installing from backport repo

We are going to need to install package from the debian backport
repository in order to do a build.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agots-xen-build-prep: Install newer NASM version, to build OVMF
Anthony PERARD [Thu, 19 May 2022 10:55:25 +0000 (11:55 +0100)]
ts-xen-build-prep: Install newer NASM version, to build OVMF

Recent versions of OVMF now need a version of NASM that is newer
than the one available on Debian oldstable/buster. They want to use
NASM 2.15.05 [1], which is available in Debian stable/bullseye. The
need to use a newer version started with d3febfd9ade3 ("MdePkg:
Replace Opcode with the corresponding instructions.").

There is no backport package available but the nasm package from
Debian Bullseye can easily be installed on Buster as it has few
dependencies and are already satisfied.

[1] https://github.com/tianocore/edk2/commit/6a890db161cd6d378bec3499a1e774db3f5a27a7
    ("BaseTools: Upgrade the version of NASM tool")

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoosstest: update Debian Buster install CD media to 10.12
Roger Pau Monne [Mon, 2 May 2022 15:13:32 +0000 (17:13 +0200)]
osstest: update Debian Buster install CD media to 10.12

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoosstest: install irqbalance
Roger Pau Monne [Tue, 12 Apr 2022 11:20:58 +0000 (13:20 +0200)]
osstest: install irqbalance

Or else all interrupts will get bound to (v)CPU 0.

This doesn't cause issues on small boxes, but boxes with a non-trivial
amount of CPUs can struggle without interrupts being balanced across
available vCPUs, as the number of vCPUs offered to dom0 matches the
number of physical CPUs.

For example sabro boxes (Xeon Silver 4114 x 2 sockets) would sometimes
report timeouts which seem to be solved by using irqbalance in dom0.

irqbalance is also available on Arm, so install unconditionally.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoosstest: stop anacron service
Roger Pau Monne [Mon, 4 Apr 2022 09:58:47 +0000 (11:58 +0200)]
osstest: stop anacron service

Just disabling cron in rc.d is not enough. There's also anacron which
will get invoked during startup, and since apt-compat has a delay of
up to 30min it can be picked up by the leak detector if the test
finishes fast enough:

LEAKED [process 14563 sleep] process: root     14563 14556  0 07:49 ?        00:00:00 sleep 1163
LEAKED [process 14550 /bin/sh] process: root     14550  2264  0 07:49 ?        00:00:00 /bin/sh -c run-parts --report /etc/cron.daily
LEAKED [process 14551 run-parts] process: root     14551 14550  0 07:49 ?        00:00:00 run-parts --report /etc/cron.daily
LEAKED [process 14556 /bin/sh] process: root     14556 14551  0 07:49 ?        00:00:00 /bin/sh /etc/cron.daily/apt-compat

From:

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

To prevent this disable anacron like it's done for cron.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
Changes since v1:
 - Don't fail if the service is not present.

3 years agoosstest: update Debian installer version
Roger Pau Monne [Mon, 28 Mar 2022 08:20:09 +0000 (10:20 +0200)]
osstest: update Debian installer version

Update the configuration file Debian version after having run
mg-debian-installer-update-all.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocoverity: disable flight from crontab
Roger Pau Monne [Mon, 21 Feb 2022 09:46:38 +0000 (10:46 +0100)]
coverity: disable flight from crontab

We are currently doing the Coverity Scans using a github workflow.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agodaily-cron-email-real-*: Temporarily drop osstest-admin
Ian Jackson [Tue, 14 Dec 2021 14:51:05 +0000 (14:51 +0000)]
daily-cron-email-real-*: Temporarily drop osstest-admin

Roger has agreed to take on osstest admin for the moment.  Someone who
intents to take on the role long term will probably want to get CC's
of these flight reports, but it's fairly noisy.  So for now, send them
only to the lists.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
3 years agodaily-cron-email-{play,adhoc}-*: Drop Citrix email
Ian Jackson [Tue, 14 Dec 2021 14:45:46 +0000 (14:45 +0000)]
daily-cron-email-{play,adhoc}-*: Drop Citrix email

Any such adhoc flights run from cron should be reported to
osstest-admin, not my (soon to be deleted) Citrix adddress.

Now the only remaining occurrences are
  - examples
  - authorship annotation of the init script
  - crontab-cambridge, which would need updating

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
3 years agots-xen-install: enable timestamp on guests logs
Roger Pau Monne [Thu, 25 Nov 2021 15:06:46 +0000 (16:06 +0100)]
ts-xen-install: enable timestamp on guests logs

Enable the timestamp feature of xenconsoled so guests logs have a time
reference. Can be helpful when debugging boot related slowness.

This requires using the XENCONSOLED_ARGS option and setting both the
log and the timestamp options. Note that setting XENCONSOLED_TRACE
will override any options in XENCONSOLED_ARGS, so they can not be used
in conjunction.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agots-memdisk-try-append: Fix for fact that broken() does not return
Ian Jackson [Fri, 5 Nov 2021 17:07:49 +0000 (17:07 +0000)]
ts-memdisk-try-append: Fix for fact that broken() does not return

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agoTestSupport: sub broken: document that it does not return.
Ian Jackson [Fri, 5 Nov 2021 17:07:38 +0000 (17:07 +0000)]
TestSupport: sub broken: document that it does not return.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agoTestSupport: sub broken: exit with status 0 for skip
Ian Jackson [Fri, 5 Nov 2021 17:06:01 +0000 (17:06 +0000)]
TestSupport: sub broken: exit with status 0 for skip

Otherwise, whatever calls us will set the step to fail (or something).

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agoTestSupport: sub broken: Add a newline
Ian Jackson [Fri, 5 Nov 2021 17:05:06 +0000 (17:05 +0000)]
TestSupport: sub broken: Add a newline

This suppresses printing of the the line number, which is not useful.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agoTestSupport: sub broken: break out "$msg"
Ian Jackson [Fri, 5 Nov 2021 17:01:04 +0000 (17:01 +0000)]
TestSupport: sub broken: break out "$msg"

No functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agosg-run-job: Do not set a step status to pass unless it's running
Ian Jackson [Fri, 5 Nov 2021 18:04:47 +0000 (18:04 +0000)]
sg-run-job: Do not set a step status to pass unless it's running

This avoids skip etc. being treated as pass.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agostarvation: Only count "pass" and "fail" as done jobs
Ian Jackson [Tue, 12 Oct 2021 17:25:59 +0000 (18:25 +0100)]
starvation: Only count "pass" and "fail" as done jobs

The main effect is to treat "broken" and "blocked" jobs as not part of
the flight for starvation calculations.

This is correct for commissioning flights and OK for other flights.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agoexamination: skip memdisk on non-BIOS hosts, run per-firmware on x86
Ian Jackson [Fri, 22 Oct 2021 15:21:27 +0000 (16:21 +0100)]
examination: skip memdisk on non-BIOS hosts, run per-firmware on x86

This is a combination of two changes:

ts-memdisk-try-append: skip memdisk test on non-BIOS hosts

make-flight: examine: Insist on -bios and -uefi tests on x86

  This will let us skip ts-memdisk-try-append on non-bios platforms
  without risking regression.  It will also definitely spot
  regressions which will occur on any uefi host.

  standalone-generate-dump-flight-runvars reveals the changes are as
  follows:

  New jobs
     test-amd64-i386-examine-bios     test-amd64-i386-examine-uefi
     test-amd64-amd64-examine-bios    test-amd64-amd64-examine-uefi
  added everywhere that has the corresponding plain job, namely
     osstest
     linux-*
     xen-unstable

  These jobs are just like the plain jobs, except that one of
     ,PropEq:Firmware:bios:bios
     ,PropEq:Firmware:bios:uefi
  has been added to the end of all_hostflags.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agots-memdisk-try-append: More defensive case test
Ian Jackson [Fri, 22 Oct 2021 15:05:19 +0000 (16:05 +0100)]
ts-memdisk-try-append: More defensive case test

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agots-memdisk-try-append: Enable perl warnings
Ian Jackson [Fri, 22 Oct 2021 14:57:40 +0000 (15:57 +0100)]
ts-memdisk-try-append: Enable perl warnings

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agots-memdisk-try-append: Reindent (nfc)
Ian Jackson [Fri, 22 Oct 2021 14:55:26 +0000 (15:55 +0100)]
ts-memdisk-try-append: Reindent (nfc)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agomake-flight: do_examine_one: add firmware argument
Ian Jackson [Fri, 22 Oct 2021 15:35:39 +0000 (16:35 +0100)]
make-flight: do_examine_one: add firmware argument

Nothing sets this yet.

No functional change (checked with standalone-generate-dump-flight-runvars)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agoproduction-config: renumbering the test lab
Ian Jackson [Sat, 4 Dec 2021 22:16:32 +0000 (22:16 +0000)]
production-config: renumbering the test lab

Our dhcp pool exhausted.  I am going to force push this.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-repro-setup: Make ordinary alloc: work again
Ian Jackson [Wed, 24 Nov 2021 14:34:47 +0000 (14:34 +0000)]
mg-repro-setup: Make ordinary alloc: work again

In e7febe5f6edc, we hosted an error earlier in the script.  But in the
old location, OSSTEST_TASK would always be set if statictask was.  In
the new one, that hasn't been done yet.

No release implications since it touches a by-hand utility only.

Fixes: e7febe5f6edc "mg-repro-setup: Promote an error test to before builds (nfc)"
CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agocr-for-branches: Xen 4.16 branch
Ian Jackson [Tue, 23 Nov 2021 16:27:04 +0000 (16:27 +0000)]
cr-for-branches: Xen 4.16 branch

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agoallow.all: Treat freeBSD memdisk-try-append failures as nonblocking
Ian Jackson [Mon, 22 Nov 2021 11:51:01 +0000 (11:51 +0000)]
allow.all: Treat freeBSD memdisk-try-append failures as nonblocking

In practice this currently fails on some of our hosts.  We don't seem
to have resources to investigate properly, and this will be blocking
recomissioning of hosts if we don't get it out of the way.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
3 years agoREADME.dev: Document to use updated osstest for commissioning
Ian Jackson [Mon, 22 Nov 2021 11:50:18 +0000 (11:50 +0000)]
README.dev: Document to use updated osstest for commissioning

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agots-xen-build: Pass --enable if --disable found in usage, and v.v.
Ian Jackson [Wed, 27 Oct 2021 10:53:50 +0000 (11:53 +0100)]
ts-xen-build: Pass --enable if --disable found in usage, and v.v.

The existing code works in practice if the usage message always lists
the non-default, since the unlisted-in-usage options that would be
supported, but are elided, are in any case the default.

But configure might *compute* its defaults.  In which case it will
list only one of them in the usage message.  If the computed default
is not the same as the usual default (the one implied by listing the
opposite in the usage message) we would wrongly not pass the option.

So grep for both enable and disable.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
3 years agots-xen-build: Refactor enable/disable configure options
Ian Jackson [Wed, 27 Oct 2021 10:49:04 +0000 (11:49 +0100)]
ts-xen-build: Refactor enable/disable configure options

Replace the repeated pattern with a function to generate that code.
No significant functional change.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Juergen Gross <jgross@suse.com
>

3 years agoosstest: explicitly set either enable or disable qemu-traditional
Juergen Gross [Tue, 26 Oct 2021 13:56:45 +0000 (15:56 +0200)]
osstest: explicitly set either enable or disable qemu-traditional

Instead of setting "--enable-qemu-traditional" or not, switch to
setting "--enable-qemu-traditional" or "--disable-qemu-traditional".

This avoids a latent bug in the disable case, as the availability
of the option is tested via grep, which will otherwise grep for
nothing.

Reported-by: Ian Jackson <iwj@xenproject.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
3 years agoosstest: explicitly enable building qemu-traditional
Juergen Gross [Mon, 25 Oct 2021 09:54:38 +0000 (11:54 +0200)]
osstest: explicitly enable building qemu-traditional

It is planned to no longer build qemu-traditional per default.

In order to be able to continue running tests with ioemu-stubdom run
configure with --enable-qemu-traditional.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-repro-setup: Check allocation feasibility at the start
Ian Jackson [Mon, 4 Oct 2021 16:55:48 +0000 (17:55 +0100)]
mg-repro-setup: Check allocation feasibility at the start

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-allocate: feasibility check: print a reassuring message
Ian Jackson [Mon, 4 Oct 2021 16:48:54 +0000 (17:48 +0100)]
mg-allocate: feasibility check: print a reassuring message

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-allocate: Add --dry-run mode
Ian Jackson [Mon, 4 Oct 2021 16:44:48 +0000 (17:44 +0100)]
mg-allocate: Add --dry-run mode

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-allocate: Break out sub precheck (nfc)
Ian Jackson [Mon, 4 Oct 2021 16:44:13 +0000 (17:44 +0100)]
mg-allocate: Break out sub precheck (nfc)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomg-repro-setup: Promote an error test to before builds (nfc)
Ian Jackson [Mon, 4 Oct 2021 16:38:59 +0000 (17:38 +0100)]
mg-repro-setup: Promote an error test to before builds (nfc)

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agohost lifecycle: Use correct taskid column for runvar reconstruction
Ian Jackson [Mon, 4 Oct 2021 16:27:15 +0000 (17:27 +0100)]
host lifecycle: Use correct taskid column for runvar reconstruction

t.taskid might be NULL since the task may have been deleted.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
3 years agomfi-common: Drop Linux dom0 i386 tests for newer Linux branches
Ian Jackson [Thu, 9 Sep 2021 15:55:22 +0000 (16:55 +0100)]
mfi-common: Drop Linux dom0 i386 tests for newer Linux branches

This makes radical changes to the test ste for the linux-linus and
linux-next branches.

Mostly, tests are dropped but some 64-bit dom0 tests are added to
replace them.

Requested-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Ian Jackson <iwj@xenproject.org>
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>