Future directions for the Beaker test harness
by Nick Coghlan
A few weeks back, Amit put together a proof of concept for running the
test harness in a container, rather than directly on the host
(http://gerrit.beaker-project.org/#/c/3199).
That proof of concept relies on restraint, the new reference harness,
that is intended to eventually replace beah
(https://beaker-project.org/dev/proposals/reference-harness.html)
At the same time, I don't think restraint is currently getting the level
of review and testing that it needs to mature into a plausible
replacement for beah as the default harness.
I think Amit's proposed patch provides a possible way forward:
1. Accept the initial approach where restraint is the *only* supported
harness when running inside a container. Specifying both
"contained_harness" and "harness" as ks_meta variables should be an
error at this point (side note: 'harness' should also be documented
along with all the other ks_meta variables, with a link to
https://beaker-project.org/docs/alternative-harnesses/).
2. Recommend publishing both beah *and* restraint in the harness repos
for Beaker installations. This will not only make restraint available
for container based testing, but also make it readily available via
"harness=restraint" for normal testing, without needing to add a custom
repo definition.
3. Once we have container based testing working reliably with restraint,
drop the restriction against using alternative harnesses in containers.
The priority at the moment though is to get something working that can
run on an Atomic Host, and still provide a relatively normal execution
environment for the executed tasks. Supporting alternative harnesses
*inside* containers is a nice-to-have that can wait until later - by
flatly disallowing it, we ensure we don't have to spend any time working
on container related issues that don't impact restraint. For the initial
iteration, we can also ignore the question of choosing the base image
used to run the harness, as well as being able to start and stop other
containers on the host.
I've filed an RFE for 0.18 on that basis:
https://bugzilla.redhat.com/show_bug.cgi?id=1131388
As part of this, we may also want to move restraint from Bill's personal
account on GitHub to the main Beaker project account, but I don't think
that's particularly urgent at this point.
Regards,
Nick.
--
Nick Coghlan
Red Hat Hosted & Shared Services
Software Engineering & Development, Brisbane
HSS Provisioning Architect
5 years, 6 months
Beaker inventory: smolt & lshw comparison
by Amit Saha
Hi all,
As part of the migration to "lshw" for beaker's inventory task, I ran a comparison of the "smolt"
based tasks with the "lshw" based task.
The "raw" data is available in the "comparison.html" file under each arch sub-directory at:
https://amitksaha.fedorapeople.org/beaker-inventory-comparison/comparison...
Here are the summarized differences:
** i686/AMD/athlon (32-bit system)
CPU flags
=========
* lshw categorises "fpu_exception" as a CPU flag, adds "wp" as cpu flag too.
(This is because we assume all the stuff lshw lists as CPU capabilities,
we consider them flags)
Others
======
* USBID retrieved by lshw with repetition, smolt didn't retrieve any
* Same PCIID retrieved by lshw, however there is repetition of a device (for PCIID as well)
* lshw is not able to detect the system model (same as smolt)
* lshw sets arch to i686 instead of i386 by smolt
* lshw fails to get the system vendor (same as smolt)
* lshw fails to get the FORMFACTOR
* CPUVENDOR obtained by smolt is AuthenticAMD, lshw sets it to "Advanced Micro Devices [AMD]"
** ia64
CPU flags
=========
* No CPU flags retrieved by lshw
Others
======
* Bulk of the USB IDs retrieved are 0000:0000s
* lshw is not able to detect the system model
* CPUFAMILY is reported by smolt as 1, by lshw as 2
* lshw fails to get the system vendor
* lshw fails to get the FORMFACTOR, same as smolt
* CPUVENDOR obtained by smolt is genuineintel, lshw sets it to "Intel corp."
* CPU stepping obtained by smolt is 0, whereas it is None by lshw
* PCIIDS retrieved by lshw contain one missing PCIID and a number of repetitions
* Memory reported by smolt is 7863 MB, 8192 by smolt. (**Needs more investigation**)
** ppc64/Power 6
CPU flags
=========
* No CPU flags retrieved by either
Others
======
* USBID retrieved by lshw, none by smolt, contains one repetition
* lshw is not able to detect the system model, same as smolt
* lshw fails to get the system vendor
* lshw reports a repeating PCIID (same as smolt)
** ppc64/Power 7
CPU flags
=========
* CPU flags retrieved by lshw as "performance-monitor"
Others
======
* No USB devices reported by either
* lshw is not able to detect the system model, same as smolt
* lshw fails to get the system vendor
* lshw and smolt both doesn't report any PCIIDs
** s390
CPU flags
=========
* CPU flags reported by lshw are each duplicated
Others
======
* No USBIDs retrieved by lshw, none by smolt
* lshw is not able to detect the system model, same as smolt
* lshw fails to get the system vendor, same as smolt
* lshw reports a repeating PCIID (same as smolt)
* Memory is reported as 2001 MB by both, system has 2048 MB
** x86_64/amd
CPU flags
=========
* lshw uses x86-64 in place of lm
* lshw categorises "fpu_exception" and "cpufreq" as a CPU flags
(This is because we assume all the stuff lshw lists as CPU capabilities,
we consider them flags)
Others
======
* More USBID retrieved by lshw, however there is repetition of a device (for PCIID as well)
* lshw is not able to detect the system model
* lshw sets VIRT_IOMMU to False, whereas smolt has it to True
* lshw sets arch to x86-64 instead of x86_64
* smolt gets CPUMODEL as " AMD Eng Sample, 1S256146U8K54_35/25/20_2/8 ", lshw gets it as "Opteron"
* lshw fails to get the system vendor
* lshw fails to get the FORMFACTOR
* CPUVENDOR obtained by smolt is AuthenticAMD, lshw sets it to "Advanced Micro Devices [AMD]"
* smolt gets 3811 MB of memory, lshw gets None on an 3919 MB system (**Needs more investigation**)
** x86_64/intel
CPU flags
=========
* lshw uses x86-64 in place of lm
* lshw categorises "fpu_exception" and "cpufreq" as a CPU flags
(This is because we assume all the stuff lshw lists as CPU capabilities,
we consider them flags)
Others
======
* More USBID retrieved by lshw, however there is repetition of a device
* lshw is not able to detect the system model
* lshw sets arch to x86-64 instead of x86_64
* smolt gets CPUMODEL as "Intel(R) Xeon(TM) CPU 3.60GHz", lshw gets it as "Xeon"
* lshw fails to get the system vendor
* CPUVENDOR/vendor obtained by smolt is GenuineIntel, lshw sets it to Intel Corp.
* lshw gets 4096 MB of memory correctly
** x86_64/kvm guest
CPU flags
=========
* lshw uses x86-64 in place of lm
* lshw categorises "fpu_exception" as a CPU flag
(This is because we assume all the stuff lshw lists as CPU capabilities,
we consider them flags)
Others
======
* USBID retrieved by lshw, none by smolt
* lshw is not able to detect the system model
* lshw sets arch to x86-64 instead of x86_64
* lshw fails to get the system vendor
* CPUVENDOR/vendor obtained by smolt is GenuineIntel, lshw sets it to Intel Corp.
* lshw fails finds one device less (PCIID)
* lshw gets 2048 MB of memory correctly
** Common to all archs
For all the architectures, the devices list returned by the lshw task is fewer than those
returned by smolt. The devices need to be individually compared to come up with a more accurate
answer.
PS: arm 32-bit and 64-bit comparison: Not possible, since we cannot run any smolt supported distro
on these.
The next plan of action is to fix the issues that we have found above - either in "beaker-system-scan"
or "lshw" itself.
Best,
Amit.
--
Amit Saha
SED, Hosted & Shared Services
Red Hat, Inc.
8 years, 5 months
Running Beaker's tests in a Docker container
by Amit Saha
While working with beaker‘s code base, I often feel the need to run my tests for a patch/feature
and continue to work on with different things while they run, including running other tests
testing something different. Currently this is not possible since we start off with a clean
database on every test run and simultaneous runs would obviously make one run step on another’s feet.
I finally have an initial docker based prototype for making this possible:
https://github.com/amitsaha/docker_files/tree/master/dev_workflow/beaker-...
Best,
Amit.
8 years, 6 months
Need improvements to template variables in workflow-installer-test
by Alexander Todorov
Hi guys,
as pointed out at http://gerrit.beaker-project.org/#/c/3891/ I've been
considering some improvements to the way workflow-installer-test processes its
templates.
Currently all kickstart templates have things like
{% if OS_MAJOR > 5 %}%end{% endif %}
or
{% if OS_MAJOR == 5 %}
key --skip
{% endif %}
which is relevant only for RHEL distros and not for Fedora. On top of that
Rawhide snapshots are imported as FAMILY=Fedora, MAJOR=rawhide, MINOR=0.
I suggest the following improvements in order to provide richer context and
minimize template bloat and rewriting:
1) Provide a {% end FAMILY OS_MAJOR %} tag which will insert the closing %end
(for %packages or %pre/%post) if needed. This will be implemented as a Jinja
extension.
2) Provide filters like isRHEL, isFedora, isRawhide to help with template
writing. These will be implemented as Jinja filters. Currently I even have a
filter which supports a somewhat cryptic syntax:
FAMILY|isRHEL - returns bool
OS_MAJOR|isRHEL(FAMILY) > 5 - returns either OS_MAJOR if FAMILY is RHEL or 0 if
FAMILY is something else.
Additionally Dan Callaghan commented on Gerrit:
>
> Yes it sounds like this is a good time to re-think the template vars for workflow-installer-test. It would be really good to have them more consistent with the server side templates.
I don't know how server side templates look like so Dan please comment how can
we make both sides more consistent ?
Additionally (see Gerrit) OS_MINOR can be either a digit (0, 1, 2, etc) or a
string (Alpha, Beta, etc). My patch above changed the type of OS_MINOR, OS_MAJOR
to string and so far things work but I suspect there will be issues with
comparisons like 2 > 20 (different number of digits). Currently OS_MINOR doesn't
seem to be used anywhere in the templates.
Any other comments or ideas are welcome as well.
Thanks,
Alex
8 years, 7 months
Pre-defined access policies vs. system pools?
by Dan Callaghan
In Beaker 20 we are planning to implement "pre-defined access policies",
the last remaining piece of the original access policies design
proposal:
https://beaker-project.org/dev/proposals/access-policies-for-systems.html...
I remember when we were writing that proposal and the system pools one,
we went back and forth quite a lot before settling on that approach. We
came to realise that separating the pre-defined access policies entirely
from system groups/pools made things simpler.
However I am still worried that creating a new namespace for system
access policies is not a good idea. It means essentially turning access
policies into a first-class object in Beaker, which means we will
eventually have to provide a way to list and search and describe and
delete them. Plus it adds yet another potential for namespace conflicts:
what happens when someone creates a pre-defined access policy named "lab
systems"?
I am wondering if we should instead implement the bare minimum of system
pools, and then use that as the basis for pre-defined access policies?
The choice of access policy for a system will then be either "custom
access policy" (what we have now) or "inherit access policy from:
<pool>".
Existing system groups would be converted into pools by a database
migration. It would create a same-named pool for every system group,
with the pool's owning group set to the same-named group. We would
implement the UI for creating pools and adding/removing systems, but the
scheduler features (host restrictions and ordering) would be left for
later.
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Hosted & Shared Services
Red Hat, Inc.
8 years, 8 months
First draft of job page improvements proposal
by Dan Callaghan
I've just published the first draft of the design proposal for job page
improvements, which we are targetting for Beaker 21.
https://beaker-project.org/dev/proposals/job-page-improvements.html
It's proposing some substantial changes to the layout and UI of the job
page and the recipe page (similar in scale to the system page
improvements in Beaker 19). Please take a look and send any feedback to
the list.
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Hosted & Shared Services
Red Hat, Inc.
8 years, 8 months
Direct dependenices for restraint
by Amit Saha
Hi all,
I am working on a developer's guide for restraint and from what I can see the following
will install all the necessary packages on F21 for 'make check' to pass:
sudo yum -y install gcc make glibc-devel glib2-devel libsoup-devel \
libarchive-devel pkgconfig libxml2-devel git-daemon thttpd tar
Are the following direct dependencies of restraint or are they just pulled in
by the direct dependencies/or are they not used any more?
libffi : seems like systemd is pulling this in?
sqlite: same as above?
openssl
libselinux
bzip2
intltool
(Ref: http://restraint.readthedocs.org/en/latest/install.html#building-from-source)
Thanks,
Amit.
--
Amit Saha
SED, Hosted & Shared Services
Red Hat, Inc.
8 years, 8 months