LAVA-SERVER(1)

πŸ“¦ version 2023.01, in debian bookworm

πŸŽ€ LAVA-SERVER πŸŽ€

okay so welcome to lava-server(1), straight out of the General Commands Manual β€” yes bestie, we're reading the actual manual page together, grab a snack πŸ“


✨ NAME ✨

lava-server β€” lava-server command line support

🌸 SUMMARY 🌸

lava-server is a command-line management interface to a LAVA instance, and the Django database management tools for that instance. two jobs, one icon πŸ’…

πŸ’… USAGE πŸ’…

lava-server manage subcommand [options] [args]

🫢 COMMON OPTIONS 🫢

Most of these options are imported from django and more information can be found in the django documentation. no cap, django is doing a lot of the heavy lifting here.

These options are supported for all subcommands.

  • -v VERBOSITY, --verbosity=VERBOSITY β€” Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output. yes there's a whole volume dial, use it 🎚️
  • --settings=SETTINGS β€” The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. so like, it'll go looking for it if you don't hand it one πŸ¦‹
  • --pythonpath=PYTHONPATH β€” A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
  • --traceback β€” Print traceback on exception. when things go πŸ’€ you get the receipts.
  • --version β€” show program's version number and exit.
  • -h, --help β€” show this help message and exit.

πŸ¦‹ SUBCOMMANDS πŸ¦‹

Type lava-server manage help <subcommand> for help on a specific subcommand.

πŸ‘‘ AVAILABLE SUBCOMMANDS πŸ‘‘

Type lava-server manage <subcommand> -h for help on an option available to a specific subcommand.

auth

changepassword

Change a user's password for django.contrib.auth.

Usage:

lava-server manage changepassword [options]

Options:

  • --database=DATABASE β€” Specifies the database to use. Default is "default".

createsuperuser

Used to create a superuser. main character energy, fr fr πŸ‘‘

Usage:

lava-server manage createsuperuser [options]

Options:

  • --username=USERNAME β€” Specifies the username for the superuser.
  • --email=EMAIL β€” Specifies the email address for the superuser.
  • --noinput β€” Tells Django to NOT prompt the user for input of any kind. You must use --username and --email with --noinput, and superusers created with --noinput will not be able to log in until they are given a valid password. read that again bestie, that's a whole trap door πŸšͺ😭
  • --database=DATABASE β€” Specifies the database to use. Default is default.

django

django functions change with releases of the django package. See the documentation for python-django. not us deciding, that's just how django moves 🌈

lava_server

devices

Manage devices

positional arguments:

  • {add, details, list, set}

Sub commands:

add β€” Add a device

positional arguments:

  • hostname β€” Hostname of the device

optional arguments:

  • -h, --help β€” show this help message and exit
  • --device-type DEVICE_TYPE β€” Device type
  • --description DESCRIPTION β€” Device description
  • --dictionary DICTIONARY β€” Device dictionary
  • --offline β€” Create the device offline (online by default)
  • --private β€” Make the device private (public by default)
  • --worker WORKER β€” The name of the worker
  • --tags [TAGS [TAGS ...]] β€” List of tags to add to the device
  • --physical-user PHYSICAL_USER β€” Username of the user with physical access to the device
  • --physical-group PHYSICAL_GROUP β€” Name of the group with physical access to the device
  • --owner OWNER β€” Username of the user with ownership of the device
  • --group GROUP β€” Name of the group with ownership of the device

copy β€” Copy an existing device as a new device

positional arguments:

  • original β€” Hostname of the existing device
  • target β€” Hostname of the device to create

optional arguments:

  • -h, --help β€” show this help message and exit
  • --offline β€” Create the device offline (online by default)
  • --private β€” Make the device private (public by default)
  • --worker WORKER β€” The name of the worker
  • --copy-with-tags β€” Set all the tags of the original device on the target device

details β€” Details about a device

positional arguments:

  • hostname β€” Hostname of the device

list β€” List the installed devices

optional arguments:

  • -h, --help β€” show this help message and exit
  • --state {IDLE,RESERVED,RUNNING} β€” Show only devices with the given state
  • --all, -a β€” Show all devices, including retired ones
  • --health {GOOD,UNKNOWN,LOOPING,BAD,MAINTENANCE,RETIRED} β€” Show only devices with the given health
  • --csv β€” Print as csv
  • --all, -a β€” Show all devices, including retired ones
  • --status {OFFLINE, IDLE, RUNNING, OFFLINING, RETIRED, RESERVED} β€” Show only devices with this status
  • --csv β€” Print as csv
ngl that list really said the same thing twice and I'm just here respecting it 🫢 --all, -a and --csv genuinely show up twice in the page, so they show up twice here. no notes.

update β€” Update device details

positional arguments:

  • hostname β€” Hostname of the device

optional arguments:

  • -h, --help β€” show this help message and exit
  • --description DESCRIPTION β€” Set the description
  • --health {GOOD,UNKNOWN,LOOPING,BAD,MAINTENANCE,RETIRED} β€” Update the device health
  • --worker WORKER β€” Update the worker
  • --public β€” make the device public
  • --private β€” Make the device private
  • --physical-user PHYSICAL_USER β€” Username of the user with physical access to the device
  • --physical-group PHYSICAL_GROUP β€” Name of the group with physical access to the device
  • --owner OWNER β€” Username of the user with ownership of the device
  • --group GROUP β€” Name of the group with ownership of the device

device-types

Manage device types according to which templates are available and which device-types are defined in the database. When counting the number of devices, Retired devices are included. okay noted, they still count ✨

positional arguments:

  • {add, details, list, update}

Sub commands:

add β€” Add V2 device type(s) to the database.

