Commit Graph

157 Commits

Author SHA1 Message Date
Zack Cerza
158f9ba1ff Revert "Lines formerly of the form '(remote,) = ctx.cluster.only(role).remotes.keys()'"
This reverts commit d693b3f895.
2014-03-27 11:35:28 -05:00
Warren Usui
d693b3f895 Lines formerly of the form '(remote,) = ctx.cluster.only(role).remotes.keys()'
and '(remote,) = ctx.cluster.only(role).remotes.iterkeys()' would fail with
ValueError and no message if there were less than 0 or more than 1 key.
Now a new function, get_single_remote_value() is called which prints out
more understandable messages.

Fixes: 7510
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-03-26 18:43:48 -07:00
Zack Cerza
73849c1179 Update safe_while's suggested usage pattern
I didn't love the way safe_while was encouraged to be used and it didn't
fit right with the new no-raising behavior. Now it's encouraged to be
used like this:

with safe_while() as proceed:
    while proceed():
        do_things()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-08 15:19:31 -06:00
Zack Cerza
ec38bd3cb3 Use safe_while's action arg
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-07 14:04:49 -06:00
Zack Cerza
7604a1b670 Update safe_while users to reflect new defaults
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-07 13:36:35 -06:00
Zack Cerza
4b11d072bf Mark this 'while True' loop with 'finite' comment
If we're going to embark on a mission to rid ourselves of
infinitely-looping while loops, it seems smart to start marking the ones
we've fixed in order to make grepping for unfixed loops easier.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-06 23:09:44 -06:00
Zack Cerza
20bfc97844 Give up on wait_until_healthy() after 15min
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-06 22:32:29 -06:00
Zack Cerza
e3f336d15b Make reconnect() use Remote.reconnect()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-20 17:46:08 -06:00
Zack Cerza
61e9ac4db5 Move reboot() to teuthology.misc
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-20 17:46:08 -06:00
Zack Cerza
74355e54e5 Add optional 'owner' arg to sudo_write_file()
This gets passed directly to chown as 'sudo chown $owner $file'

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-20 17:46:06 -06:00
Zack Cerza
dfe60526eb Add copy_file() to scp files between remotes
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-20 17:46:05 -06:00
Warren Usui
bee587c33d Added some docstrings.
Fixes: 7002
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-02-13 17:40:25 -08:00
Zack Cerza
427bf93c88 Fix PEP-8 linter complaints
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-01-28 09:54:54 -06:00
John Spray
9ff4d4a4e7 Fix FSID not being set in ceph.conf
Symptom was that 'ceph --admin-daemon... config get fsid'
returned zeros, while correct fsid was present in cluster maps.
Fix it by populating FSID in ceph.conf, after extracting it from
monmap.
2013-12-12 13:34:52 -08:00
Zack Cerza
3d6feb4b60 Merge pull request #151 from ceph/wip-distro-kernel
Wip distro kernel
2013-12-09 13:16:33 -08:00
Sandon Van Ness
c0297b436a Changes suggested per review.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-25 01:19:13 -08:00
Sandon Van Ness
c38eeec85f Allow ability to use multi machine type deliminated by ,- \t.
I was originally attempting a more complicated locking mechanism
but I think its almost as good to just have it attempt the other
machine type if one.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-21 14:19:44 -08:00
Sandon Van Ness
f0e01ad0e5 Distro kernel bug-fixes.
Fixed some things that were being done incorrectly.

Some distro kernels have no debug so added | true when disabling
kdb. Also changed what was skipping kernels if non-ubuntu to also
schedule kernel install if a distro kernel.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-08 14:35:51 -08:00
Sandon Van Ness
03f31c6caf Consolidate two excepts into one.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-08 11:02:48 -08:00
Sandon Van Ness
90161a371e Fixed errors. Tests pass.
Since the default OS version is different for each distro the
argument default is None instead of explicity set to a value
like with get_distro. Fixed some logic around that and the tests
making the arugment always take precidence.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-28 11:04:28 -07:00
Sandon Van Ness
d4a632df5f Support --os-version as argument.
You can use --os-type as an argument when not running teuthology
tests but instead just using teuthology-lock. This adds the ability
to also use --os-version so you can specify the version of the
distro without having to run an actual test with a yaml like you
normally would have had to do setting os_version in the yaml.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-25 17:48:50 -07:00
Zack Cerza
f5729051ab Fix a circular import
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-11 12:48:55 -05:00
Zack Cerza
8a11e4d053 Remove unused variables
(cherry picked from commit 581b6b3e977b99fc58fe25e66c933c65e38dc87c)
2013-09-26 14:01:56 -05:00
Zack Cerza
8497437003 Remove unused imports
(cherry picked from commit 586817481119c4fc4a39f8804e7871a43491e01f)
2013-09-26 14:01:37 -05:00
Zack Cerza
fad71073e2 Be less picky about trailing slashes. 2013-09-16 12:35:30 -05:00
Zack Cerza
31f0f7ad7e Fix get_http_log_path(), update callers, add tests 2013-09-12 17:28:50 -05:00
Zack Cerza
df4925703e Passing job_id to get_http_log_path() is optional 2013-09-11 13:47:49 -05:00
Zack Cerza
c1ba276321 Move get_http_log_path 2013-09-11 10:50:42 -05:00
Sage Weil
5acc57f5ad remove basedir/testdir distinction
We should never run with a conflicting testdir in the basedir, and the
code to do this is confusing and buggy.  Go back to a single testdir and
simple checks.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-10 10:53:41 -07:00
Sage Weil
9e03c73775 misc: valgrind: fix cd behavior
The cd needs to happen at the beginning of the command, not at the end, or
else the funky wrapper scripts don't work right.

