Teuthology常用的task
下面列举了一些常用的tasks,还有很多没列出来,可以自己去查看tasks。这也是这个系列的最后一篇了吧,其他,比如代码执行流程之类的,代码比较简单也有什么好写的了,如果有需要可以写一写。
CentOS下搭建Teuthology Ceph自动化测试平台(一)
CentOS下搭建Teuthology Ceph自动化测试平台(二)
CentOS下搭建Teuthology Ceph自动化测试平台(三)
CentOS下搭建Teuthology Ceph自动化测试平台(四)
CentOS下搭建Teuthology Ceph自动化测试平台(五)
Teuthology节点的部署——Ceph自动化测试平台(六)
Teuthology的使用与Ceph自动化测试用例的编写(一)
Teuthology的使用与Ceph自动化测试用例的编写(二)
Install
Install packages for a given project.
Install packages for a given project.
tasks:
- install:
project: ceph
branch: bar
- install:
project: samba
branch: foo
extra_packages: ['samba']
- install:
rhbuild: 1.3.0
playbook: downstream_setup.yml
vars:
yum_repos:
- url: "http://location.repo"
name: "ceph_repo"
Overrides are project specific:
overrides:
install:
ceph:
sha1: ...
Debug packages may optionally be installed:
overrides:
install:
ceph:
debuginfo: true
Default package lists (which come from packages.yaml) may be overridden:
overrides:
install:
ceph:
packages:
deb:
- ceph-osd
- ceph-mon
rpm:
- ceph-devel
- rbd-fuse
When tag, branch and sha1 do not reference the same commit hash, the
tag takes precedence over the branch and the branch takes precedence
over the sha1.
When the overrides have a sha1 that is different from the sha1 of
the project to be installed, it will be a noop if the project has
a branch or tag, because they take precedence over the sha1. For
instance:
overrides:
install:
ceph:
sha1: 1234
tasks:
- install:
project: ceph
sha1: 4567
branch: foobar # which has sha1 4567
The override will transform the tasks as follows:
tasks:
- install:
project: ceph
sha1: 1234
branch: foobar # which has sha1 4567
But the branch takes precedence over the sha1 and foobar
will be installed. The override of the sha1 has no effect.
When passed 'rhbuild' as a key, it will attempt to install an rh ceph build
using ceph-deploy
Reminder regarding teuthology-suite side effects:
The teuthology-suite command always adds the following:
overrides:
install:
ceph:
sha1: 1234
where sha1 matches the --ceph argument. For instance if
teuthology-suite is called with --ceph master, the sha1 will be
the tip of master. If called with --ceph v0.94.1, the sha1 will be
the v0.94.1 (as returned by git rev-parse v0.94.1 which is not to
be confused with git rev-parse v0.94.1^{commit})
Upgrades packages for a given project
Upgrades packages for a given project. example: {cmd_parameter} = ceph_deploy_upgrade
For example::
tasks:
- install.{cmd_parameter}:
all:
branch: end
or specify specific roles::
tasks:
- install.{cmd_parameter}:
mon.a:
branch: end
osd.0:
branch: other
or rely on the overrides for the target version::
overrides:
install:
ceph:
sha1: ...
tasks:
- install.{cmd_parameter}:
all:
(HACK: the overrides will *only* apply the sha1/branch/tag if those
keys are not present in the config.)
It is also possible to attempt to exclude packages from the upgrade set:
tasks:
- install.{cmd_parameter}:
exclude_packages: ['ceph-test', 'ceph-test-dbg']
ceph
Set up and tear down a Ceph cluster
Set up and tear down a Ceph cluster.
For example::
tasks:
- ceph:
- interactive:
You can also specify what branch to run::
tasks:
- ceph:
branch: foo
Or a tag::
tasks:
- ceph:
tag: v0.42.13
Or a sha1::
tasks:
- ceph:
sha1: 1376a5ab0c89780eab39ffbbe436f6a6092314ed
Or a local source dir::
tasks:
- ceph:
path: /home/sage/ceph
To capture code coverage data, use::
tasks:
- ceph:
coverage: true
To use btrfs, ext4, or xfs on the target's scratch disks, use::
tasks:
- ceph:
fs: xfs
mkfs_options: [-b,size=65536,-l,logdev=/dev/sdc1]
mount_options: [nobarrier, inode64]
Note, this will cause the task to check the /scratch_devs file on each node
for available devices. If no such file is found, /dev/sdb will be used.
To run some daemons under valgrind, include their names
and the tool/args to use in a valgrind section::
tasks:
- ceph:
valgrind:
mds.1: --tool=memcheck
osd.1: [--tool=memcheck, --leak-check=no]
Those nodes which are using memcheck or valgrind will get
checked for bad results.
To adjust

本文详细介绍了Teuthology中常用的tasks,包括Install、ceph、interactive和rados等,用于Ceph集群的自动化测试。Teuthology提供设置与拆卸Ceph集群、等待daemon故障、管理ceph进程等功能,辅助进行Ceph自动化测试。
最低0.47元/天 解锁文章
1281

被折叠的 条评论
为什么被折叠?



