Commit Graph

111 Commits

Author SHA1 Message Date
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
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
Sam Lang
72cbf1157a misc: Use job id and make short path for testdir
Nightlies run on teuthology currently use a testdir of
/home/ubuntu/cephtest, but this causes stale job errors occasionally
from the previous tests not getting properly cleaned up, which prevents
the nightlies from running successfully.

The misc.py get_testdir() function can specify a testdir that is
specific to the job, but previously the path was too long and would
cause separate job failures.

This patch does two things to resolve that.  First, it uses the job id
from the teuthology run if one exists.  This should be a relatively
short number that will identify the job run effectively.  Second,
if the job id isn't available, it creates a shortened form of the
job's name, for example the job name:

teuthology-2013-04-09_23:51:49-rgw-next-testing-basic

becomes:

te1304092351rntb

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-17 10:24:16 -05:00
Sam Lang
90e2a2ef02 misc: Fix close() call to pass in fd
fd is an int, we need to use os.close().

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-15 16:26:22 -05:00
Sam Lang
cde1429e13 misc: Fix bug in calling function remote_mktemp()
Changed the name of the function to get a remote temporary filename,
need to update all the locations where it gets called.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-15 16:16:34 -05:00
Sam Lang
fe513353c6 Merge pull request #11 from ceph/wip-4717
misc: Use tempfile.mkstemp() instead of tempnam
2013-04-15 11:44:59 -07:00
Sam Lang
3b0d91533e misc: Use tempfile.mkstemp() instead of tempnam
tempnam() is considered an unsafe security risk because the filename
generated is easy to guess and can be symlinked in advance.  Use
mkstemp() instead.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
2013-04-15 13:43:20 -05:00
Sam Lang
50aaece463 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-13 10:12:45 -05:00
Sam Lang
715245e100 misc: Fix name parsing
Use last two digits of year.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-12 19:04:19 -05:00
Sam Lang
a6b84a5613 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>
2013-04-12 12:57:33 -05:00
Sam Lang
fa2049ffbb misc: Use job id and make short path for testdir
Nightlies run on teuthology currently use a testdir of
/home/ubuntu/cephtest, but this causes stale job errors occasionally
from the previous tests not getting properly cleaned up, which prevents
the nightlies from running successfully.

The misc.py get_testdir() function can specify a testdir that is
specific to the job, but previously the path was too long and would
cause separate job failures.

This patch does two things to resolve that.  First, it uses the job id
from the teuthology run if one exists.  This should be a relatively
short number that will identify the job run effectively.  Second,
if the job id isn't available, it creates a shortened form of the
job's name, for example the job name:

teuthology-2013-04-09_23:51:49-rgw-next-testing-basic

becomes:

te1304092351rntb

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-04-11 13:53:38 -05:00
Joe Buck
4258807bfc teuthology: remove previous test ssh keys
Updated the ssh-keys task to cleanup
any left-over keys from previous tasks
(indicated by the user being 'ssh-keys-user').
Also, some of the functions in the ssh_keys task seem
like they could be useful in general.
This patch refactors them into misc.py.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewd-by: Sam Lang <sam.lang@inktank.com>
2013-04-04 15:55:54 -07:00
Sam Lang
13d0d5ab96 task/ceph_manager: Only reconnect if powercycled
We don't need to reconnect for remotes
that haven't been powercycled.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-13 11:15:51 -05:00
Sage Weil
0ad55b3604 cfuse -> ceph-fuse 2013-02-18 13:39:05 -08:00
Sage Weil
88ebc27f16 ceph: store logs in normal location
We need to switch around how these are compressed and pulled, since they
aren't in the regular archive dir anymore.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 13:39:05 -08:00
Sage Weil
d1d36241b7 ceph: use default data, keyring locations
This required reordering the cluster setup so that we do the ceph-osd
--mkfs --mkkey prior to gathering keys and initializing the monitors.

Also, run daemons as root.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 13:39:05 -08:00
Sage Weil
c9d3dea320 avoid secretfile, except for kclient
Only mount.ceph needs the secret in a standalone file.  Remove other users,
and simplify that one.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 13:39:05 -08:00
Sage Weil
eadefec8ff ceph: put client keyrings in /etc/ceph/ceph.$name.keyring
And make it world readable, for ubuntu's sake.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-18 13:39:04 -08:00
Sander Pool
c525e1061b Install ceph debs and use installed debs
The ceph task installs ceph using the debian
packages now, and all invocations of binaries installed
in {tmpdir}/binary/usr/local/bin/ are replace with
the use of the binaries installed in standard locations
by the debs.

Author:    Sander Pool <sander.pool@inktank.com>
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-02-18 13:39:03 -08:00
Sage Weil
7a5fd05edd misc: replace : with - in testdir name
The :'s break the list in $PATH.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-17 22:13:45 -08:00
Sam Lang
100e9056ed misc: Close connections on reboot
When nodes are rebooted, the connections remain open
even after calling reconnect and setting up new ssh
sessions to the rebooted nodes.  This causes ECONNRESET
errors to show up in the teuthology output.

Close the existing connections before trying to reconnect.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-02-05 16:20:52 -06:00
Josh Durgin
2f41f81dfa misc: don't use colon in default run name
LD_LIBRARY_PATH does not work with colons (and backslash does not escape them.)
2013-02-04 10:39:40 -08:00
Sam Lang
150a3d7d9e misc: Don't include existing partitions in devs
We don't want to include /dev/sda1, etc. in the
list of devices to use.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-02-01 10:53:47 -06:00
Sam Lang
64e3966779 misc: get_wwn_id_map() needs to return dict
If we can't find device ids, we need to return
a dict, not a list.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-02-01 09:13:48 -06:00