Neil Williams: LAVA packages for Debian
Packaging LAVA for Debian unstable
with notes on other distributions
I ve been building packages for LAVA on Debian unstable for several months now and I ve been running LAVA jobs on the laptop and on devices in my home lab and on an ARMv7 arndale too.
Current LAVA installations use lava-deployment-tool which has only supported Ubuntu 12.04 LTS Precise Pangolin. There has been a desire in LAVA to move away from a virtual environment, to put configuration files in FHS compliant paths, to use standard distribution packages for dependencies and so to make LAVA available on more platforms than just precise. Packaging opens the door to installing LAVA on Debian, Ubuntu, Fedora and any other recent distribution. Despite LAVA currently being reliant on 12.04 Precise, some of the python dependencies of LAVA have been able to move forward using the virtual environment provided by builtout and pypi. This means that LAVA, as packaged, requires a newer base OS suite than precise for Ubuntu, the minimal base is Saucy Salamander 13.10 and for Debian it would be Jessie (testing) although there is currently a transition ongoing in Debian which means that uwsgi is not in testing and Debian unstable would be needed instead.
The work to migrate configuration snippets out of deployment-tool and to ensure that the tarball built using setuptools contains all of the necessary files for the package has already been done. The packaging itself is clean and most of the work is done upstream. There is, as ever, more to do but the packages work smoothly for single install LAVA servers where the dispatcher is on the same machine as the django web frontend.
The packages have also migrated to Django1.6, something which is proving difficult with the deployment-tool as it has not kept pace with the changes outside the virtual environment, even if other parts of LAVA have.
LAVA will be switching to packages for installation instead of deployment-tool and this will mean changes to how LAVA works outside the Cambridge lab. When the time comes to swich to packaging, the plan is to update deployment-tool so that it no longer updates /srv/lava/ but instead migrates the instance to packages.
Main changes
-
Configuration files move into
/etc/-
Device configuration files
/etc/lava-dispatcher/devices/ -
Instance configuration files
/etc/lava-server/
-
Device configuration files
-
Log files move into
/var/log/-
Adding logrotate support no more multi-Gb log files in
/srv/lava/
-
Adding logrotate support no more multi-Gb log files in
- Commitment to keeping the upstream code up to date with dependencies
- Support for migrating existing instances, using South.
-
Packaging helpers
- add devices over SSH instead of via a combination of web frontend and SSH.
- Developer builds with easily identifiable version strings, built as packages direct from your git tree.
-
New frontend
- Although django1.6 does not change the design of the web frontend at all, LAVA will take the opportunity to apply a bootstrap frontend which has greater support for browsers on a variety of devices, including mobile. This also helps identify a packaged LAVA from a deployment LAVA.
- Documentation and regular updates
official monthly release and any intervening updates will be made available for distributions to use for their own packaging. Additionally, Debian packages will be regularly built for use within LAVA and these will be available for those who choose to migrate from Ubuntu Precise to Debian Jessie. LAVA will assist maintainers who want to package LAVA for their distributions and we welcome patches from such maintainers. This can include changes to the developer build support script to automate the process of supporting development outside LAVA. Initially, LAVA will migrate to packaging internally, to prove the process and to smooth out the migration. Other LAVA instances are welcome to follow this migration or wait until the problems have been ironed out. The Issues
- Remote workers this is work to be completed during the migration to packaging within LAVA as well as pending work upstream on the internals of the connection between a remote worker and the master scheduler. Expect some churn in this area whilst the code is being finalised. A lava-worker package is being prepared which borrows enough code from lava-server to run the lava-scheduler-daemon on the remote worker, until such time as the remote worker communications are refactored.
- Integration there are plans to integrate some of the modules which LAVA uses which are not commonly packaged: linaro-dashboard-bundle and linaro-django-xmlrpc
- OpenID the certificates which underpin OpenID use with Launchpad have been removed in Debian and LAVA is currently investigating alternatives.
- json-schema-validator currently has a broken test suite, so this will need to be patched by LAVA to allow the package to build. The code may be replaced with a different validator if the issue persists.
- namespace handling the current package install is unnecessarily noisy with complaints about the lava namespace. This will need a fix but does not affect current operation.
- Unit tests LAVA is working hard to add a much larger coverage of internal unit tests. These use a temporary database which is not generally available during the build of a distribution package. LAVA is already running continuous integration tests to ensure that these tests continue to pass and the packages will gain documentation on how to run these tests after installation.
debhelper (>= 8.0.0) python python-all python-dev python-all-dev python-sphinx (>= 1.0.7+dfsg) python3-sphinx python-mocker python-setuptools python-versiontools(python-versiontools may disappear before the packages are finalised) In addition, to be able to install lava-server, these packages need to be built from tarballs released by Linaro (the list may shorten as changes upstream are applied)
linaro-django-pagination, python-django-restricted-resource (>= 0.2.7), lava-tool (>= 0.2), lava-utils-interface (>= 1.0), linaro-django-xmlrpc (>= 0.4), python-versiontools (>= 1.8), python-longerusername, linaro-dashboard-bundle (>= 1.10.2), lava-dispatcher (>= 0.33.3) lava-coordinator, lava-server-docThe list for lava-dispatcher is currently:
python-json-schema-validator, lava-tool (>= 0.4), lava-utils-interface, linaro-dashboard-bundle (>= 1.10.2),The packages available from my experimental repository are using a new packaging branch of lava-server and lava-dispatcher where we are also migrating the CSS to Bootstrap CSS. Installing LAVA on Debian unstable
$ sudo apt-get install emdebian-archive-keyring
Add the link to my experimental repository (amd64, i386, armhf & arm64) to your apt sources, e.g. by creating a file /etc/apt/sources.list.d/lava.list containing:
deb http://people.linaro.org/~neil.williams/lava sid main
Update with the new key
$ sudo apt-get update
It is always best to install postgresql first:
$ sudo apt-get install postgresql
There are then three options for the packages to install (Please be careful with remote worker setup, it is not suitable for important installations at this time.):
-
Single instance, server and dispatcher with recommended tools
apt-get install lava
Installs linaro-image-tools and guestfs tools. -
Single instance, server and dispatcher
apt-get install lava-server
Installs enough to run LAVA on a single machine, running jobs on boards on the same LAN. -
Experimental remote worker support
apt-get install lava-worker
Needs a normal lava-server installation to act as the master scheduler but is aimed at supporting a dispatcher and boards which are remote from that master.
/etc/apache2/sites-available/ but is not enabled by default. If you choose to use the packaged apache config, you can simply run:
$ sudo a2ensite lava-server
$ sudo apache2ctl restart
(If this is a fresh apache install, use a2dissite to disable to default configuration before restarting.)
Information on creating a superuser, adding devices and administering your LAVA install is provided in the README.Debian file in lava-server:
$ zless /usr/share/doc/lava-server/README.Debian.gz
Provisos and limitations
Please be aware that packaged LAVA is still a work-in-progress but do let us know if there are problems. Now is the time to iron out install bugs and other issues as well as to prepare LAVA packages for other distributions.
It will be a little while before the packages are ready for upload to Debian I ve got to arrange the download location and upload the dependencies first and some of that work will wait until more work has gone in upstream to consolidate some of the current dependencies.
As usual, I look at the application stats for
Anyway we're just working on evaluation and will finalize it in upcoming days. Of course you will know the results from Google on April 21st.
I will try to report my Debian activities here. I am trying to retake them
and as I'm usually busy at
I have just released version 1.7.2 of
Core Rendering with Glamor
I ve hacked up the intel driver to bypass all of the UXA paths
when Glamor is enabled so I m currently running an X server that uses
only Glamor for all rendering. There are still too many fall backs, and
performance for some operations is not what I d like, but it s
entirely usable. It supports DRI3, so I even have GL applications
running.
Core Rendering Status
I ve continued to focus on getting the core X protocol rendering
operations complete and correct; those remain a critical part of many
X applications and are a poor match for GL. At this point, I ve got
accelerated versions of the basic spans functions, filled rectangles,
text and copies.
GL and Scrolling
OpenGL has been on a many-year vendetta against one of the most common
2D accelerated operations copying data within the same object, even
when that operation overlaps itself. This used to be the most
performance-critical operation in X; it was used for scrolling your
terminal windows and when moving windows around on the screen.
Reviewing the OpenGL 3.x spec, Eric and I both read the glCopyPixels
specification as clearly requiring correct semantics for overlapping
copy operations it says that the operation must be equivalent to
reading the pixels and then writing the pixels. My CopyArea
acceleration thus uses this path for the self-copy case. However, the
ARB decided that having a well defined blt operation was too nice to
the users, so the current 4.4 specification adds explicit language to
assert that this is not well defined anymore (even in the face of the
existing language which is pretty darn unambiguous).
I suspect we ll end up creating an extension that offers what we need
here; applications are unlikely to stop scrolling stuff around, and
GPUs (at least Intel) will continue to do what we want. This is the
kind of thing that makes GL maddening for 2D graphics the GPU does
what we want, and the GL doesn t let us get at it.
For implementations not capable of supporting the required semantic,
someone will presumably need to write code that creates a temporary
copy of the data.
PBOs for fall backs
For operations which Glamor can t manage, we need to fall back to
using a software solution. Direct-to-hardware acceleration
architectures do this by simply mapping the underlying GPU object to
the CPU. GL doesn t provide this access, and it s probably a good
thing as such access needs to be carefully synchronized with GPU
access, and attempting to access tiled GPU objects with the CPU
require either piles of CPU code to de-tile accesses (ala wfb), or
special hardware detilers (like the Intel GTT).
However, GL does provide a fairly nice abstraction called pixel buffer
objects (PBOs) which work to speed access to GPU data from the CPU.
The fallback code allocates a PBO for each relevant X drawable, asks
GL to copy pixels in, and then calls fb, with the drawable now
referencing the temporary buffer. On the way back out, any potentially
modified pixels are copied back through GL and the PBOs are freed.
This turns out to be dramatically faster than malloc ing temporary
buffers as it allows the GL to allocate memory that it likes, and for
it to manage the data upload and buffer destruction asynchronously.
Because X pixmaps can contain many X windows (the root pixmap being
the most obvious example), they are often significantly larger than
the actual rendering target area. As an optimization, the code only
copies data from the relevant area of the pixmap, saving considerable
time as a result. There s even an interface which further restricts
that to a subset of the target drawable which the Composite
function uses.
Using Scissoring for Clipping
The GL scissor operation provides a single clipping rectangle. X
provides a list of rectangles to clip to. There are two obvious ways
to perform clipping here either perform all clipping in software,
or hand each X clipping rectangle in turn to GL and re-execute the
entire rendering operation for each rectangle.
You d think that the former plan would be the obvious choice; clearly
re-executing the entire rendering operation potentially many times is
going to take a lot of time in the GPU.
However, the reality is that most X drawing occurs under a single
clipping rectangle. Accelerating this common case by using the
hardware clipper provides enough benefit that we definitely want to
use it when it works. We could duplicate all of the rendering paths
and perform CPU-based clipping when the number of rectangles was above
some threshold, but the additional code complexity isn t obviously
worth the effort, given how infrequently it will be used. So I haven t
bothered. Most operations look like this:
Installing fresh hot
I know, I know, I should resist saying this. But every time I see it, I
wonder why it happens, and I should just get this off my chest.
The difference between "its" and "it's" is something that many people,
even native english speakers, seem to miss. Yet, it's so extremely
simple that I, a non-native english speaker, have been baffled about that
common mistake for as long as I can remember.
The apostrophe (') in any sentence usually means that something at the
location of that apostrophe is gone out to lunch. In this particular
case, it means that the " " and the "i" in the phrase "it is" were
hungry. So rather than "it is", we contract that to "it's", and allow
the space and the i to enjoy their meal while the apostrophe keeps their
seats warm.
Practically, what that means is that every time you want to write
"it's", you should consider whether you can replace it with "it is"
without making the sentence sound like junk. If you can't, you probably
meant to write "its" rather than "it's".
For instance, consider the following sentence:
"It's not possible to repair this car within the budget that its owner
wants to pay"
It's perfectly possible to say "it is not possible" here, so we need to
have the apostrophe keep a seat warm for the space and the i.
It makes no sense to say "it is owner", unless you're trying to speak a
much deformed form of english, so that makes it a possessive pronoun
(similar to "hers", "his", "theirs", etc) and you shouldn't use an
apostrophe.
Speaking of food, it's time for lunch now.
To provide geolocation-aware answers with
Moreover, caching makes the problem worse.
To solve this problem, a new
Not many authoritative servers support this extension (
I was pretty exhausted after yesterday's sustained activities. By the time I'd
blogged, done some photo management, gone to yoga class, made dinner and called
my girlfriend, it was late, and I'd gotten to that tired point where I couldn't
be bothered getting off the couch, so I ended up having a self-inflicted late
night.
This morning I tried to go for a run, but I died at the 2km mark, half way up
Hawthorne Road, so I walked for the remainder of my 5km circuit. I'm going to
say it was a combination of tiredness, insufficient hydration, the heat, and my
head space.
I got home from my "run", and had a shower and cleaned up the kitchen a bit and
decided I'd rather get out of the house than work on my taxes, so I headed over
to Moorooka to talk to the folks at
When I installed

As I posted some weeks ago, I have been playing with my
As Jan has previously
In case you have spare time at the weekend ahead, it may be worth to spend it with great