Commit Graph

2957 Commits

Author SHA1 Message Date
Andrew Schoen
8d762af73e add a reference so we can link installation and setup from readme
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-08 12:49:48 -06:00
Zack Cerza
8c904a1f5f Merge pull request #370 from andrewschoen/docopt-run
refactor of teuthology.run
2014-12-08 11:40:07 -07:00
Andrew Schoen
59c373c0c8 fixing some docs
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-08 10:59:12 -06:00
Andrew Schoen
c3d9d91a49 Replaced the TeuthologyConfig instance in FakeNamespace with a dict, all the tasks expect that to be a dict
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
a6a7261dba Fixed a bug where I wasn't setting machine_type correctly. Also, made
local variables for each of the keys in args to help readability.

Wrote tests for teuthology.run.main. Coverage increased to 94%

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
0cf22e0849 modified __getattr__ for FakeNamespace so that it raises AttributeError on a missing attr. This allows a FakeNamespace instance to work correctly with getattr(). Also removed .get() from YamlConfig as we decided it was unnecessary
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
c38855579f simple documentation update
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
d3f3b786ea Various bug fixes while running tests on this branch in the octo lab.
Made YamlConfig work more closely like a dictionary by extending
collections.MutableMapping.  It still needs some work to be able to be
used interchangeably with a dict - most noteably with yaml.safe_dump.

Decided to just use a dict instead of JobConfig for args['<config>'].
Too many other codepaths are assuming that config is a dict.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
f4605e04f3 Ports the teuthology.run command to docopt instead of argparse.
This is a pretty massive refactor to make the code more testable as
well. The coverage on teuthology.run was increased from 0% to 86% and
the overall project coverage increased to 24%.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
9c9cf9bced Creates a merge_configs function in teuthology.misc that will be used
by run and schedule, nuke will need this eventually as well.  The old
way of doing this was too tightly coupled with argparse.  Wrote some
tests around the new function; increased coverage on misc by 4%.

Random lint fixes as well.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
0d5f1249b3 Adds a FakeNamespace object to teuthology.config that mimics
what an argparse Namespace looks like when teuthology.misc.read_config
is used on it.  This allows us to refactor our commands to use docopt
but still all all the tasks to be passed one big namespace.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Andrew Schoen
fa35faa6ab port the argument parsing for teuthology.run to docopt
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-06 13:46:47 -06:00
Sandon Van Ness
e94701b788 Minor change for distro kernel bug.
forgot to break from the loop. I guess I was mainly testing git
kernels and not distro when I did this before.

Signed-off-by: Sandon Van Ness <sandon@redhat.com>
2014-12-05 11:18:54 -08:00
Zack Cerza
479a275a83 Merge pull request #380 from ceph/wip-kernel-fixes-rebase
Various bug-fixes with kernel installs.
2014-12-04 17:10:06 -07:00
Sandon Van Ness
c926186d03 Various bug-fixes with kernel installs.
Fixed a typo causing grub list to not incrament and other issues
with finding a reliable uname string via inspecting RPM directly.

Signed-off-by: Sandon Van Ness <sandon@redhat.com>
2014-12-04 15:23:35 -08:00
Zack Cerza
760ff2fab5 Merge pull request #378 from ceph/wip-opsys
Add OS.codename
2014-12-04 15:56:29 -07:00
Zack Cerza
fff64a540e Merge pull request #379 from andrewschoen/worker-tests
increases test coverage on teuthology.worker
2014-12-04 15:31:08 -07:00
Andrew Schoen
52ae86fea4 adds 50% test coverage to teuthology.worker without any changes to teuthology.worker itself
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-04 15:32:22 -06:00
Zack Cerza
202c70f0c4 Add OS.codename
The codename can be reliably set by parsing
platform.linux_distribution() or lsb_release -a. We now default to
trying the former first.

Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-04 13:57:14 -07:00
Zack Cerza
6a269dfa43 Merge pull request #375 from ceph/wip-dmick
A bunch of little fixes found during addition of calamari_nosetest task
2014-12-04 13:03:24 -07:00
Zack Cerza
fc8160b19a Merge pull request #376 from ceph/wip-sha-compare-fix
kernel: fix commit hash matching in need_to_install()
2014-12-04 13:02:46 -07:00
Zack Cerza
3b6379754b Merge pull request #377 from ceph/wip-kill-fixes
Two minor teuthology-kill fixes
2014-12-04 13:01:53 -07:00
Ilya Dryomov
e0399a0773 No need to invoke teuthology-nuke if there is nothing to nuke
Slipped in with 26803da18d ("Rewrite portions of teuthology.kill").

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2014-12-04 20:29:28 +03:00
Ilya Dryomov
02e5006626 Don't fetch owner info from job_info when --owner given
Commit 293c2bd49c ("Be more informative if owner info is missing")
introduced --owner but it is still pulled from job_info no matter what.
Fix it.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2014-12-04 20:29:28 +03:00
Ilya Dryomov
10d7f9095f kernel: fix commit hash matching in need_to_install()
We don't need to install a new kernel if the "want" (version) commit
hash and the "have" (cur_sha1) commit hash match but the former is
shorter than the latter.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2014-12-04 11:02:52 +03:00
Dan Mick
0d6d0975e6 misc.append_lines_to_file: respect sudo
Fixes: #10239
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 17:02:48 -08:00
Dan Mick
36fd0df96c misc.create_file: if sudo, must sudo for chmod as well.
Fixes: #10238
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 17:02:48 -08:00
Dan Mick
ef12e5f9a5 misc.get_system_type(): fix distro=False version=True, add comments
Fixes: #10237
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 17:02:48 -08:00
Dan Mick
3549421d6e orchestra/run.py: document use of Raw()
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 17:02:48 -08:00
Dan Mick
7847e3f57c packaging.py: Use misc.get_system_type()
Dump _get_relmap() and _RELEASE_MAP in favor of common code.
Also remove the repo management stuff; it was only used by the
now-obsolete calamari task.

