Sam Lang [Wed, 1 May 2013 15:56:04 +0000 (10:56 -0500)]
task/cifs-mount.py: Task for mounting cifs
The cifs-mount task mounts a smb endpoint from the
first available smbd server (the samba.0 role). This
task is similar to the ceph-fuse task, file system
tests can be run on the resulting mount point.
Sam Lang [Wed, 1 May 2013 15:55:53 +0000 (10:55 -0500)]
task/samba.py: Samba task to setup/start smbd
The samba task sets up samba on all 'samba' roles
with ceph as the backend storage module. The task
creates a smb.conf file that points to ceph, and
starts smbd.
Sam Lang [Thu, 2 May 2013 15:49:50 +0000 (10:49 -0500)]
task/daemon-helper: Add nostdin option
Some daemons (smbd) will try to read from stdin and check if its a
socket, using that for sending/receiving messages. If /dev/null is
used for stdin, the daemon aborts. This patch adds a 'nostdin' option
to the daemon-helper so that the daemon can be started without /dev/null
as stdin.
Sam Lang [Wed, 1 May 2013 15:55:38 +0000 (10:55 -0500)]
task/install.py: Allow installation of non-ceph
Generalizes the install task to specify a "project" which defaults to
'ceph', but can be configured to install different project packages,
for example:
install:
project: samba
extra_packages: samba
The default install task uses 'ceph' as the project, and relies on an
existing set of defined packages to install. For other projects, the
packages to be installed must be specified with the extra_packages
field. Multiple install tasks can be specified:
Warren Usui [Wed, 1 May 2013 03:40:22 +0000 (20:40 -0700)]
Fix teuthology installations on physical Centos machines.
Yum installs of packages specify a pacakge number. Initial
install of yum source changed to not fail if already done.
Added yum cleans where necessary.
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).
Sage Weil [Sun, 28 Apr 2013 16:35:45 +0000 (09:35 -0700)]
install: prefer 'branch' over 'sha1'
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!
Sam Lang [Wed, 17 Apr 2013 00:08:45 +0000 (19:08 -0500)]
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.
Sam Lang [Fri, 12 Apr 2013 17:55:54 +0000 (12:55 -0500)]
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
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.
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.
Sam Lang [Wed, 17 Apr 2013 00:08:45 +0000 (19:08 -0500)]
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.
Sam Lang [Fri, 12 Apr 2013 17:55:54 +0000 (12:55 -0500)]
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
Sam Lang [Thu, 11 Apr 2013 14:23:10 +0000 (09:23 -0500)]
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:
Sage Weil [Wed, 17 Apr 2013 03:50:50 +0000 (20:50 -0700)]
ceph-deploy: purge before archiving
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).
Sage Weil [Wed, 17 Apr 2013 03:50:50 +0000 (20:50 -0700)]
ceph-deploy: purge before archiving
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).
Sam Lang [Fri, 12 Apr 2013 20:52:47 +0000 (15:52 -0500)]
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>
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.
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.
Dan Mick [Tue, 9 Apr 2013 22:53:49 +0000 (15:53 -0700)]
kernel.py: put submenu name in 01_ceph_kernel if necessary
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 52aec32a7da07ca6e9a22ecedde78dafb4b74dfc)
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.
Sam Lang [Fri, 12 Apr 2013 17:55:54 +0000 (12:55 -0500)]
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.
Dan Mick [Tue, 9 Apr 2013 22:53:49 +0000 (15:53 -0700)]
kernel.py: put submenu name in 01_ceph_kernel if necessary
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>
Sam Lang [Thu, 11 Apr 2013 14:23:10 +0000 (09:23 -0500)]
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:
This is a fix for issue #4677 which was caused by kdb output being
hard-coded to ttyS1 which is fine for all our hardware except mira
machines. This change just checks to see if mira is in the host's
name and uses ttyS2 instead (simple fix).
Joe Buck [Wed, 20 Mar 2013 04:26:16 +0000 (21:26 -0700)]
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>
Downburst create is used to reinstall a VM when it is locked.
Downburst destroy is used to remove a VM when it is unlocked.
Host keys are regenerated on each vm instantiation, so the keys
need to be checked prior to use.
If needed, qa-ceph-chef is run on newly installed systems to insure that
they are fully functional.