This also cleans up the command line construction a bit so that it is more
flexible, explicit, and hopefully less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-06 16:09:27 -07:00
Sage Weil
19324c63d2 misc: valgrind: fix valgrind.supp path
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-06 16:09:27 -07:00
Zack Cerza
82cfa848b4 Get rid of chdir-coredump. 2013-09-06 17:11:44 -05:00
Sage Weil
2214fe1845 misc: valgrind --num-callers=50
Default is 12, which isn't quite enough.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-06 14:05:29 -07:00
Zack Cerza
53b8e27da9 Helper scripts live in /usr/local/bin now! 2013-09-06 15:10:11 -05:00
Zack Cerza
90f9a6ada1 Add get_archive_dir() 2013-09-05 16:55:37 -05:00
Zack Cerza
f744c4ce53 Catch CommandFailedError and print debug info 2013-09-03 14:40:31 -05:00
Sage Weil
3d64322cdb Revert "get_scratch_devices(): catch CommandFailedError, log "dev in use""
This reverts commit 416508de9c.

NameError: global name 'CommandFailedError' is not defined
2013-08-30 23:22:24 -07:00
Dan Mick
416508de9c get_scratch_devices(): catch CommandFailedError, log "dev in use"
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-30 15:42:53 -07:00
Zack Cerza
3981a8f1af Never use 'except:' without specifying an Exception. 2013-08-30 11:10:05 -05:00
Zack Cerza
71a77f2908 Add get_test_user(), because hardcoding is bad 2013-08-20 16:25:25 -05:00
Alfredo Deza
0a8a1c98b0 Merge pull request #41 from ceph/wip-3791
Various usability and documentation fixes
2013-08-19 14:10:18 -07:00
Zack Cerza
5bd7f620b8 Add comment about portability to get_testdir_base() 2013-08-19 09:59:54 -05:00
Warren Usui
694cd67048 Fix ARM releases to be quantal armv7l releases.
Made grub execution conditional and not done when ARM.
Use ctx parameter to change machine type to tala.
Fix kernel assignments when running ARM systems.

Fixes: #5000
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-08-16 15:44:54 -07:00
Warren Usui
47224f2da3 Revert "Fix ARM releases to be quantal armv7l releases."
This reverts commit aabfabc34c.
2013-08-16 15:01:01 -07:00
Warren Usui
aabfabc34c Fix ARM releases to be quantal armv7l releases.
Made grub execution conditional and not done when ARM.
Use ctx parameter to change machine type to tala.
Fix kernel assignments when running ARM systems.

Fixes: #5000
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-08-16 14:39:00 -07:00
Zack Cerza
c17a18efdc Don't assume the ubuntu user when getting the test dir. 2013-08-15 10:58:45 -05:00
Zack Cerza
3afc7d9b41 If get_testdir_base() exists, might as well use it... 2013-08-15 10:17:32 -05:00
Zack Cerza
63b64e2969 Don't bail if ~/.teuthology.yaml doesn't exist. 2013-08-14 14:48:45 -05:00
Zack Cerza
ebf476d390 Obligatory automatic vim whitespace cleanup commit 2013-08-14 14:46:22 -05:00
Loic Dachary
9d4104f45b do not check the jobid if check-locks is False
Because it relies on the lock server which is presumably not available
since check-locks was set to False. It matters when using teuthology
on a minimal installation.

http://tracker.ceph.com/issues/5946 fixes #5946

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-08-13 19:32:01 +02:00