Fixes: #10236
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 17:02:44 -08:00
Dan Mick
56d752af8b Remove obsolete calamari task
Fixes: #10235
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 15:44:16 -08:00
Dan Mick
29247e8a37 packaging.py: import misc as misc, not teuthology
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2014-12-03 15:29:46 -08:00
Zack Cerza
ff126cc98a Merge pull request #374 from andrewschoen/orchestra-test
test improvements
2014-12-03 13:47:30 -07:00
Andrew Schoen
e4e34e2f7b moved all the cluster.write_file tests into their own class; rewrote the existing test to have one assertion per test case
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-03 14:36:23 -06:00
Zack Cerza
8b2dd5f639 Merge pull request #373 from andrewschoen/orchestra-test
added a test for teuthology.orchestra.cluster.write_file
2014-12-03 13:19:35 -07:00
Zack Cerza
f4a9d162ce Refuse to schedule against missing suite branches
Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-03 13:12:14 -07:00
Andrew Schoen
4f9a552c16 removed fudge and unneeded asserts
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-03 13:16:23 -06:00
Andrew Schoen
285f54711a added a test for teuthology.orchestra.cluster.write_file
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-12-03 13:06:30 -06:00
Andrew Schoen
40cea27fc3 Merge pull request #372 from ceph/wip-10034-wusui
Added calamari-server
2014-12-03 12:20:56 -06:00
Zack Cerza
ba365083fa Merge pull request #366 from dachary/wip-10170-write-file
fix Cluster::write_file extra argument & support owner
2014-12-03 10:37:13 -07:00
Warren Usui
f493c0b4ab Added calamari-server
Calamari-server has been added to the list of installed packages
to be removed.  Also added salt-common and salt-minion to the list
of rpms to be removed.

Fixes #10034
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-12-03 09:16:02 -08:00
Zack Cerza
a6a8946c54 Merge pull request #371 from ceph/docs
Add autogenerated API docs to Sphinx output
2014-12-02 15:12:19 -07:00
Zack Cerza
e6933f6cbe Add autogenerated API docs to Sphinx output
Also drop -W for now. We'll have to focus on PEP-257 stuff later.

Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-02 14:57:44 -07:00
Zack Cerza
38c0e796f0 Merge pull request #369 from ceph/docs
Add lab setup docs
2014-12-02 14:07:45 -07:00
Zack Cerza
e76a681bea Reorganize documentation and Sphinx files
This should allow a more consistent experience between reading
Sphinx-generated HTML docs and just using GitHub's renderer.

Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-02 09:37:14 -07:00
Zack Cerza
933f7dcf53 Add docs to tox envlist
So PRs don't break documentation

Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-01 14:37:59 -07:00
Zack Cerza
40e661ab73 Remove fancy source file handling
Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-01 14:37:59 -07:00
Zack Cerza
c1ab48d901 Add stub source files linking to canonical documents
Now we can drop the Makefile magic.

Signed-off-by: Zack Cerza <zack@redhat.com>
2014-12-01 14:37:59 -07:00
Zack Cerza
e14dac3c7a Merge pull request #360 from andrewschoen/docopt-ls
port teuthology-ls to use docopt instead of argparse
2014-11-25 15:32:57 -07:00
Andrew Schoen
871a84bb1c adding tests for teuthology.ls, coverage now at 88%
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2014-11-25 16:22:20 -06:00