]> xenbits.xensource.com Git - people/aperard/osstest.git/log
people/aperard/osstest.git
7 years agoAdd missing sysvinit script to overlay-centos
Anthony PERARD [Tue, 9 Jan 2018 14:47:28 +0000 (14:47 +0000)]
Add missing sysvinit script to overlay-centos

only usefull for centos 6

7 years agomake-centos-flight: If branch name end with digit, add centos_release runvar
Anthony PERARD [Tue, 9 Jan 2018 14:38:36 +0000 (14:38 +0000)]
make-centos-flight: If branch name end with digit, add  centos_release runvar

7 years agomake-centos-flight: Information about defaults runvar
Anthony PERARD [Tue, 9 Jan 2018 14:37:56 +0000 (14:37 +0000)]
make-centos-flight: Information about defaults runvar

7 years agoremove not existing test based on test-centos
Anthony PERARD [Tue, 9 Jan 2018 14:37:30 +0000 (14:37 +0000)]
remove not existing test based on test-centos

7 years agomore runvars
Anthony PERARD [Fri, 5 Jan 2018 17:27:41 +0000 (17:27 +0000)]
more runvars

7 years agoTestSupport: With sysload, use short option of --load
Anthony PERARD [Wed, 3 Jan 2018 11:59:09 +0000 (11:59 +0000)]
TestSupport: With sysload, use short option of --load

The long option --load does not work on CentOS 6, but the short
one -p is working. Have check --help of sysctl on Debian.

7 years agoBetter handling of CentOS 6; CentOS 7 should be ok
Anthony PERARD [Tue, 19 Dec 2017 15:17:23 +0000 (15:17 +0000)]
Better handling of CentOS 6; CentOS 7 should be ok

7 years agoMore centos fixes (selinux + console=hvc0)
Anthony PERARD [Mon, 18 Dec 2017 18:48:18 +0000 (18:48 +0000)]
More centos fixes (selinux + console=hvc0)

7 years agokickstart and cmdline changes for CentOS 6
Anthony PERARD [Thu, 14 Dec 2017 15:41:45 +0000 (15:41 +0000)]
kickstart and cmdline changes for CentOS 6

7 years agochange for centos 6
Anthony PERARD [Wed, 13 Dec 2017 17:45:34 +0000 (17:45 +0000)]
change for centos 6

7 years agoinstall only centos-release-xen-common, instead of centos-release-xen
Anthony PERARD [Tue, 12 Dec 2017 17:18:17 +0000 (17:18 +0000)]
install only centos-release-xen-common, instead of centos-release-xen

That way, xen can only be installed via repo setup by osstest

7 years agofix Osstest.repo generation
Anthony PERARD [Tue, 12 Dec 2017 17:09:42 +0000 (17:09 +0000)]
fix Osstest.repo generation

7 years agoxen-pkg-install: repo url via runvar
Anthony PERARD [Tue, 12 Dec 2017 15:24:33 +0000 (15:24 +0000)]
xen-pkg-install: repo url via runvar

7 years agomg-centos-installer-update: To download kernel and initrd
Anthony PERARD [Wed, 6 Dec 2017 19:06:42 +0000 (19:06 +0000)]
mg-centos-installer-update: To download kernel and initrd

Also one would need to `mkdir centos-installer` in TftpPlayDir for the
script to work, this is the same behavior as with
mg-debian-installer-update.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoFIXUP ts-centos-host-install: Use config options for the location of the installer
Anthony PERARD [Thu, 7 Dec 2017 12:29:53 +0000 (12:29 +0000)]
FIXUP ts-centos-host-install: Use config options for the location of the installer

7 years agoCentOS: No need for mirrorlist, just use the basic one
Anthony PERARD [Thu, 7 Dec 2017 11:44:01 +0000 (11:44 +0000)]
CentOS: No need for mirrorlist, just use the basic one

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest: Introduce config options for CentOS
Anthony PERARD [Thu, 7 Dec 2017 12:29:02 +0000 (12:29 +0000)]
Osstest: Introduce config options for CentOS

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest/TestSupport: Handle qemu-img location on CentOS
Anthony PERARD [Wed, 22 Nov 2017 18:27:05 +0000 (18:27 +0000)]
Osstest/TestSupport: Handle qemu-img location on CentOS

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agomake-centos-flight: Create a flight with CentOS as dom0
Anthony PERARD [Tue, 21 Nov 2017 18:05:13 +0000 (18:05 +0000)]
make-centos-flight: Create a flight with CentOS as dom0

This is based on make-flight, with the added all_host_os=centos runvar,
and without test that can not be run.

Anything based on the recipe "test-debian" or "test-pair" is remove, as
they require xen-tools. There is no XSM tests as the CentOS packages is
built without. There is no build jobs as the Xen packages been tested
are built in the CentOS CBS.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agosg-run-job: Select host install script based on all_host_os runvar
Anthony PERARD [Tue, 14 Nov 2017 18:16:04 +0000 (18:16 +0000)]
sg-run-job: Select host install script based on all_host_os runvar

This also select a different xen installation script.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoWORKAROUND: Osstest/TestSupport: Make target_reboot works with systemd
Anthony PERARD [Wed, 15 Nov 2017 12:31:04 +0000 (12:31 +0000)]
WORKAROUND: Osstest/TestSupport: Make target_reboot works with systemd

On host running with systemd as init, doing `ssh host reboot` will
result in ssh returning an error.
This patch works around by not waiting for the reboot command to return.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agots-centos-xen-pkg-install: Create bridge config
Anthony PERARD [Fri, 24 Nov 2017 15:58:45 +0000 (15:58 +0000)]
ts-centos-xen-pkg-install: Create bridge config

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agots-centos-xen-pkg-install: Adjust daemons configuration
Anthony PERARD [Tue, 14 Nov 2017 17:00:57 +0000 (17:00 +0000)]
ts-centos-xen-pkg-install: Adjust daemons configuration

