There's no need for an explicit cleanup function, so move it back
to where it came from (except in s3roundtrip, which did not have it).
Instead, since these use a nested contextmanager, pass through
and yield to the top-level run_tasks after the nested
contextmanager has finished (and thus run all the cleanup steps
in the subtasks for this test).
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Only split once, since radosgw will have client.X after it.
Monitors and MDSs may have names with more .s as well.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The upgrade tasks specify 'branch' in the job file, but the
schedule_suite.sh script sets a sha1 in the overrides. Make
the upgrade tests actually test an upgrade by preferring branch
over sha1 when both are specified.
This is fragile, but ought to do the trick for now!
Signed-off-by: Sage Weil <sage@inktank.com>
Test repair with more than 1 damaged object and with different types of damage
Regression test for bug #4778
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Purge removes logs, and we want to archive those, so explicitly shut down
all daemons before doing the archiving step.
Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>
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
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>
Purge will uninstall and (in so doing) stop the daemons. This avoids trying
to tar up the mon data or logs while they are being written to, which
avoids errors like
2013-04-16T20:21:47.103 INFO:teuthology.task.ceph-deploy:Archiving mon data...
2013-04-16T20:21:47.545 INFO:teuthology.orchestra.run.err:tar: ./ceph-mira089/store.db/000009.log: file changed as we read it
Also drop the unnecessary uninstall (it is implied by purge).
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4befae4fbe)
This reverts commit 67a616a979.
Sigh. As it turns out, /etc/default/grub being hacked also
causes the same problem. I think there's a way to fix that cleanly
as well, but until then, replacing the "accept installed version"
hack here so jobs can run.
This reverts commit 5995ae7e78.
With the changes to ceph-qa-chef and the teuthology kernel task,
we're no longer touching packaged file /etc/grub.d/10_linux, which
was the reason for this apt forcing. Remove so that we find other
package problems that might be masked by this; we can always
put it back if there are such problems until we can fix those as well.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit c2b0828b19)
We had been writing 01_ceph_kernel with the kernel title, and
relying on the fact that grub.cfg would never have submenus in it
(implemented by a hack to /etc/grub.d/10_linux which neutered its
submenu creation). However, that hack was modifying a package file,
and got in the way of later apt commands. Rather than doing it
that way, this divines the title of the submenu and sets the
default variable to "submenu>kernel", which works to select the
desired kernel.
It depends on there being only one level of submenu, and on the
format of the menuentry and submenu commands, dictated by grub2.
None of this is likely to work at all outside Ubuntu.
Fixes: #4496
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 52aec32a7d)
Change apt commands to prevent prompts from coming up (forcing
non-interactive mode) so things like grub or other stuff doesn't
break teuthology runs.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
If the lock request succeeds in updating the db, but the client gets a
timeout from apache, they can now try again and get back the machines
they just locked.
Only automatic runs have a description set when locking several
machines, so this does not affect users of teuthology-lock
--lock-many, where no description can be set in the same request.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Optional flag makes us suck down the archive (mostly, the logs, which
might be huge for some debugging tests) unless the test has failed.
Signed-off-by: Sage Weil <sage@inktank.com>
In cases where the mds thrasher continuously loops
waiting for an mds to be removed from the map, or
for a new mds to become active, we want to start logging
the mds state for debugging.
Signed-off-by: Sam Lang <sam.lang@inktank.com>