Commit Graph

133 Commits

Author SHA1 Message Date
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
Sandon Van Ness
88b7d02970 Fix for Debian wheezy (remove vda from block device list)
On debian wheezy its mount output uses device-by-label and makes
our normal method of checking if a device is mounted not work.
Since vm's will always be vda for their boot device we will just
remove it from devs if its in there so it doesn't attempt to zap
vda.

I also added a strip() to remove the last blank entry that was
always getting added to the devs list on all machines. Example:

devs=['/dev/sda', '/dev/sdb', '/dev/sdc', '/dev/sdd', '']

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Alfredo Deza <alfredo@deza.pe>
2013-08-01 12:33:11 -07:00
Sandon Van Ness
b9c7445b1b More changes for creating vms manually with lock (no config)
Needed some more changes to allow for the case of creating vm's
manually with teuthology-lock instead of letting teuthology handle
it in internal.py with lock_machines(). Just some additional checks
to go to defaults when ctx.config is non-existent (causes an
attributeerror).

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Warren Usui <warren.usui@inktank.com>
2013-07-29 17:07:31 -07:00
Sandon Van Ness
41cafb1a10 Merge remote-tracking branch 'origin/wip-sandon-vm'
Conflicts:
	teuthology/lock.py
	teuthology/misc.py
	teuthology/task/install.py
2013-07-25 19:50:02 -07:00
Sandon Van Ness
810cca1daf Added get_distro() to misc.py
Since getting the ostype is used multiple places I made a
function for it and modified the existing code to use
said function. I also added tests for the function.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-07-25 14:45:02 -07:00
Josh Durgin
42b9ea95da misc: move system type checking to a generic location
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-07-09 18:52:00 -07:00
Sage Weil
13dbe9d1a5 enable-coredump -> adjust-ulimits
and set max_files to be big, too!
2013-06-23 09:15:28 -07:00
Sandon Van Ness
d39d648ead Merge remote-tracking branch 'remotes/origin/wip-sandon-cephdeploy' 2013-06-21 15:53:53 -07:00
Sandon Van Ness
f6270a7fb0 Wipe out existing id_rsa.pub and id_rsa before pushing ssh keys
A very simple change. Just touch a file first (to create it if it
doesn't yet exist so the delete doesn't error out) and then delete
it before pushing the keys to the file. This should avoid the
id_rsa.pub and id_rsa files from getting messed up due to previous
runs which were interrupted or failed (or if those files exist for
some reason). This appears to be what was causing breaking in the
ceph-deploy nightlies.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-06-21 14:45:36 -07:00
Warren Usui
778d930d08 Fix to ignore ssh-key checking if running on virtual machines or
if a line that reads 'sshkey: ignore' is in the yaml file.

Fix #5364
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-06-19 11:12:09 -07:00
Warren Usui
1441707222 Make reset of ssh key code conditional on being a virtual machine.
Add and use is_vm to determine if we are running on a virtual machine.

Fix #5364
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-06-19 11:12:05 -07:00
Sage Weil
7887f84f9d misc: let clients use any pool
rados.py, for example, creates new pools for each instance.
2013-06-16 14:53:49 -07:00
Sage Weil
1ec8ba50fc no need for ceph --concise argument 2013-06-16 09:10:38 -07:00
Warren Usui
a4994e3bde Support added for running scheduled tasks on virtual machines.
This included:
    A). changes made so that full path names on some files were used
        (scheduled tasks started in different home directories).
    B.) Changes to insure tasks come up on the beanstalkc queue properly,
    C.) Finding and inserting the libvirt eqivalent code for vm machines
        in order to simulate ipmi actions,
    D.) Fix host key code, report valgrind issue more clearly.
    E.) Some message and downburst call changes.

    Fix #4988
    Fix #5122
    Signed-off-by: Warren Usui <warren.usui@inktank.com>
2013-06-07 19:32:15 -07:00
Josh Durgin
8f76d2ee13 Merge remote branch 'origin/next' 2013-05-01 09:52:02 -07:00
Josh Durgin
52742fb072 fix some errors found by pyflakes
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-04-30 17:09:19 -07:00
Josh Durgin
4979df32c5 misc: move daemon stopping function to a generic place
This will be useful for other daemons, like radosgw, in the future.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-04-30 16:35:11 -07:00
Sage Weil
4f70c898ef misc: default base_test_dir to /home/ubuntu/cephtest
This matches what the teuthworker is currently doing.
2013-04-30 09:15:37 -07:00
Sam Lang
a629e9eec4 Merge branch 'next'
Conflicts:
	teuthology/lock.py
	teuthology/lockstatus.py
	teuthology/misc.py
	teuthology/task/install.py
2013-04-17 18:09:39 -05:00
Sam Lang
77cf9f4b68 misc: Fix for case status['description'] == None
Skip the machine that has a description, but the
value is None.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Warren Usui <warren.usui@inktank.com>
2013-04-17 17:43:14 -05:00
Sam Lang
3f78cb0d3a misc: Check for 'None' string from yaml
The description attribute from the machines yaml returned by the
locker might be the string 'None'.  Need to explicitly check for
that to avoid using a test dir of /tmp/cephtest/None.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-17 10:36:42 -05:00
Sam Lang
750c69b08c misc: Check for 'None' string from yaml
The description attribute from the machines yaml returned by the
locker might be the string 'None'.  Need to explicitly check for
that to avoid using a test dir of /tmp/cephtest/None.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-17 10:30:57 -05:00
Sam Lang
1727d9b356 misc: Use pythonic 'is not None' for jobid case
The conditional 'if global_jobid:' evaluates to true
in some cases even when global_jobid is None.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-17 10:30:20 -05:00
Sam Lang
c1d47a2c63 misc: Fix name parsing
Use last two digits of year.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-17 10:30:02 -05:00
Sam Lang
b37f43db1b lock: Fix import cycle breakage
fa2049f caused an import cycle between lock.py and misc.py.  Move the
needed functions from lock.py to lockstatus.py so that we can avoid the
import cycle.

Signed-off-by: Sam Lang <sam.lang@inktank.com>

Conflicts:
	teuthology/lock.py
2013-04-17 10:28:55 -05:00