Ilya Dryomov [Wed, 17 Jun 2015 16:40:57 +0000 (19:40 +0300)]
suite: don't try to check ceph packages against kernel flavor
The whole kernel_flavor check in schedule_suite() is completely wrong.
ceph packages and kernel packages are built on different gitbuilders
and so a set of ceph flavors is distinct from a set a kernel flavors
(they happen to intersect because both have a 'basic' flavor but that's
it). Querying ceph gitbuilders with kernel flavor (which is what it
currently does - has_packages_for_distro() talks to ceph gitbuilders)
is useless and only worked because the only kernel we currently care
about and use in qa is 'basic' kernel. Remove the for i in set(...)
construct and only check install task (i.e. ceph) flavor.
Also, crucially, do not make an empty dict a kernel task config in
!kernel_hash (i.e. "do not install any kernel") case. This makes
kernel task install a default version of the kernel (branch master) on
all remotes.
Both of the above are partial reverts of commit 9968c366b17f ("Also
check install task's flavor when scheduling").
Ilya Dryomov [Wed, 17 Jun 2015 11:29:40 +0000 (14:29 +0300)]
suite: append flavor key only if kernel version is specified
There are three cases: a) don't install a kernel, b) install a distro
kernel or c) install a specified version. Appending 'flavor: basic' to
kernel task config in the former two cases is wrong. In case a)
appending flavor is not only bogus but also leads to bug: a { 'kernel':
{ 'flavor': 'basic' } } config confuses kernel task and it installs
a default version of the kernel (branch master) on all remotes when the
user's intent was to not install any kernel. As for case b), distro
kernels are built by distros and don't have flavors.
Fix this by appending 'flavor: basic' to kernel task config only in
case c).
Zack Cerza [Tue, 9 Jun 2015 19:55:18 +0000 (13:55 -0600)]
Move python-rados out of install and into nuke
Not all ceph branches contain python-rados; the original motivation for
mentioning it in the install task's package list was so that nuke would
remove it. There is another way, though, that doesn't affect the install
task's behavior at all (this is the way).
Loic Dachary [Mon, 1 Jun 2015 17:04:36 +0000 (19:04 +0200)]
expose the install._get_baseurl template in .teuthology.yaml
Instead of hardcoding the template used by _get_baseurl to build the URL
of the repository where packages are to be found, make it a
baseurl_template
configuration parameter in the teuthology.yaml file.
_update_rpm_package_list_and_install did not call _get_baseurl and hard
coded another template identical to the one used by _get_baseurl. The
only difference was {distro_release} instead of {dist} but they are
expected to be identical for rpm based distributions.
Ilya Dryomov [Thu, 28 May 2015 17:47:42 +0000 (20:47 +0300)]
kernel: recognize flavor key
Since commit 7da76fa78f63 ("Use kernel_flavor when polling
gitbuilders"), teuthology-suite appends 'flavor: basic' to kernel task
config. This broke all scheduled kernel suites, because
normalize_config() treats unknown keys as role types and when it
doesn't find a valid one it bails and returns {}, which means "do
nothing".
Fix this temporarily by adding flavor to a list of recognized keys.
This is wrong a bunch of levels, but it fixes a regression while
sticking to the way normalize_config() currently works.
Dan Mick [Tue, 21 Apr 2015 03:35:56 +0000 (20:35 -0700)]
lock.py: Add '--json-query' to allow complex search for --list/--brief
--json-query <file> or --json-query <string> allows filtering search
results conveniently; the JSON must be a dictionary that is a subset
of the lock record to be matched. The reason this was invented:
Find all VPSes on a particular vmhost:
fake_isfile was too simplistic. Instead of using the path string
to determine whether it's a file, consider it a file if the
corresponding value in the dict is None.
Ken Dreyer [Wed, 13 May 2015 17:07:55 +0000 (11:07 -0600)]
tests: set HOME env var
Travis CI's docs say that HOME is supposed to be set to /home/travis by
default, however, it also says "do not depend on this value":
http://docs.travis-ci.com/user/ci-environment/
Teuthology depends on the $HOME environment variable being set, and the
test suites that depended on this recently failed to build in Travis CI.
Set the var explicitly so it's always available for the tests.
Dan Mick [Tue, 12 May 2015 01:18:04 +0000 (18:18 -0700)]
lock.py: remove dead code trying to deal with locks
Without this, lock.py keeps trying to get at the key in
case it might need it later...but there's nothing that even
uses that information left, so it just causes a delay.
Andrew Schoen [Mon, 11 May 2015 15:26:22 +0000 (10:26 -0500)]
Adds methods to extract info on a package from koji task results.
Once you get the results of a koji task you can use these methods to
look for and extract information about a given package. If the package
is found it will return information about how to download and consume
the rpm generated by the task.
Andrew Schoen [Thu, 7 May 2015 21:18:25 +0000 (16:18 -0500)]
Adds packaging.get_koji_task_result, to query kojihub for a tasks result.
We need this because we want to be able to use scratch builds, which do
not generate a build ID. We can download the rpms we need by
retrieving the results of a task then looking at the list of rpms
it created.