Ajust configuration of xenconsoled and libvirtd.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agots-centos-xen-pkg-install: Install of Xen package on CentOS
Anthony PERARD [Tue, 14 Nov 2017 15:56:01 +0000 (15:56 +0000)]
ts-centos-xen-pkg-install: Install of Xen package on CentOS

Install candidate packages that have been built by CBS, the CentOS
Community Build Service.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoCentOS: Setup osstest-confirm-booted.service
Anthony PERARD [Wed, 15 Nov 2017 15:18:46 +0000 (15:18 +0000)]
CentOS: Setup osstest-confirm-booted.service

This emulate the osstest-confirm-booted service that is done on Debian.

In order to have the service been started last:
- it is made dependent on multi-user.target which is the default target on systemd.
- it is part of osstest.target which depend on multi-user.target.
- the osstest.target is set as the new default.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agots-centos-host-install: Install CentOS on a host
Anthony PERARD [Fri, 1 Dec 2017 16:17:25 +0000 (16:17 +0000)]
ts-centos-host-install: Install CentOS on a host

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest/CentOS: kickstart_create to generate an autoinstall recipe
Anthony PERARD [Fri, 1 Dec 2017 15:50:09 +0000 (15:50 +0000)]
Osstest/CentOS: kickstart_create to generate an autoinstall recipe

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest/CentOS.pm: Introduce CentOS support, starting with kickstart_installcmdline_core
Anthony PERARD [Fri, 1 Dec 2017 15:39:03 +0000 (15:39 +0000)]
Osstest/CentOS.pm: Introduce CentOS support, starting with kickstart_installcmdline_core

This function will be use later to install CentOS on a host.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoTestSupport: Adapt target_https_mitm_proxy_setup to CentOS
Anthony PERARD [Thu, 30 Nov 2017 18:24:54 +0000 (18:24 +0000)]
TestSupport: Adapt target_https_mitm_proxy_setup to CentOS

The location for new certificates is different, and
update-ca-certificates is Debian specific.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoTestSupport: In host_install_postboot, don't call update-rc.d on CentOS
Anthony PERARD [Thu, 30 Nov 2017 18:07:18 +0000 (18:07 +0000)]
TestSupport: In host_install_postboot, don't call update-rc.d on CentOS

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest/TestSupport: Add centos to package_install_cmd
Anthony PERARD [Fri, 24 Nov 2017 13:00:05 +0000 (13:00 +0000)]
Osstest/TestSupport: Add centos to package_install_cmd

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
7 years agoOsstest/TestSupport: In teditfileex, get the file with the requested user
Anthony PERARD [Wed, 15 Nov 2017 18:35:07 +0000 (18:35 +0000)]
Osstest/TestSupport: In teditfileex, get the file with the requested user

e.g. If the file to be edited is only accessible to the root user,
target_getfile() would not work.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoJobDB-Standalone.tcl: Fix read-runvar
Anthony PERARD [Wed, 15 Nov 2017 18:56:01 +0000 (18:56 +0000)]
JobDB-Standalone.tcl: Fix read-runvar

This fix the error bellow, when the runvar exist:
can't read "runvarinfo()": no such element in array
    while executing
"set val $runvarinfo($val)"
    invoked from within