positional arguments:

  • device-type β€” The device type name. Passing '*' will add all known V2 device types. yes, the little star really does mean all of them πŸ’«

optional arguments:

  • -h, --help β€” show this help message and exit

alias: Only supported when creating a single device-type

  • --alias ALIAS β€” Name of an alias for this device-type.

health check: Only supported when creating a single device-type

  • --health-frequency HEALTH_FREQUENCY β€” How often to run health checks.
  • --health-denominator {hours, jobs} β€” Initiate health checks by hours or by jobs.

details β€” Details about a device-type

so we were mid-subcommand, and the tea continues like this πŸ’…

device-types β€” the rest of the roster πŸŽ€

for the device-type details command, you get:

  • positional arguments:
    • name β€” Name of the device-type
  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --devices β€” Print the corresponding devices

then list is like:

list β€” List the installed device types

  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --all, -a β€” Show all device types in the database, including types not currently installed.
    • --csv β€” Print as csv

and update does the thing:

update β€” Update an existing V2 device type in the database

  • positional arguments:
    • device-type β€” The device type name.
  • optional arguments:
    • -h, --help β€” show this help message and exit
  • alias:
    • --alias ALIAS β€” Name of an alias for this device-type.

now the jobs era:

jobs β€” Manage jobs πŸ’Ό

  • positional arguments: {compress,fail,rm,validate}
  • Sub commands:

compress β€” Compress job logs

  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --newer-than NEWER_THAN β€” Compress jobs newer than this. The time is of the form: 1h (one hour) or 2d (two days). By default, all jobs will be compressed.
    • --older-than OLDER_THAN β€” Compress jobs older than this. The time is of the form: 1h (one hour) or 2d (two days). By default, all jobs logs will be compressed.
    • --submitter SUBMITTER β€” Filter jobs by submitter
    • --dry-run β€” Do not compress any logs, simulate the output
    • --slow β€” Be nice with the system by sleeping regularly

fail β€” Fail the given canceled job

  • positional arguments:
    • job_id β€” job id
  • optional arguments:
    • -h, --help β€” show this help message and exit

rm β€” Remove the jobs

  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --older-than OLDER_THAN β€” Remove jobs older than this. The time is of the form: 1h (one hour) or 2d (two days). By default, all jobs will be removed.
    • --state {SUBMITTED,SCHEDULING,SCHEDULED,RUNNING,CANCELING,FINISHED} β€” Filter by job state
    • --submitter SUBMITTER β€” Filter jobs by submitter
    • --dry-run β€” Do not remove any data, simulate the output
    • --slow β€” Be nice with the system by sleeping regularly

validate β€” Validate job definition

  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --mail-admins β€” Send a mail to the admins with a list of failing jobs
    • --submitter SUBMITTER β€” Filter jobs by submitter
    • --newer-than NEWER_THAN β€” Validate jobs newer than this. The time is of the form: 1h (one hour) or 2d (two days). By default, only jobs in the last 24 hours will be validated.
    • --strict β€” If set to True, the validator will reject any extra keys that are present in the job definition but not defined in the schema

now the workers section, where the real ones hang:

workers β€” Manage workers πŸ‘·

  • position arguments: {add, details, list, update}
  • Sub commands:

add β€” Create a worker

  • positional arguments:
    • hostname β€” Hostname of the worker
  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --description DESCRIPTION β€” Worker description
    • --health {ACTIVE,MAINTENANCE,RETIRED} β€” Worker health

details β€” Details of a worker

  • positional arguments:
    • hostname β€” Hostname of the worker
  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --devices β€” Print the list of attached devices

list β€” List the workers

  • optional arguments:
    • -h, --help β€” show this help message and exit
    • -a, --all β€” Show all workers (including retired ones)
    • --csv β€” Print as csv

update β€” Update worker properties

  • positional arguments:
    • hostname β€” Hostname of the worker
  • optional arguments:
    • -h, --help β€” show this help message and exit
    • --description DESCRIPTION β€” Worker description
    • --health {ACTIVE,MAINTENANCE,RETIRED} β€” Set worker health

and then the test one, aka the vibe check for your apps:

test β€” Runs the test suite for the specified applications, or the entire site if no apps are specified. πŸ§ͺ

Usage:

lava-server manage test [options] [appname ...]

Options:

  • --noinput β€” Tells Django to NOT prompt the user for input of any kind.
  • --failfast β€” Tells Django to stop running the test suite after first failed test.
  • --testrunner TESTRUNNER β€” Tells Django to use specified test runner class instead of the one specified by the TEST_RUNNER setting.
  • --liveserver LIVESERVER β€” Overrides the default address where the live server (used with LiveServerTestCase) is expected to run from. The default value is localhost:8081.

πŸ› BUGS πŸ›

if your bug is about a specific type of device, bestie, please include all the configuration details for that device type, plus the job submission and as much of the LAVA test job log file as you can (like a compressed file attached to the bug report).

and if your device type is not one that already exists on LAVA instances, please supply as much information as you can about the board itself.

🫢 CONTRIBUTING UPSTREAM 🫢

if you wanna contribute, go check out https://docs.lavasoftware.org/lava/contribution.html.

if you're thinking about big changes, the best move is to subscribe to the Linaro Validation mailing list at:

http://lists.lavasoftware.org/mailman/listinfo/lava-users

also come talk to us on IRC:

irc.libera.chat
#lavasoftware

πŸ‘‘ AUTHOR πŸ‘‘

Linaro Validation Team

2010-2023, Linaro Limited


that's the whole page, no cap. this was LAVA-SERVER(1) from 2023.01, dated January 23, 2023 β€” go be iconic, you Unix gremlin πŸ’…βœ¨

πŸ“¦ where this page comes from