In general, the deployments do not modify the downloaded files. Where the LAVA scripts and test definitions need to be added, these are first prepared as a standalone tarball. Exceptions are described where relevant in each section.
Every deployment must specify a to
parameter. This value is then used
to select the appropriate Strategy class for the deployment which, in turn,
will require other parameters to provide the data on how to deploy to the
requested location.
See also
Fastboot deployments support a range of images to be downloaded and deployed to
the device. The list of images will depend on the test job and the test device.
The available elements determine the command arguments passed to fastboot
inside the LXC i.e., the partition to be flashed.
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Some system images are compressed as a tarball (.tar.gz
), these images
need the archive
option specified to unpack the system image correctly.
archive: tar
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
Some system images are shipped as sparse images which needs special handling with tools such as simg2img and img2simg, in order to apply LAVA specific overlays to it. This should be explicitly mentioned, so that LAVA will take necessary action to handle these type of images.
apply-overlay: true
See also
The sparse image format is defined in sparse_format.h
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Some rootfs images are compressed as a tarball (.tar.gz
), these images
need the archive
option specified to unpack the rootfs image correctly.
archive: tar
If the image is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
Some rootfs images are shipped as sparse images which needs special handling with tools such as simg2img and img2simg, in order to apply LAVA specific overlays to it. This should be explicitly mentioned, so that LAVA will take necessary action to handle these type of images.
apply-overlay: true
See also
The sparse image format is defined in sparse_format.h
Provides QEMU operations using an operating system installer into a new image and then boot into the installed image to run the specified test definitions.
Note
Currently only tested with Debian Installer.
The ISO and the preseed file can be tightly coupled but point releases of a stable release will typically continue to work with existing preseed files. LAVA tests of the installer tend to only install the base system in order to test kernel functionality rather than the operating system itself.
If the ISO is compressed, the compression method must be specified.
Allowed values
gz
bz2
xz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
Debian Installer can retrieve settings from a preseed
file to allow the
installation to proceed without prompting for information.
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
Take an absolute path specified by the test writer to copy the kernel out of the specified iso so that necessary kernel options can be added to the default ISO boot commands.
Paths to pull from the ISO need to start with /
as the top level of the
mounted ISO.
Paths to pull from the ISO must also be unique.
kernel: /install.amd/vmlinuz
Take an absolute path specified by the test writer to copy the kernel out of the specified iso so that necessary kernel options can be added to the default ISO boot commands.
Paths to pull from the ISO need to start with /
as the top level of the
mounted ISO.
Paths to pull from the ISO must also be unique.
initrd: /install.amd/initrd.gz
Size of the empty image to be provided to the installer. Typically a maximum of 5G. Use megabytes for a smaller image, although ~1G is likely to be the smallest practical size
installation_size: 2G
The operating system of the image must be specified so that the LAVA scripts can install packages and identify other defaults in the deployment data.
Allowed values
android
ubuntu
debian
lede
fedora
centos
debian_installer
centos_installer
oe
Deploy unchanged images to secondary SATA media. Any bootloader inside the image will not be used. Instead, the files needed for the boot are specified in the deployment. The entire physical device is available to the secondary deployment. Secondary relates to the expected requirement of a primary boot (e.g. ramdisk or NFS) which provides a suitable working environment to deploy the image directly to the secondary device. See Secondary media.
Not all devices support SATA media.
The test writer needs to provide the following information about the image:
Note
If the image mounts the boot partition at a mounpoint below the root directory of the image, the path to files within that partition must not include that mountpoint. The bootloader will read the files directly from the partition.
SSH methods can support two types of deployment.
See also
Primary connection and SSH as the primary connection as an example of the primary connection.
See also
to: tftp
# DEPLOY_SSH_BLOCK
- deploy:
role:
- guest
connection: ssh
os: debian
protocols:
lava-multinode:
- action: prepare-scp-overlay
request: lava-wait
# messageID matches hostID
messageID: ipv4
message:
# the key of the message matches value of the host_key
# the value of the message gets substituted
ipaddr: $ipaddr
timeout: # delay_start timeout
minutes: 21
Used to support TFTP deployments, e.g. using U-Boot. Files are downloaded to a
temporary directory in the TFTP tree and the filenames are substituted into the
bootloader commands specified in the device configuration or overridden in the
job. The files to download typically include a kernel but can also include any
file which the substitution commands need for this deployment. URL support is
handled by the python requests
module.
- deploy: timeout: minutes: 4 to: tftp
To deploy images using TFTP, arguments will be downloaded to a configured tftp directory.
Specifies the type of kernel being downloaded. Some bootloaders, for example
U-Boot, use this information to determine the load addresses and boot commands.
Certain device types may also need the downloaded file to
be converted to a uImage
.
Supported types
image
zimage
uimage
(Replaces the previous support for specifying the boot type (bootm
,
booti
or bootz
).
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
kernel: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz type: zimage
Supported schema
http://
https://
file://
(Device Tree Blob).
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
dtb: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/dtbs/am335x-boneblack.dtb
Supported schema
http://
https://
file://
A tarball of kernel modules for the supplied kernel. The file must be a tar file and the compression method must be specified. If the kernel requires these modules to be able to locate the rootfs, e.g. when using NFS or if certain required filesystem drivers are only available as modules, the ramdisk can be unpacked and the modules added. Modules may also be required to run tests within the ramdisk itself.
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
modules: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz compression: gz
Supported schema
http://
https://
file://
The compression method must be specified so that the modules can be unpacked.
Allowed values
gz
bz2
xz
The ramdisk needs to be unpacked and modified in either of the following two use cases:
To unpack the ramdisk, the test writer needs to specify details about how the ramdisk is prepared and used. If these details are not provided, the ramdisk will not be unpacked (potentially causing the test to fail in the above two use cases).
type: zimage ramdisk: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz compression: gz # the bootloader needs a u-boot header on the modified ramdisk add-header: u-boot
Supported schema
http://
https://
file://
modules: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz compression: gz
The compression method must be specified so that the modules can be unpacked.
Allowed values
gz
bz2
xz
If a header is already applied, the header
value must specify the type
of header, e.g. u-boot
. This header will be removed before unpacking, ready
for the LAVA overlay files.
If a header needs to be applied after any LAVA overlay files are added to the
ramdisk, the add-header
value must specify the type of header to add, e.g.
u-boot
.
kernel: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz type: zimage ramdisk: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz compression: gz # the bootloader needs a u-boot header on the modified ramdisk add-header: u-boot modules: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz compression: gz nfsrootfs: url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/jessie-armhf-nfs.tar.gz compression: gz
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
The NFS is unpacked into a temporary directory onto the dispatcher in a location supported by NFS exports. The compression method must be specified so that the NFS can be unpacked.
Allowed values
gz
bz2
xz
A persistent NFS URL can be used instead of a compressed tarball. See Persistence for the limitations of persistent storage. The creation and maintenance of the persistent location is solely the responsibility of the test writer.
Known Caveats
Warning
LAVA does not shut down the device or attempt to unmount the NFS filesystem when the job finishes; the device is simply powered off. The test writer needs to ensure that any background processes started by the test have been stopped before the test finishes.
Specifies the address to use for the persistent filesystem.
The address
must include the IP address of the NFS server and the full
path to the directory which contains the root filesystem, separated by a single
colon. In the YAML, all values containing a colon must be quoted:
persistent_nfs:
address: "127.0.0.1:/var/lib/lava/dispatcher/tmp/armhf/jessie"
Used to support QEMU device types which run on a dispatcher. The file is downloaded to a temporary directory and made available as one or more images, appending specified arguments to a predetermined QEMU command line:
- deploy: timeout: minutes: 4 to: tmpfs images: rootfs: image_arg: -drive format=raw,file={rootfs} url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/amd64/7/large-stable.img.gz sha256sum: 4ab50cc69fc61faa9bf48edada8bc1a317247f77ced5a815f40e75cef1d62cc7 compression: gz os: debian root_partition: 1
To deploy images using QEMU, arguments need to be prepared and then modified to include the downloaded location of the image files. The test writer needs to specify the format of the image and other image-specific arguments for QEMU along with a placeholder label which is unique for this test job.
The label is arbitrary text, used to match the other parameters to the placeholder so that the final value can be substituted in place of the placeholder.
In the example, the label is rootfs
and the url
includes the matching
placeholder {rootfs}
. If the final location of the downloaded image
is /tmp/tmp.rG542e/large-stable-6.img
then the final argument passed to
QEMU would include -drive format=raw,file=/tmp/tmp.rG542e/large-stable-6.img
.
Note
Take note of the syntax. Single brace before and after the label and no whitespace. This is test job syntax, not Jinja.
images: rootfs: image_arg: -drive format=raw,file={rootfs}
The image_arg
determines how QEMU handles the image. The arguments must
include a placeholder label which exactly matches
the key of the same block in the list of images. The actual location of the
downloaded file will then replace the placeholder. Multiple images can be
supplied but the test writer is responsible for ensuring that the image_arg
make sense to QEMU.
Specifies the URL to download. All downloads are checksummed using md5sum
and sha256sum
URLs are checked during the test job validation to ensure that the file can be downloaded. Missing files will cause the test job to end as Incomplete.
URLs must use one of the supported schemes, the first element of the URL.
Supported schema
http://
https://
file://
If the image is compressed, the compression method must be specified if any
test
actions are defined in the job.
Allowed values
gz
bz2
xz
The checksum of the file to download can be provided, and if so it will be checked against the downloaded content. This can help to detect multiple potential problems such as misconfigured caching or corrupted downloads. If compression is used, the checksum to specify is the checksum of the compressed file, irrespective of whether that file is decompressed later.
The checksum of the file to download can be provided, and if so it will be checked against the downloaded content. This can help to detect multiple potential problems such as misconfigured caching or corrupted downloads. If compression is used, the checksum to specify is the checksum of the compressed file, irrespective of whether that file is decompressed later.:
image_arg: -drive format=raw,file={rootfs} url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/amd64/7/large-stable.img.gz sha256sum: 4ab50cc69fc61faa9bf48edada8bc1a317247f77ced5a815f40e75cef1d62cc7 compression: gz
Deploy unchanged images to secondary USB media. Any bootloader inside the image will not be used. Instead, the files needed for the boot are specified in the deployment. The entire physical device is available to the secondary deployment. Secondary relates to the expected requirement of a primary boot (e.g. ramdisk or NFS) which provides a suitable working environment to deploy the image directly to the secondary device. See Secondary media.
Not all devices support USB media.
The test writer needs to provide the following information about the image:
Note
If the image mounts the boot partition at a mounpoint below the root directory of the image, the path to files within that partition must not include that mountpoint. The bootloader will read the files directly from the partition.
The UUID can be obtained by writing the image to local media and checking the
contents of /dev/disk/by-uuid
The ramdisk may need adjustment for some bootloaders (like U-Boot), so mount the local media and use something like:
mkimage -A arm -T ramdisk -C none -d /mnt/boot/init.. /mnt/boot/init..u-boot