]> xenbits.xensource.com Git - people/iwj/osstest.git/log
people/iwj/osstest.git
8 years agots-openstack-deploy: set CURL_CA_BUNDLE wip.openstack
Ian Jackson [Tue, 25 Apr 2017 18:04:55 +0000 (18:04 +0000)]
ts-openstack-deploy: set CURL_CA_BUNDLE

This overrides pip's attempt to specify a specific certificate bundle,
and is necessary if we have a MITM SSL proxy.

The security implications are not ideal, because the MITM proxy will
allow any X.509 cert from any CA, whereas pip would only allow an
expected cert.  But we got pip via plain https to start with...

CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoTestSupport: provide target_https_mitm_proxy_cert_path
Ian Jackson [Tue, 25 Apr 2017 18:04:25 +0000 (18:04 +0000)]
TestSupport: provide target_https_mitm_proxy_cert_path

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-openstack-deploy: Set http proxy
Ian Jackson [Mon, 24 Apr 2017 14:04:43 +0000 (14:04 +0000)]
ts-openstack-deploy: Set http proxy

This allows ./stack.sh to access the global internet.

CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agoCreate a flight to test OpenStack with xen-unstable and libvirt
Anthony PERARD [Wed, 15 Jul 2015 16:27:57 +0000 (17:27 +0100)]
Create a flight to test OpenStack with xen-unstable and libvirt

This patch should create a flight "openstack-nova", with those jobs:
  build-amd64
  build-amd64-xsm
  build-amd64-pvops
  build-amd64-libvirt
  test-amd64-amd64-devstack
  test-amd64-amd64-devstack-xsm
  build-armhf
  build-armhf-libvirt
  build-armhf-pvops
  build-armhf-xsm
  test-armhf-armhf-devstack
  test-armhf-armhf-devstack-xsm

About the runvars revision_* of test-*-*-devstack:
  only REVISION_OPENSTACK_NOVA is set, the others are unset.
  Empty revision_* runvar would clone the default branch, which should
  be master for every openstack repos.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-openstack-tempest: Run Tempest to check OpenStack
Anthony PERARD [Thu, 6 Aug 2015 11:33:38 +0000 (12:33 +0100)]
ts-openstack-tempest: Run Tempest to check OpenStack

This script runs the OpenStack integration test suite, Tempest.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-openstack-deploy: Deploy OpenStack on a host with devstack
Anthony PERARD [Wed, 15 Jul 2015 16:27:49 +0000 (17:27 +0100)]
ts-openstack-deploy: Deploy OpenStack on a host with devstack

This script installs any necessary packages and clones all of the OpenStack
trees which are used by devstack to deploy OpenStack.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-hosts: -l: print subtask info too
Ian Jackson [Tue, 25 Apr 2017 14:58:17 +0000 (14:58 +0000)]
mg-hosts: -l: print subtask info too

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoproxy config: Actually set https_proxy too
Ian Jackson [Tue, 25 Apr 2017 13:15:40 +0000 (13:15 +0000)]
proxy config: Actually set https_proxy too

05406e5aaffb "proxy config: Set https_proxy too" was ineffective
because in d22b80bb "proxy config: Factor out http_proxy_envsettings"
the variable name $var was not substituted into the new
supposedly-more-general shell rune, which consequently lacked the
appropriate generality.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-repro-setup: Cope with flights referencing other builds
Ian Jackson [Tue, 25 Apr 2017 13:17:45 +0000 (13:17 +0000)]
mg-repro-setup: Cope with flights referencing other builds

We attempted to do this by trying to adjust build runvars only if they
didn't have a `.'.  But cs-adjust-flight runvar-build-set has special
handling for <old-value>: it is always qualified with the flight.

So change the match to look for the current flight number.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agosg-report-flight: Do not report many non-regressions as allowable
Ian Jackson [Thu, 20 Apr 2017 13:04:36 +0000 (13:04 +0000)]
sg-report-flight: Do not report many non-regressions as allowable

In bd648aea2ebe
 sg-report-flight: report allowable regressions separately in summary
whether the regression was allowable was put in $allow, but this
was erroneously not used.