"osstestdb eval {
        SELECT val FROM runvars
         WHERE flight = $flight
           AND job = $job
           AND name = $name
    } runvarinfo {
        se..."
    (procedure "jobdb::read-runvar" line 3)
    invoked from within
"jobdb::read-runvar $flight $job all_host_os"
    (procedure "run-job" line 13)
    invoked from within
"run-job $job"
    (file "./sg-run-job" line 767)

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets
Roger Pau Monne [Thu, 30 Nov 2017 09:14:17 +0000 (09:14 +0000)]
osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

Due to a recent FreeBSD change the default output directory of the release
targets is changed to the object directory instead of the source
directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is
harmless if used with previous versions, it will be ignored.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
7 years agoosstest: expand the list of tested disk controllers
Roger Pau Monne [Fri, 10 Nov 2017 09:46:26 +0000 (09:46 +0000)]
osstest: expand the list of tested disk controllers

The Mass osstest instance has a more diverse list of hardware disk
controllers, so expand the list in order to include all the possible
disk drivers.

For the record, this list can be found at:

usr.sbin/bsdconfig/share/device.subr

In the FreeBSD source tree.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
7 years agoosstest: remove the loader timeout from the install image
Roger Pau Monne [Wed, 8 Nov 2017 14:53:34 +0000 (14:53 +0000)]
osstest: remove the loader timeout from the install image

When the FreeBSD installer is booted on the godello{0/1} boxes it
receives spurious key strokes. This doesn't happen so far when booted
from disk, or with any other boxes.

In order to cope with this remove the loader timeout on the install
image. Note that failure to boot will still drop the loader into a
manual prompt.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
7 years agoosstest: hook FreeBSD flight into cr-daily-branch
Roger Pau Monne [Wed, 8 Nov 2017 14:50:04 +0000 (14:50 +0000)]
osstest: hook FreeBSD flight into cr-daily-branch

Add the missing pieces so that cr-daily-branch knows how to create a
FreeBSD flight. This has been tested by calling `./cr-daily-branch
freebsd-master`.

Note that there are two missing pieces. The first one is correctly
setting the FREEBSD_<arch>_BUILDJOB environment variable when calling
make-freebsd-flight, without it the installer media will always be
picked from the configuration file. This requires keeping track of
previous FreeBSD successful build jobs, marking them as permanent and
fetching them from the database in order to pass them on the env
variable.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v8.1:  fix ap-fetch-version-old for the freebsd-* branch
       (The remote branch has been changed to tested/master or
       tested/stable/<version> instead of plain master or stable/11.)

Changes since v6:
 - Set the path to the FreeBSD git trees in this patch.
 - Push to tested/master or tested/stable/<version> instead of using
   the same branches as the origin tree.

Changes since v5:
 - Add support for testing multiple FreeBSD branches, default to
   branch master.

Changes since v3:
 - Fix the daily-cron-email-* settings for FreeBSD branch flights.

7 years agoosstest: introduce a script to create a FreeBSD flight
Roger Pau Monne [Wed, 8 Nov 2017 14:50:03 +0000 (14:50 +0000)]
osstest: introduce a script to create a FreeBSD flight

The logic to create a FreeBSD build job is added to
make-freebsd-flight. This includes creating a FreeBSD build job, and
also testing the output of that build job (by creating another build
job that depends on the output of the first).

Note that the FreeBSD build job needs some input in order to setup a
FreeBSD host, and that can be fetched from different places:

1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a
previous build-<arch>-freebsd job.

2. Env variables FREEBSD_DIST and FREEBSD_VERSION: set before calling
into make-flight, provide the path to the installer image and sets
folder and the version being installed.

3. Config file FreeBSDDist and FreeBSDVersion: same as 2. except that
they are set on the config file.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v6:
 - Re-wrap lines.
 - Remove the freebsd hostflag.
 - Do not set the FreeBSD git trees in this patch.
 - Set all_host_os runvar to freebsd for the FreeBSD build jobs.

Changes since v5:
 - Append the "freebsd" hostflag, the specific version will be set
   dynamically by the ts-freebsd-set-hostflags script.
 - Use FREEBSD_<arch>_BUILDJOB to set the freebsdbuildjob runvar.
 - Loop around arches, although only amd64 is supported ATM. This
   should make it easier to add more arches later on.
 - Expand README comment to describe the expected layout of the
   FreeBSD install media.

Changes since v4:
 - Convert get_freebsdjob_runvars into set_freebsd_runvars, mimic the
   behavior of set_hostos_runvars.

Changes since v3:
 - Split the sg-run-job code into pre-patches.

Changes since v1:
 - Replace freebsd_buildjob with freebsdbuildjob.
 - Replace FREEBSD_SETS/IMAGE with a single FREEBSD_DIST that points
   to a folder that should contain both things.
 - Document the FreeBSDDist and FreeBSDVersion config file options in
   the README file.

7 years agoosstest: add support for FreeBSD buildjobs to sg-run-job
Roger Pau Monne [Wed, 8 Nov 2017 14:50:02 +0000 (14:50 +0000)]
osstest: add support for FreeBSD buildjobs to sg-run-job

Add support and introduce a FreeBSD build job to sg-run-job.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Add a '+' to the arguments passed to ts-freebsd-set-hostflags, so
   they are hidden from testid.

Changes since v4:
 - Use a switch in allocate-build-host.

Changes since v3:
 - New in this version (split from existing patch).

7 years agoosstest: change the meaning of need_build_host
Roger Pau Monne [Wed, 8 Nov 2017 14:50:02 +0000 (14:50 +0000)]
osstest: change the meaning of need_build_host

Make need_build_host store a string instead of a boolean. This is
later going to be expanded to handle the FreeBSD build jobs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Use a regsub to set need_build_host.
 - NB: I would prefer to keep the tolower instead of changing the
   procs to -FREEBSD/-LINUX since I don't really like the SHOUTING.

Changes since v4:
 - Fix the usage of the catching-otherwise blocks.

Changes since v3:
 - New in this version (split from patch).

7 years agoosstest: add script to install build dependencies on FreeBSD
Roger Pau Monne [Wed, 8 Nov 2017 14:50:01 +0000 (14:50 +0000)]
osstest: add script to install build dependencies on FreeBSD

Since at the moment osstest only builds FreeBSD on FreeBSD, there are
no dependencies to install. Just mark the host as ready to share.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: introduce a script to set the runtime hostflags runvar for FreeBSD jobs
Roger Pau Monne [Wed, 8 Nov 2017 14:50:00 +0000 (14:50 +0000)]
osstest: introduce a script to set the runtime hostflags runvar for FreeBSD jobs

Due to the nature of the FreeBSD install media, which is
self-generated from the ts-freebsd-build script, the hostflags runvar
set to FreeBSD jobs are related to the current version under test.

The following hostflags might need to be fetched from the runvars of a
previous build-$arch-freebsd job:

 - share-build-freebsd-$arch-$hash: the $hash used here is calculated
   from the checksum of the installer image used by this specific job.
   This allows osstest to share FreeBSD build hosts, and be sure the
   exact desired FreeBSD version is used.
 - PropMinVer:Freebsd:$version: $version contains the major FreeBSD
   version under test. This version is obtained from the FreeBSD
   source code used to create the install media.

Note that the share-build-* hostflag is optional, and will only be set
for build jobs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Fetch the host idents from the arguments, instead of assuming
   "host" always.
 - Set PropMinVer:Freebsd:<version> instead of freebsd-<version> to
   better cope with FreeBSD version bumps. This should only happen
   every ~2 years.

Changes since v4:
 - Make the share-build- flag optional.

Changes since v3:
 - Make use of the set_runtime_hostflag helper.
 - Make use of the sha256file helper.

Changes since v2:
 - New in this version.

7 years agoosstest: add support for runtime_IDENT_hostflags
Roger Pau Monne [Wed, 8 Nov 2017 14:49:59 +0000 (14:49 +0000)]
osstest: add support for runtime_IDENT_hostflags

This is required for FreeBSD, that will need to set some of the
hostflags at runtime. The current IDENT_hostflags will be keep as-is,
and they should only be set at job creation time.

Also introduce a helper to set the runtime hostflags.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - Allow runtime flags to be appended instead of overwritten.

Changes since v3:
 - New in this version.

7 years agoosstest: introduce a FreeBSD build script
Roger Pau Monne [Wed, 8 Nov 2017 14:49:59 +0000 (14:49 +0000)]
osstest: introduce a FreeBSD build script

In order to generate the FreeBSD installer image and the install
media.

The install sets are the vanilla ones generated by the 'ftp' release
target.  The installer image is handcrafted based on the filesystem
created by the 'bootonly' target, which is then populated with the ssh
host keys, and setup in order to use the serial console. The other
difference from upstream FreeBSD installer images is that the one
built by osstest uses a ramdisk instead of relying on the installer
media to be somehow attached, either on a CD or USB drive. This is
required in order to boot the image from pxelinux (where no CD or USB
is actually attached to the host, and everything is fetched from
tftp).

Due to the nature of the FreeBSD build, the outputs are different from
what osstest expects from a buildjob, more specifically
path_freebsddist points to a folder that contains the several outputs
form this buildjob.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - Remove some useless comments.
 - Use qw(git) instead of 'git'.
 - Replace unicode nonbreaking space.
 - Remove trail ','.
 - Improve the way to fetch the version number.

Changes since v3:
 - Introduce two helpers to perform the build process.
 - Install packages using target_install_packages.

Changes since v2:
 - Increase build target timeouts.
 - Use sysrc instead echo to set rc.conf options.

Changes since v1:
 - Remove the ts-build-check FreeBSD hack.
 - Use pkg-static instead of pkg.
 - Introduce buildcmd_stamped_logged_root and target_cmd_build_root.
 - Use target_cmd_build_root and buildcmd_stamped_logged_root in the
   ts-freebsd-build script.
 - Fix the script snippets to use <<END.<<'END' in order to avoid
   escaping the shell variables.
 - Set path_freebsddist runvar to point to the folder where the build
   files are stashed.
 - Add a comment at the top of the file describing what runvars are
   consumed/produced by the build script.

7 years agoosstest: add support for the FreeBSD package manager
Roger Pau Monne [Wed, 8 Nov 2017 14:49:58 +0000 (14:49 +0000)]
osstest: add support for the FreeBSD package manager

FreeBSD support is added to target_install_packages and
target_install_packages_norec, although there's no equivalent to the
--no-install-recommends in the FreeBSD package manager.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v6:
 - Use $ho->{Os} in order to detect the target OS.

Changes since v5:
 - Add prototype for package_install_cmd.
 - Use $ho->{Ident} instead of hardcoding "host" in get_hostflags.

Changes since v4:
 - Unify more code between FreeBSD and Debian: introduce an
   OS-agnostic package_install_cmd to generate the install cmd.

Changes since v3:
 - New in this version.

7 years agoosstest: introduce an OS $ho field
Roger Pau Monne [Wed, 8 Nov 2017 14:49:57 +0000 (14:49 +0000)]
osstest: introduce an OS $ho field

In order to differentiate between FreeBSD and Debian hosts.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v7:
 - s/Os/OS/.

Changes since v6:
 - New in this version

7 years agoosstest: add prototypes to target_install_packages{_norec}
Roger Pau Monne [Wed, 8 Nov 2017 14:49:56 +0000 (14:49 +0000)]
osstest: add prototypes to target_install_packages{_norec}

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - New in this version.

7 years agoosstest: introduce build helpers for FreeBSD
Roger Pau Monne [Wed, 8 Nov 2017 14:49:55 +0000 (14:49 +0000)]
osstest: introduce build helpers for FreeBSD

Some steps of the FreeBSD build process need to be done as root, so
introduce some helpers to perform those steps:
buildcmd_stamped_logged_root and target_cmd_build_root. They behave
exactly the same as the non-root counterparts.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v3:
 - New in this version.

7 years agoosstest: introduce host_shared_mark_ready
Roger Pau Monne [Wed, 8 Nov 2017 14:49:55 +0000 (14:49 +0000)]
osstest: introduce host_shared_mark_ready

That allows marking a host as ready to be shared. Replace the current
callers that open-code it.

This commit also fixes a bug where Ident was used instead of 'host' as
resource.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - New in this version.

7 years agoosstest: add executive prefix to resource_shared_mark_ready
Roger Pau Monne [Wed, 8 Nov 2017 14:49:54 +0000 (14:49 +0000)]
osstest: add executive prefix to resource_shared_mark_ready

This is a non-functional change in preparation for introducing a
resource_shared_mark_ready in TestSupport.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - New in this version.

7 years agoosstest: move known_hosts generation to TestSupport
Roger Pau Monne [Wed, 8 Nov 2017 14:49:53 +0000 (14:49 +0000)]
osstest: move known_hosts generation to TestSupport

This is equivalent to the already existing authorized_keys function,
and generates the contents of the known_hosts file that should be
installed on targets.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: make built_stash_file store a path_ runvar for each file
Roger Pau Monne [Wed, 8 Nov 2017 14:49:52 +0000 (14:49 +0000)]
osstest: make built_stash_file store a path_ runvar for each file

And introduce built_stash_debugfile in order the keep the previous
behavior of built_stash_file.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosmoke tests: Fix job reuse globs in cr-daily-branch
Ian Jackson [Thu, 14 Dec 2017 16:28:21 +0000 (16:28 +0000)]
smoke tests: Fix job reuse globs in cr-daily-branch

A symptom that the old patterns lack !build-arm64-xsm, so the xsm job
might be reused.  The overall cause is that it contained a (partial)
list of architectures.

Instead, we observe that:
 * The things we want to avoid reusing are Xen and libvirt (which
   builds against Xen.
 * Non-Xen builds are invariably build-<arch>-<thing> (or even longer)
   so we can match them all with build-*-*.
 * We need to exclude the Xen builds and the libvirt builds.  The
   libvirt builds are obvious.  The Xen builds are either build-<arch>
   which does not match build-*-*, or build-<arch>-xsm.

CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosmoke tests: Build arm64 with XSM, instead of without
Ian Jackson [Thu, 14 Dec 2017 16:03:44 +0000 (16:03 +0000)]
smoke tests: Build arm64 with XSM, instead of without

The smoke flight contains test-arm64-arm64-xl-xsm so it should contain
build-arm64-xsm (and not contain build-arm64).

I have checked the results with
  OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
and looking at the diff shows precisely the expected change.

CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config: Update jessie amd64 kernel for NUMA bugfix
Ian Jackson [Thu, 14 Dec 2017 16:15:51 +0000 (16:15 +0000)]
production-config: Update jessie amd64 kernel for NUMA bugfix

Bump TftpDiVersion_jessie.  This installer was generated by me today,
with the git branch including the di_special_kernel series, using this
rune:

 OSSTEST_SPECIALKERNELDEB_jessie_amd64=$PWD/linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb ./mg-debian-installer-update-all

The file linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb
came from here

 https://people.debian.org/~benh/packages/jessie-pu/linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb

apropos of this comment in the Debian bug report:

 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883938#170

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-debian-installer-update: Honour OSSTEST_SPECIALKERNELDEB_<suite>_<arch>
Ian Jackson [Thu, 14 Dec 2017 15:40:22 +0000 (15:40 +0000)]
mg-debian-installer-update: Honour OSSTEST_SPECIALKERNELDEB_<suite>_<arch>

This variable can be set to the absolute pathname of a kernel .deb to
use.  It will be used only for hosts for which the corresponding
hostflag "need-kernel-deb-<suite>-special" is set.

There is not currently any facility for more than one special kernel
for each architecture.

As with backports kernels, the normal (Debian-supplied) kernel is
available too, and is used for hosts without any special hostflag.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-debian-installer-update: Introduce $specialkernel
Ian Jackson [Thu, 14 Dec 2017 15:37:25 +0000 (15:37 +0000)]
mg-debian-installer-update: Introduce $specialkernel

* In the first half of the backports kernel processing, set
  the new variable specialkernel to the string "backports".
  (This token occurs in the output .deb and kernel name, and
  is also referenced by hostflags of the form
     need-kernel-deb-<suite>-backports.)

* Break out the second half of the backports procesing into its
  own section, conditional on $specialkernel.

* Replace occurrences of the "backports" token, after that point,
  with $specialkernel.

Overall, this will allow other kinds of special kernel to be
introduced.  But there is, for now, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agodi_special_kernel: Use in preseed_create
Ian Jackson [Thu, 14 Dec 2017 12:28:08 +0000 (12:28 +0000)]
di_special_kernel: Use in preseed_create

This abolishes yet another open-coding of need-kernel-deb-* handling.

Again, there is little functional change.  A significant change is
that now if the special kernel deb does not exist, we do not fail.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Provide $tp; Regularise $kernel, $cpio
Ian Jackson [Thu, 14 Dec 2017 15:52:07 +0000 (15:52 +0000)]
di_special_kernel: Provide $tp; Regularise $kernel, $cpio

Make both of these paths relative to $ho->{Tftp}{Path}.  Previously
$kernel was relative to that, but $cpio contained it.

Adjust all callers, so no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Use di_installer_path
Ian Jackson [Thu, 14 Dec 2017 13:09:52 +0000 (13:09 +0000)]
di_special_kernel: Use di_installer_path

This avoids the caller having to supply $d_i.  This is good because
there is a site we want to call this from which uses that name for a
different value!

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_installer_path: Use in ts-host-install
Ian Jackson [Thu, 14 Dec 2017 13:07:02 +0000 (13:07 +0000)]
di_installer_path: Use in ts-host-install

No significant functional change.  We now honour cfg_tftp_di_version
if the $ho doesn't have the information.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_installer_path: Break out of preseed_create
Ian Jackson [Thu, 14 Dec 2017 13:04:31 +0000 (13:04 +0000)]
di_installer_path: Break out of preseed_create

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Replace open-coding in ts-host-install
Ian Jackson [Thu, 14 Dec 2017 12:23:24 +0000 (12:23 +0000)]
di_special_kernel: Replace open-coding in ts-host-install

The effect is simply to reuse the loop in di_special_kernel.  The
extra tests etc. to compute $k and $c in di_special_kernel are of no
import here, and are harmless.  We have already called
di_special_kernel so if it was going to fail due to this extra
computation, it would do so earlier.

No overall functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Pass $kp to $fn
Ian Jackson [Thu, 14 Dec 2017 12:23:12 +0000 (12:23 +0000)]
di_special_kernel: Pass $kp to $fn

Adjust the one current caller.  No functional change

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoDebian: Factor out di_special_kernel from ts-host-install
Ian Jackson [Thu, 14 Dec 2017 12:09:53 +0000 (12:09 +0000)]
Debian: Factor out di_special_kernel from ts-host-install

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agocrontab: Fix recipient of cron mails
Ian Jackson [Wed, 13 Dec 2017 17:04:19 +0000 (17:04 +0000)]
crontab: Fix recipient of cron mails

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config[-cambridge]: update TftpDiVersion_jessie
Ian Jackson [Mon, 11 Dec 2017 15:55:39 +0000 (15:55 +0000)]
production-config[-cambridge]: update TftpDiVersion_jessie

Debian has done a point release.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agolinux-arm-xen: Get from shared arm/linux.git xenbits tree
Ian Jackson [Tue, 5 Dec 2017 18:27:17 +0000 (18:27 +0000)]
linux-arm-xen: Get from shared arm/linux.git xenbits tree

This drops the dependency on Stefano's personal git tree.
The osstest output branch remains unmoved.

Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-report-host-history: make link to host examination results
Ian Jackson [Tue, 5 Dec 2017 17:24:04 +0000 (17:24 +0000)]
sg-report-host-history: make link to host examination results

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME.dev: Say how to do a commissioning flight for a new architecture
Ian Jackson [Tue, 5 Dec 2017 16:01:17 +0000 (16:01 +0000)]
README.dev: Say how to do a commissioning flight for a new architecture

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoRevert "make-flight etc.: drop arm64"
Ian Jackson [Thu, 30 Nov 2017 17:11:10 +0000 (17:11 +0000)]
Revert "make-flight etc.: drop arm64"

We have the laxtons back and they seem to be working.

This reverts commit 329ef52c9866b2a8608a598836b7d5813de1e979.

Acked-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-hosts: mknetbootdir: Correctly use Path again
Ian Jackson [Thu, 30 Nov 2017 17:40:13 +0000 (17:40 +0000)]
mg-hosts: mknetbootdir: Correctly use Path again

In fcd93edd00a8c9b08da3994d8bee9fa3809c3d93
  "netboot: Rework interface to host_netboot_file (was host_pxefile)"
we unintentionally dropped $ho->{Tftp}{Path} from the
effective path.  Reinstate it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-hosts: mknetbootdir: Add a couple of error checks
Ian Jackson [Thu, 30 Nov 2017 17:39:13 +0000 (17:39 +0000)]
mg-hosts: mknetbootdir: Add a couple of error checks

This will help us stop blundering on if something is wrong.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoproduction-config: Increase LogsMinSpaceMby etc.
Ian Jackson [Tue, 5 Dec 2017 11:47:53 +0000 (11:47 +0000)]
production-config: Increase LogsMinSpaceMby etc.

osstest does not currently try to estimate the prospective disk use in
logs/ etc. of a flight before it starts; nor does it aggregate the
disk requirements of multiple concurrent flights.

Instead, it has a hardcoded minimum, which is enforced (by expiry) at
the start of each flight.  It must be large enough for all in-progress
flights.  This turns out not to be true any more, because of expansion
of both the number of different osstest branches, and because of
expansion of the number of jobs per flight, and because of expansion
of the activities within each job.

So, well, let's double it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoBranch for Xen 4.9
Ian Jackson [Fri, 1 Dec 2017 14:52:52 +0000 (14:52 +0000)]
Branch for Xen 4.9

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME: Do not recommend cs-flight-create
Ian Jackson [Fri, 1 Dec 2017 11:13:39 +0000 (11:13 +0000)]
README: Do not recommend cs-flight-create

This is not a normal way to carry on.  Far too much like hard work.
Recommend make-flight or cs-adjust-flight new: instead.

CC: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocs-adjust-flight: Correct pseudo-BNF synopsys for runvar-build-set
Ian Jackson [Fri, 1 Dec 2017 11:11:38 +0000 (11:11 +0000)]
cs-adjust-flight: Correct pseudo-BNF synopsys for runvar-build-set

In 497b2c6c933d13a05b01c6a654ce470be16dd78a
  cs-adjust-flight: Rework runvar-build-set new value handling
the interpretation of this parameter was changed completely, but the
synopsis was not updated and thus became wrong.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-xen-build-prep: Install libelf-dev for benefit of linux.git
Ian Jackson [Wed, 15 Nov 2017 11:00:07 +0000 (11:00 +0000)]
ts-xen-build-prep: Install libelf-dev for benefit of linux.git

Linux upstream has started needing libelf-dev.  Without it, recent tip
fails (in our configuration) like this:

 Makefile:938: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.

This is because kernel now is using objtool to create unwind
information.  This needs libelf to work.  Advantage is that this
approach no longer depends on assembler sources being heavily
annotated with unwind hints.

CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: Juergen Gross <jgross@suse.com>
CC: Paul Durrant <paul.durrant@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
7 years agomg-force-push: Fix typo
Ian Jackson [Wed, 8 Nov 2017 16:01:06 +0000 (16:01 +0000)]
mg-force-push: Fix typo

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoosstest: fix rm to use '-f' in ts-freebsd-host-install
Roger Pau Monne [Fri, 3 Nov 2017 15:18:05 +0000 (15:18 +0000)]
osstest: fix rm to use '-f' in ts-freebsd-host-install

It's perfectly valid for the .tmp file to not exists, and the script
shouldn't fail in that case.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoap-push: turn off set -x
Ian Jackson [Mon, 6 Nov 2017 16:28:21 +0000 (16:28 +0000)]
ap-push: turn off set -x

This makes the output of mg-force-push quite unpleasant, amongst other
things.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-force-push: New script
Ian Jackson [Mon, 6 Nov 2017 16:24:58 +0000 (16:24 +0000)]
mg-force-push: New script

This does some safety checks and reduces the risk of c&p mistakes.
It has to be run as osstest@osstest.test-lab (or equivalent).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomigrations: Do x10 migration 20x instead
Ian Jackson [Fri, 3 Nov 2017 12:49:37 +0000 (12:49 +0000)]
migrations: Do x10 migration 20x instead

We want to keep the old testid or some new failures will be "never
pass".

Roger reports that this change makes the existing host-specific
Windows migration failures fail everywhere, so so things may need
force pushing.

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocrontab: do bisect the smoke tests
Ian Jackson [Fri, 3 Nov 2017 12:08:06 +0000 (12:08 +0000)]
crontab: do bisect the smoke tests

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoosstest: set arch before calling set_freebsd_runvars
Roger Pau Monne [Thu, 26 Oct 2017 15:21:03 +0000 (15:21 +0000)]
osstest: set arch before calling set_freebsd_runvars

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
7 years agoosstest: Add freebsd runvars to examine job in generic flights
Roger Pau Monne [Wed, 25 Oct 2017 10:30:24 +0000 (11:30 +0100)]
osstest: Add freebsd runvars to examine job in generic flights

Previous patches only added the FreeBSD runvars to the jobs in the
examine flight, but failed to also add them to the examine job in the
generic flight.

This is necessary because the examine jobs now contain a step which
uses freebsd - the memdisk append determination.

On installations without an anointed freebsd job, and with no
freebsd-related config settings, that step will simply and harmlessly
fail.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-run-job: hook the memdisk test into examine
Roger Pau Monne [Fri, 28 Jul 2017 15:08:32 +0000 (16:08 +0100)]
sg-run-job: hook the memdisk test into examine

Hook the memdisk parameter detection and the saving of the host
properties into the examine jobs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Do not pass a host ident to ts-examine-hostprops-save.
 - Use .- for ts-memdisk-try-append so that the rest of the job will
   run even if this step fails.

Changes since v1:
 - Run the memdisk test first (so that we don't leave the host in a
   weird state).
 - Pass a host to the examine-hostprops-save.

7 years agomake-hosts-flight: set runvars for FreeBSD test
Roger Pau Monne [Fri, 28 Jul 2017 15:07:16 +0000 (16:07 +0100)]
make-hosts-flight: set runvars for FreeBSD test

This is needed in order to run the memdisk test.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-examine-hostprops-save: introduce a script to save properties
Roger Pau Monne [Fri, 28 Jul 2017 15:10:44 +0000 (16:10 +0100)]
ts-examine-hostprops-save: introduce a script to save properties

This script turns the properties stored in the runvars using the
format hostprop/$ident/$prop=$val into host properties stored in the
database.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v12:
 - Introduce a dry_run variable and print a message only once if not
   saving the properties in the database.

Changes since v2:
 - Call selecthost based on the idents passed in the putative
   hostprops runvar.
 - Fix commit message.
 - Use '/' instead of '_' in the runvars.
 - Do a dry run if flight blessing != real.
 - Fix parentheses indentation.

Changes since v1:
 - Select a host for setting the properties.
 - Print a message before exiting if blessing != real.
 - Skip properties that don't contain the selected host.

7 years agots-memdisk-try-append: introduce a script to test memdisk options
Roger Pau Monne [Fri, 28 Jul 2017 15:05:18 +0000 (16:05 +0100)]
ts-memdisk-try-append: introduce a script to test memdisk options

The intended usage is to run this script against every host in order
to record the possible needed memdisk flags.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v12:
 - Add hyphens to the boot test options.

Changes since v1:
 - Get the arch of the job and exit with 0 if it's not supported.
 - Pass the --recordappend argument to ts-memdisk-try-append.

7 years agots-freebsd-host-install: add arguments to test memdisk append options
Roger Pau Monne [Fri, 28 Jul 2017 15:02:59 +0000 (16:02 +0100)]
ts-freebsd-host-install: add arguments to test memdisk append options

This is needed in order to figure out which memdisk options should be
used to boot the images on each specific box.

Note that when passed the --record-append argument upon success the
script stores the tentative host property in the runvars.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v12:
 - Add hyphens between words in command line options.
 - Die if --record-append is specified without --test-boot.

Changes since v2:
 - Fix commit message.

Changes since v1:
 - Provide a --recordappend argument to force the recording the
   memdisk parameters.
 - Exit gracefully if a bootonly test is attempted against a
   non-supported architecture.
 - Use NONE instead of an empty string when calling
   setup_netboot_memdisk if nothing should be appended.
 - Do not perform any arch test in ts-freebsd-host-install.

7 years agoTestSupport: introduce hostprop_putative_record
Roger Pau Monne [Fri, 28 Jul 2017 14:59:41 +0000 (15:59 +0100)]
TestSupport: introduce hostprop_putative_record

This is used to store tentative host properties in the runvars of a
job, with the expectation that at some point (ie: at the end of the
job) they will be turned into real properties stored in the database.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Use the following runvar format to store the putative host props:
   hostprop/$ident/$prop=$val.

7 years agonetboot_memdisk: allow each host to have different append values
Roger Pau Monne [Mon, 23 Oct 2017 11:41:16 +0000 (12:41 +0100)]
netboot_memdisk: allow each host to have different append values

Some hosts require "append raw" [0] when booting with memdisk, while
others don't. This is based on the hardware/BIOS, and needs to be set
on a per-host basis.

In order to do this, add a new "MemdiskAppend" host property and make
use of it in the setup_netboot_memdisk helper.

[0] http://www.syslinux.org/wiki/index.php?title=MEMDISK#Memory_access_method

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Explicitly use NONE for no options set (instead of an empty string,
   which is the default).
 - Allow to manually pass append parameters.

7 years agomfi-common: introduce set_freebsd_runvars to mfi-common
Roger Pau Monne [Mon, 23 Oct 2017 09:57:00 +0000 (10:57 +0100)]
mfi-common: introduce set_freebsd_runvars to mfi-common

So that it can also be used by make-hosts-flight.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoHostDB: introduce set_property
Roger Pau Monne [Mon, 23 Oct 2017 09:57:00 +0000 (10:57 +0100)]
HostDB: introduce set_property

And provide a helper in TestSupport to use it. This allows osstest to
set host properties from test script themselves (instead of using
the mg-hosts clu).

Note that the setting of host properties is limited to flights with
intended blessing real, and it will fail for any other blessing.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v12:
 - Use intended blessing in the error message.

Changes since v2:
 - Die if attempting to modify a host prop with intended blessing !=
   real.

7 years agosg-run-job: fix typo in the examine jobs
Roger Pau Monne [Mon, 23 Oct 2017 09:56:59 +0000 (10:56 +0100)]
sg-run-job: fix typo in the examine jobs

proc prep-job/host-examine-xen is declared twice, one of them should
be prep-job/host-examine-linux instead.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: save/retrieve the last successfully tested FreeBSD build
Roger Pau Monne [Mon, 23 Oct 2017 13:13:30 +0000 (14:13 +0100)]
osstest: save/retrieve the last successfully tested FreeBSD build

And use it in order to install the hosts for the next FreeBSD flight.

Note that the anoints are done after the push, but there's a recovery
mechanism in case osstest manages to do a successful push, but the
artifacts are not anointed for some reason. Osstest will continue to
create flights until the revision of the anointed artifacts matches
the one pushed to the repository (even if that means running flights
with OLD_REVISION == NEW_REVISION).

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v7:
 - Add space between $freebsd_branch and * in list-prepared.

Changes since v6:
 - Use just the branch name for anoint (instead of freebsd-$branch).
 - Force the creation of flights if the revision of the current
   anoints don't match OLD_VERSION.
 - Iterate over the list of current anoints instead of open-coding the
   arches.
 - Split the retrieve/anoint code blocks into it's own sections.

Changes since v5:
 - New in this version.

7 years agoosstest: add a FreeBSD host install script
Roger Pau Monne [Mon, 23 Oct 2017 13:03:21 +0000 (14:03 +0100)]
osstest: add a FreeBSD host install script

The installation is performed using the bsdinstall tool, which is part
of the FreeBSD base system. The installer image is setup with the
osstest ssh keys and sshd enabled by default, which allows the test
harness to just ssh into the box, create the install config file and
launch the scripted install.

Currently the installation is done with ZFS only, in stripe mode, and
a single disk.

In order to support the FreeBSD installer the setup_netboot_memdisk
helper is used, that allows setting the pxe boot of a host using a
memdisk.

The install script either picks the binary images from the output of a
previous FreeBSD buildjob (yet to be introduced), or from the folder
pointed by freebsd_distpath. This folder should contain the installer
image (install.img) and the compressed install sets (kernel.txz,
base.txz) together with the MANIFEST file that contains the checksums.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - Remove get_sets_path routine and xopts variable.
 - Call resource_shared_mark_ready when the host is ready to be used.

Changes since v3:
 - Use sha256file instead of the sha256sum clu.
 - Shift parameters passed to the lock and copy script, so that
   parameter 0 is ignored.
 - Copy to .tmp and then move the FreeBSD image.
 - Use a single-line find rune to cleanup old images.
 - Add some missing "set -e".
 - Don't check the output of target_cmd_output_root against undefined,
   that's never going to be true.
 - Split the setup_netboot_memdisk helper code into a pre-patch.

Changes since v2:
 - Use sysrc instead of echo to modify rc.conf.

Changes since v1:
 - Use pkg bootstrap instead of pkg update.
 - Use freebsdbuildjob instead of freebsd_buildjob.
 - add "append raw" to the memdisk command line.
 - Use with-lock-ex instead of flock.
 - Use system_checked and an array to hold the locked command to
   execute.
 - Use an array to store the list of possible disk devices.
 - Use target_putfilecontents_root_stash in order to upload the
   install script to the target.
 - Remove the usage of TftpFreeBSDBase.
 - Use target_tftp_prefix in order to get the prefix for the tftp
   target image path.
 - Add a missing linewrap.
 - Replace the split used to get the runvar paths with a regexp.
 - Place the install sets at /root/osstest_sets instead of
   /tmp/osstest_sets.
 - Pick the sets/installer image from the freebsdbuildjob
   path_freebsdist or from the runvar variable freebsd_distpath.
 - Add a comment about which FreeBSD specific inputs the script
   consumes.

7 years agoosstest: introduce a helper to setup a host to boot using memdisk
Roger Pau Monne [Mon, 23 Oct 2017 10:06:19 +0000 (11:06 +0100)]
osstest: introduce a helper to setup a host to boot using memdisk

The helper allows booting a host from pxelinux using an image
compatible with memdisk.

Note that this requires having a copy of the memdisk binary (provided
as part of pxelinux) in the root of the tftp server.

Deployment note: A copy of the memdisk binary (from syslinux) must be
placed in the root of the tftp server, on Debian this is accomplished
using;

ln -s /usr/lib/syslinux/memdisk /tftp/root/memdisk

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

Changes since v3:
 - New in this version (split from install patch).

7 years agoosstest: introduce a helper to calculate the sha256 of a given file
Roger Pau Monne [Mon, 23 Oct 2017 10:05:57 +0000 (11:05 +0100)]
osstest: introduce a helper to calculate the sha256 of a given file

The helper is going to be used to calculate the sha256 of the FreeBSD
installer images.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v3:
 - New in this version.