In 4a210cda9cc8
 sg-report-flight: fix allowable failure logic not to reuse $allow for two purposes (!)
that use of the variable, which was never used, was removed.

However, what ought to happen, is that $failv->{Allow} would be set to
1 if the entry matched an allow pattern, and only if it was a blocker.
That makes the logic in "report ... separately" correct.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-report-flight: Do not try to print nonexistent FirstTip info
Ian Jackson [Thu, 20 Apr 2017 12:55:18 +0000 (12:55 +0000)]
sg-report-flight: Do not try to print nonexistent FirstTip info

The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}.
Defend $pinfo against the use of an autovivified empty hashref.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-repro-setup: Use --progress-fd
Ian Jackson [Tue, 18 Apr 2017 14:43:20 +0000 (14:43 +0000)]
mg-repro-setup: Use --progress-fd

Also, print a sensible message if allocation fails.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-execute-flight: Support --progress-fd
Ian Jackson [Tue, 18 Apr 2017 14:42:39 +0000 (14:42 +0000)]
mg-execute-flight: Support --progress-fd

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-allocate: Support --progress-fd
Ian Jackson [Tue, 18 Apr 2017 14:42:22 +0000 (14:42 +0000)]
mg-allocate: Support --progress-fd

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-allocate: Document --info-base in head comment
Ian Jackson [Tue, 18 Apr 2017 14:41:13 +0000 (14:41 +0000)]
mg-allocate: Document --info-base in head comment

This documentation was omitted from
 "mg-repro-setup: Provide useful info for allocation system"

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-repro-setup: skip log capture (by default)
Ian Jackson [Tue, 18 Apr 2017 13:17:15 +0000 (13:17 +0000)]
mg-repro-setup: skip log capture (by default)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-run-job: Honour skip_testids runvar
Ian Jackson [Tue, 18 Apr 2017 13:09:38 +0000 (13:09 +0000)]
sg-run-job: Honour skip_testids runvar

This works like truncate_testids, except that the steps which match
are never run (truncate_testids skips steps *after* matching steps,
and also doesn't skip some things like log capture).

If the programmed testid for a step ends in `(*)' to request
substitutions of the stepno, the skip matching takes place against the
unsubstituted value (since it happens before a stepno is allocated).
There is no way to skip only some of a set of steps whose testids are
distinguished only by stepno.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-run-job: Start step a bit later
Ian Jackson [Tue, 18 Apr 2017 13:04:26 +0000 (13:04 +0000)]
sg-run-job: Start step a bit later

We are going to want to process the nearly-finished testid.  So
allocate a stepno at the last possible moment.

No overall functional chagne.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-run-job: Break out testid_matches_globs
Ian Jackson [Tue, 18 Apr 2017 12:59:57 +0000 (12:59 +0000)]
sg-run-job: Break out testid_matches_globs

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agotruncation: Support globs, and multiple patterns
Ian Jackson [Tue, 18 Apr 2017 12:39:29 +0000 (12:39 +0000)]
truncation: Support globs, and multiple patterns

Rename the variable to truncate_testids.  It contains glob patterns as
for Tcl `string match', space-separated.

Adjust the two places which set it: cs-bisection-step (which needs to
quote any special characters) and mg-repro-setup (which does not
really process the value, but ought to be able to cope with
space-separated lists.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-coverity-upload: Pass HttpsProxyMITMCert to curl
Ian Jackson [Tue, 18 Apr 2017 10:54:52 +0000 (10:54 +0000)]
ts-coverity-upload: Pass HttpsProxyMITMCert to curl

"proxy config: Add ability to install MITM TLS cert" sets this up on
the test hosts, but not the controller.

We don't really want this odd configuration globally on the
controller.  Instead, we have to pass it where it is needed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoTestSupport: Provide stashfilecontents
Ian Jackson [Tue, 18 Apr 2017 10:54:07 +0000 (10:54 +0000)]
TestSupport: Provide stashfilecontents

Like target_putfilecontents_* but for files on controller.

No callers yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-repro-setup: Provide useful info for allocation system
Ian Jackson [Wed, 12 Apr 2017 11:06:36 +0000 (12:06 +0100)]
mg-repro-setup: Provide useful info for allocation system

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agomg-allocate: Honour --info=start=INFO
Ian Jackson [Wed, 12 Apr 2017 10:49:46 +0000 (11:49 +0100)]
mg-allocate: Honour --info=start=INFO

Break out "manual" string as $allocinfo_start, and allow it to be set
on the command line.  No functional change with current call patterns.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agoserial logs capture: Detect errors from glob
Ian Jackson [Mon, 10 Apr 2017 16:47:49 +0000 (16:47 +0000)]
serial logs capture: Detect errors from glob

Empirically, if glob cannot do its work, it sets $! and returns an
empty list.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoserial logs capture: chomp parameters to the perl script
Ian Jackson [Mon, 10 Apr 2017 16:46:47 +0000 (16:46 +0000)]
serial logs capture: chomp parameters to the perl script

For reasons that aren't clear, perl's glob operator ignores the \n.
We can gloss over that for now, but let's chomp it in case they fix
that.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-repro-setup: New script for setting up repros automatically
Ian Jackson [Mon, 10 Apr 2017 15:33:42 +0000 (15:33 +0000)]
mg-repro-setup: New script for setting up repros automatically

Given a previously failed job, this will:
 * Create a flight for the repro attempt
 * (Optionally) allocate a host to the user's personal task
 * (Optionally) wipe the host
 * Install the version of Xen and Linux used by that flight
 * Run the job until the specified step finishes
 * Email the user

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-hosts-allocate-Executive: Honour OSSTEST_NOALLOCATE
Ian Jackson [Mon, 10 Apr 2017 15:32:35 +0000 (15:32 +0000)]
ts-hosts-allocate-Executive: Honour OSSTEST_NOALLOCATE

This allows host allocation to be skipped even though the rest of the
job is being run.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-allocate: Provide --stdout-output
Ian Jackson [Mon, 10 Apr 2017 15:31:26 +0000 (15:31 +0000)]
mg-allocate: Provide --stdout-output

This prints RESTYPE/RESNAME/SHAREIX to stdout, after allocation is
successful (outside the db retry loop).  This means that a
programmatic caller can now tell what was allocated, even if the spec
was complex.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-allocate: Redirect a few messages to stderr
Ian Jackson [Mon, 10 Apr 2017 15:30:43 +0000 (15:30 +0000)]
mg-allocate: Redirect a few messages to stderr

These were, anomalously, printed to stdout.  We are going to want to
reserve stdout for programmatically-useful output.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoselecthost: Honour IDENT_hostflagadjust runvar
Ian Jackson [Mon, 10 Apr 2017 15:29:52 +0000 (15:29 +0000)]
selecthost: Honour IDENT_hostflagadjust runvar

This allows runvars to override hostflags from the resource database
or configuration.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoselecthost: Default pdu to "unsupported" rather than nothing
Ian Jackson [Mon, 10 Apr 2017 15:29:16 +0000 (15:29 +0000)]
selecthost: Default pdu to "unsupported" rather than nothing

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoproxy config: Set https_proxy too
Ian Jackson [Thu, 6 Apr 2017 17:27:21 +0000 (17:27 +0000)]
proxy config: Set https_proxy too

Clients including curl honour https_proxy (not http_proxy) in the
environment for https:// urls.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoproxy config: Add MITM cert for Massachusetts
Ian Jackson [Thu, 6 Apr 2017 17:10:24 +0000 (17:10 +0000)]
proxy config: Add MITM cert for Massachusetts

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoproxy config: Add ability to install MITM TLS cert
Ian Jackson [Thu, 6 Apr 2017 17:06:10 +0000 (17:06 +0000)]
proxy config: Add ability to install MITM TLS cert

We want things like build jobs to be able to download things via
https.  But we want them to be cached.  To this end, we are having our
squid treat CONNECT as a request to MITM the TLS connection.

But this means that clients will see squid's cert, not the real one.
So placate them by installing the cert on each test box.

(The squid becomes part of the TCB for our coverity upload password,
but that is fine.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoproxy config: Factor out http_proxy_envsettings
Ian Jackson [Thu, 6 Apr 2017 16:48:27 +0000 (16:48 +0000)]
proxy config: Factor out http_proxy_envsettings

No overall functional change, other than slight syntax changes to
generated shell runes.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-report-flight: Fix --that-flight not to look at branch "any pass"
Ian Jackson [Fri, 7 Apr 2017 11:38:15 +0000 (12:38 +0100)]
sg-report-flight: Fix --that-flight not to look at branch "any pass"

If --that-flight was specified, we want to compare with just that
flight, and not search the branch for a previous pass.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agocri-getplatforms: Require a tested platform to have some purpose-test hosts
Ian Jackson [Fri, 7 Apr 2017 15:38:37 +0000 (16:38 +0100)]
cri-getplatforms: Require a tested platform to have some purpose-test hosts

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-xtf-run: Understand ./xtf-runner returning CRASH
Andrew Cooper [Tue, 7 Mar 2017 15:26:52 +0000 (15:26 +0000)]
ts-xtf-run: Understand ./xtf-runner returning CRASH

./xtf-runner wants to distinguish between a clean and unclean exits of the
test.  OSSTest doesn't care, so map unclean exit to failure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoTftpDiVersion update to 2017-04-06
Ian Jackson [Thu, 6 Apr 2017 11:01:15 +0000 (12:01 +0100)]
TftpDiVersion update to 2017-04-06

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobranches: Reinstate accidentally-deleted colon
Ian Jackson [Thu, 6 Apr 2017 09:41:32 +0000 (10:41 +0100)]
branches: Reinstate accidentally-deleted colon

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobranches: add linux-4.9
Ian Jackson [Mon, 3 Apr 2017 17:01:14 +0000 (18:01 +0100)]
branches: add linux-4.9

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agocs-adjust-flight: Work properly on db transaction retry
Ian Jackson [Mon, 20 Mar 2017 15:17:31 +0000 (15:17 +0000)]
cs-adjust-flight: Work properly on db transaction retry

The variable @changes is eaten during processing.  So on db retry,
there would be changes missing.  (When creating a new flight, this
would often mean a flight with no jobs, which cannot be executed.)

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agocs-adjust-flight: Remove broken memoisation of queries in for_things
Ian Jackson [Mon, 20 Mar 2017 10:53:48 +0000 (10:53 +0000)]
cs-adjust-flight: Remove broken memoisation of queries in for_things

The memo keys failed to include many of the important inputs.

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-branch-setup: Make more idempotent
Ian Jackson [Thu, 9 Mar 2017 15:13:53 +0000 (15:13 +0000)]
mg-branch-setup: Make more idempotent

Do not crash if the branch or bisect directory, or the tmp/ inside,
already exist.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agoproduction-config-cambridge: Add Roger's key
Ian Jackson [Thu, 23 Feb 2017 12:21:55 +0000 (12:21 +0000)]
production-config-cambridge: Add Roger's key

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agohtml output: ms-flights-summary: Generate link to job logs directory
Ian Jackson [Wed, 22 Feb 2017 11:49:22 +0000 (11:49 +0000)]
html output: ms-flights-summary: Generate link to job logs directory

Make each job name in the detailed tables be a link to the
(unpublished) logs for that job.

Requested-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agohtml output: ms-flights-summary: Generate link to flight logs directory
Ian Jackson [Wed, 22 Feb 2017 11:48:52 +0000 (11:48 +0000)]
html output: ms-flights-summary: Generate link to flight logs directory

Make the flight number be a link to the unpublished flight logs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agohtml output: ms-flights-summary: Break out flight_hdr_raw
Ian Jackson [Wed, 22 Feb 2017 11:48:26 +0000 (11:48 +0000)]
html output: ms-flights-summary: Break out flight_hdr_raw

Will will want this in a moment.  For now, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agohtml output: ReportHtmlUnpubBaseUrl: New config variable
Ian Jackson [Wed, 22 Feb 2017 11:45:58 +0000 (11:45 +0000)]
html output: ReportHtmlUnpubBaseUrl: New config variable

This allows us to generate private urls for unpublished flights.  This
will be useful for links from the ongoing flights summary - since,
naturally, none of those logs are published yet.

The URLs will be of more limited use; the exact usefulness will depend
on the deployment.

If no separate Unpub url is specified, simply use the Pub one.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agoPerl: Put . on @INC
Ian Jackson [Mon, 6 Feb 2017 11:59:13 +0000 (11:59 +0000)]
Perl: Put . on @INC

Perl in Debian stretch quite properly no longer has . in @INC by
default.

However, (almost everything in) osstest expects to be run standing
inside an osstest tree, and expects to find its various pieces in `.'

So add . back to @INC, at the front.

This patch was autogenerated using the following rune:

 git-grep -l '#! */usr/bin/perl' | xargs -n1 perl -i~ -pe 'next unless m/^use Osstest/; next if $done++; print "unshift \@INC, qw(.);\n";'

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agots-xtf-*: Provide for host specs on command line
Ian Jackson [Thu, 1 Dec 2016 12:52:45 +0000 (12:52 +0000)]
ts-xtf-*: Provide for host specs on command line

Without this, it can be hard to use in ad hoc ways.

CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
8 years agocs-ajust-flight: Provide runvar-build-set
Ian Jackson [Thu, 1 Dec 2016 11:28:23 +0000 (11:28 +0000)]
cs-ajust-flight: Provide runvar-build-set

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agocs-adjust-flight: Lift notspec_exfn out of for_things
Ian Jackson [Thu, 1 Dec 2016 11:27:07 +0000 (11:27 +0000)]
cs-adjust-flight: Lift notspec_exfn out of for_things

We are going to want to reuse this, so abstract it away.
As a side effect we now support negated exact matches.

No other functional change, except to debug output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agocs-ajust-flight: Use qr{} syntax
Ian Jackson [Thu, 1 Dec 2016 11:26:40 +0000 (11:26 +0000)]
cs-ajust-flight: Use qr{} syntax

This is more regular and potentially more efficient,
but has no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agocrontab etc.: run linux-linus much more often
Ian Jackson [Thu, 26 Jan 2017 17:22:44 +0000 (17:22 +0000)]
crontab etc.: run linux-linus much more often

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobisection: Really avoid flail
Ian Jackson [Thu, 26 Jan 2017 16:26:22 +0000 (16:26 +0000)]
bisection: Really avoid flail

The flail detector needs to search for flights which will look like
the one it is creating, when this one is done.  The intended blessing
always lacks `-bisect' so is no use.

We can use the last blessing for this: both cr-try-bisect and
cr-try-bisect-adhoc pass the same value for the last blessing and for
the 2nd parameter to perhaps_bisect_step_core (which is passed to
sg-execute flight to properly bless the flight when it's done).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agosg-check-tested: Do not exit without printing results
Ian Jackson [Tue, 24 Jan 2017 18:41:15 +0000 (18:41 +0000)]
sg-check-tested: Do not exit without printing results

In fd2fbb9171f12d5f45e952e2915f3e00bcaacc1a
  "sg-check-tested: Lift work into new `search' sub, and indirect output"
I missed an `exit 0'.

As a result sg-check-tested --print-revision= would never print anything!

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agotimeouts: Print slightly better message
Ian Jackson [Tue, 24 Jan 2017 15:46:31 +0000 (15:46 +0000)]
timeouts: Print slightly better message

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoRevert "timeouts: Call target_adjust_timeout for all build commands"
Ian Jackson [Tue, 24 Jan 2017 15:45:45 +0000 (15:45 +0000)]
Revert "timeouts: Call target_adjust_timeout for all build commands"

We actually do this already in tcmd, so this extra call adjusts it
twice.

This reverts commit 21d141d98ecb07d30b839829da9837af80f80728.

8 years agoproduction-config: TftpDiVersion_jessie: updated (for arm64)
Ian Jackson [Sun, 22 Jan 2017 23:49:11 +0000 (23:49 +0000)]
production-config: TftpDiVersion_jessie: updated (for arm64)

8 years agoARM64: Create jobs, and provide the installer (with backports kernel)
Ian Jackson [Wed, 18 Jan 2017 16:24:36 +0000 (16:24 +0000)]
ARM64: Create jobs, and provide the installer (with backports kernel)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agod-i: Add comment about interrupting the install
Ian Jackson [Thu, 19 Jan 2017 19:50:47 +0000 (19:50 +0000)]
d-i: Add comment about interrupting the install

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agod-i: When using backports kernel, suppress kernel modules warning
Ian Jackson [Wed, 18 Jan 2017 17:04:41 +0000 (17:04 +0000)]
d-i: When using backports kernel, suppress kernel modules warning

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agod-i: backports: When using backports kernel for a host, install linux-base
Ian Jackson [Wed, 18 Jan 2017 16:13:21 +0000 (16:13 +0000)]
d-i: backports: When using backports kernel for a host, install linux-base

Newer kernels may need a newer linux-base.  This call has the happy
side effect of adding backports to its sources.list, which is also
generally needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agod-i: preseed_create_guest: Break out preseed_backports_packages
Ian Jackson [Wed, 18 Jan 2017 16:04:19 +0000 (16:04 +0000)]
d-i: preseed_create_guest: Break out preseed_backports_packages

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: mg-netgrub-loader-update: Add some more docs
Ian Jackson [Wed, 18 Jan 2017 17:01:57 +0000 (17:01 +0000)]
netboot: mg-netgrub-loader-update: Add some more docs

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agonetboot: Rename TftpNetbootGroup (from TftpPxeGroup)
Ian Jackson [Wed, 18 Jan 2017 16:20:20 +0000 (16:20 +0000)]
netboot: Rename TftpNetbootGroup (from TftpPxeGroup)

This applies to NetGrub too.  Honour the old setting for
compatibility.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: mg-netgrub-loader-update: Print sample dhcp config fragment
Ian Jackson [Wed, 18 Jan 2017 15:56:41 +0000 (15:56 +0000)]
netboot: mg-netgrub-loader-update: Print sample dhcp config fragment

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: UEFI grub: Do it more like pxe
Ian Jackson [Wed, 18 Jan 2017 15:49:56 +0000 (15:49 +0000)]
netboot: UEFI grub: Do it more like pxe

* Abolish setup_grub_efi_bootcfg and use setup_netboot_bootcfg
  instead.  The latter function now expects to be given a config file
  for the host's bootloader.  For a UEFI host, that's a grub config
  file, which it will write to the configured NetGrub location for the
  specific host.

* Consequently, we no longer copy an actual grub image around every
  time we do a bootloader setup.  Instead, we expect that the tftp
  server will be configured to point relevant hosts at a suitable
  fixed image, which will go to our config file.

* Also, consequently, write the NetGrubTemplate path when we want to
  setup the bootloader, rather than the ad-hoc grub-%ether%.

* Update mg-netgrub-loader-update jessie so that it writes the
  NetGrubTemplateReal from the config into the grub.cfg so that the
  grub image will read that file and then read the file created by
  setup_netboot_bootcfg.

* Document this in its head comment.

Currently this new mg-netgrub-loader-update is untested because jessie
i386 grub (which is what we would run on the osstest controllers) does
not understand the arm64-efi target.  But the new Netgrub.cfg location
is in use.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agomg-netgrub-loader-update: Introduce $img
Ian Jackson [Wed, 18 Jan 2017 15:49:08 +0000 (15:49 +0000)]
mg-netgrub-loader-update: Introduce $img

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agomg-netgrub-loader-update: Introduce $grubbase
Ian Jackson [Wed, 18 Jan 2017 15:48:42 +0000 (15:48 +0000)]
mg-netgrub-loader-update: Introduce $grubbase

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Change stash file name to not be pxelinux-specific
Ian Jackson [Wed, 18 Jan 2017 15:41:45 +0000 (15:41 +0000)]
netboot: Change stash file name to not be pxelinux-specific

This will be wrong when this is used for netgrub too.

Only functional change is to log outputs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Introduce TftpNetGrub*
Ian Jackson [Wed, 18 Jan 2017 15:26:16 +0000 (15:26 +0000)]
netboot: Introduce TftpNetGrub*

* When expanding netboot filenames, look for NetGrub config keys
  rather than Pxe filenames.  Currently this only affects mg-hosts
  because the files are created by setup_grub_efi_bootcfg, and the
  files are of course referred to only by the actual netboot grub
  image (which may be made by mg-netgrub-loader-update: neither of
  which honour these variables.

* Update the documentation, the default configs, and the
  production-config-*.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Break out subst_netboot_template
Ian Jackson [Wed, 18 Jan 2017 15:12:34 +0000 (15:12 +0000)]
netboot: Break out subst_netboot_template

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Rename ./mg-hosts mknetbootdir subcommand
Ian Jackson [Tue, 17 Jan 2017 18:24:32 +0000 (18:24 +0000)]
netboot: Rename ./mg-hosts mknetbootdir subcommand

Was ./mg-hosts mkpxedir, but it is more general.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Rename mg-netgrub-loader-update
Ian Jackson [Tue, 17 Jan 2017 18:23:29 +0000 (18:23 +0000)]
netboot: Rename mg-netgrub-loader-update

This used to be mg-pxe-loader-update, but it updates grub and not
anything to do with PXE.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Change pxe to netboot in variable names
Ian Jackson [Tue, 17 Jan 2017 18:20:47 +0000 (18:20 +0000)]
netboot: Change pxe to netboot in variable names

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Change pxe to netboot in comments, docs and messages
Ian Jackson [Tue, 17 Jan 2017 18:16:35 +0000 (18:16 +0000)]
netboot: Change pxe to netboot in comments, docs and messages

UEFI grub netbooting is not PXE.  Indeed PXE is a BIOS thing only.

No functional change other than to messages.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Rename pxeboot functions
Ian Jackson [Tue, 17 Jan 2017 18:13:29 +0000 (18:13 +0000)]
netboot: Rename pxeboot functions

 git-ls-files | xargs perl -i~ -pe 's/\bsetup_pxeboot_/setup_netboot_/g'
 git-ls-files | xargs perl -i~ -pe 's/\bsetup_pxelinux_/setup_netboot_/g'

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agonetboot: Rework interface to host_netboot_file (was host_pxefile)
Ian Jackson [Tue, 17 Jan 2017 18:01:16 +0000 (18:01 +0000)]
netboot: Rework interface to host_netboot_file (was host_pxefile)

* Now it takes the tail of the template key (currently, normally
  `Templates') rather than the whole of it (`PxeTemplates'); the
  `Pxe' part is implied.

* Now it normally returns the whole path, including PxeDir, which the
  caller is no longer expected to prepend.  In any case, it supplies
  the dir value.

* Rename it.

* All call sites adjusted.

Overall, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agopxe templates: Do defaulting outside host_pxefile
Ian Jackson [Tue, 17 Jan 2017 17:31:15 +0000 (17:31 +0000)]
pxe templates: Do defaulting outside host_pxefile

host_pxefile now returns undef if the specified $templatekey is not
configured, rather than defaulting to the plain PxeTemplates.

This is going to useful because we want host_pxefile not to hardcode
the default: with netgrub, the settings are all different.

If $templatekey is 'PxeTemplates' then this only has any effect if the
PxeTempltes is not defined - ie, a broken case.

There is one place where $templatekey is not 'PxeTemplates', in
mg-hosts.  The defaulting to the value of PxeTemplates now occurs there.

So, overall, no functional change in non-broken cases.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agod-i grub: Extend UEFI workaround to stretch
Ian Jackson [Tue, 17 Jan 2017 15:16:17 +0000 (15:16 +0000)]
d-i grub: Extend UEFI workaround to stretch

Debian bug #789798 remains open.  I have pinged the blocking bug in
grub2, #792547.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agod-i: Cope if .ssh already exists (in /target/root/ and also /home/...)
Ian Jackson [Tue, 17 Jan 2017 15:13:40 +0000 (15:13 +0000)]
d-i: Cope if .ssh already exists (in /target/root/ and also /home/...)

Use mkdir -p in both cases.  Otherwise these late_commands may fail.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobackports handling: Cope with dtbs in subdirs
Ian Jackson [Tue, 17 Jan 2017 15:29:31 +0000 (15:29 +0000)]
backports handling: Cope with dtbs in subdirs

Some of the arm64 kernels have backports in subdirectories.  So use a
find rune instead of a plain mv.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobackports handling: Make backports initramfs-tools optional
Ian Jackson [Fri, 16 Dec 2016 18:22:42 +0000 (18:22 +0000)]
backports handling: Make backports initramfs-tools optional

If mg-debian-installer-update decided not to provide an initramfs.deb,
just skip that.

No functional change with earlier d-i fetches produced by existing
versions of mg-debian-installer-update.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agobackports handling: Refactor kernel deb handling
Ian Jackson [Tue, 17 Jan 2017 15:08:21 +0000 (15:08 +0000)]
backports handling: Refactor kernel deb handling

Introduce private function $kdeb->().  No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agomg-debian-installer-update: backports: Provide crypto
Ian Jackson [Thu, 19 Jan 2017 19:49:00 +0000 (19:49 +0000)]
mg-debian-installer-update: backports: Provide crypto

Filesystem drivers now refer to this.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-debian-installer-update: backports: Add modules for EFI
Ian Jackson [Thu, 19 Jan 2017 19:48:19 +0000 (19:48 +0000)]
mg-debian-installer-update: backports: Add modules for EFI

UEFI uses vfat for the boot partiton.
This also means we need some charset modules.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-debian-installer-update: backports: Provide pps and ptp
Ian Jackson [Tue, 17 Jan 2017 15:02:09 +0000 (15:02 +0000)]
mg-debian-installer-update: backports: Provide pps and ptp

Our ARM64 softiron boxes need these to find their network and disks.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-debian-installer-update: Log our version into our output
Ian Jackson [Thu, 19 Jan 2017 19:47:16 +0000 (19:47 +0000)]
mg-debian-installer-update: Log our version into our output

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agomg-debian-installer-update: Print working directory to stderr
Ian Jackson [Tue, 17 Jan 2017 15:01:59 +0000 (15:01 +0000)]
mg-debian-installer-update: Print working directory to stderr

No other change

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agomg-debian-installer-update: Break out default setting of src=
Ian Jackson [Wed, 4 Jan 2017 17:37:44 +0000 (17:37 +0000)]
mg-debian-installer-update: Break out default setting of src=

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-host-install: NTP not honoured bug remains
Ian Jackson [Wed, 4 Jan 2017 18:23:30 +0000 (18:23 +0000)]
ts-host-install: NTP not honoured bug remains

Debian #778564 remains open.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agots-host-install: Expect "pool" in ntp.conf, not only "server"
Ian Jackson [Wed, 4 Jan 2017 18:22:51 +0000 (18:22 +0000)]
ts-host-install: Expect "pool" in ntp.conf, not only "server"

This is helpful for playing around with stretch, which seems to use
this option by default.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agoSerial console: honour LinuxSerialConsole in bootloader setup
Ian Jackson [Tue, 3 Jan 2017 15:52:33 +0000 (15:52 +0000)]
Serial console: honour LinuxSerialConsole in bootloader setup

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
8 years agotimeouts: Honour TimeoutFactor host property
Ian Jackson [Fri, 20 Jan 2017 11:57:27 +0000 (11:57 +0000)]
timeouts: Honour TimeoutFactor host property

This gives us a single place to say that a host is particularly slow.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agotimeouts: Call target_adjust_timeout for all build commands
Ian Jackson [Fri, 20 Jan 2017 11:55:53 +0000 (11:55 +0000)]
timeouts: Call target_adjust_timeout for all build commands

Currently this has no real effect, because the only place where a
timeout factor is specified is nested L1s and we do not run build
commands on those.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agotimeouts: Refactor target_adjust_timeout to have $adjust->(), and log
Ian Jackson [Fri, 20 Jan 2017 11:54:34 +0000 (11:54 +0000)]
timeouts: Refactor target_adjust_timeout to have $adjust->(), and log

If a timeout is adjusted, print a log message.  We are going to want
to reuse this logic in a moment.

Do the defaulting in $adjust->() rather than passing 1 as a default
to the lookup functions, which is slightly neater.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
8 years agoproduction-config-*: Update TftpDiVersion_jessie
Ian Jackson [Mon, 16 Jan 2017 17:33:55 +0000 (17:33 +0000)]
production-config-*: Update TftpDiVersion_jessie

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