Install teuthology on centos 6.5

teuthology, a ceph test framework.

git clone https://github.com/ceph/teuthology.git

Dependency package on centos 6.5, and need install python 2.7(see the end)

yum install libvirt-devel libevent-devel mysql 
# Need install pip first, can find solution on "Install ceph on centos 6.5" 
pip install virtualenv

As always, create a virtualenv specific to teuthology and make sure it is activated before proceeding:

mkdir ~/.virtualenvs
virtualenv --system-site-packages ~/.virtualenvs/teuthology
source ~/.virtualenvs/teuthology/bin/activate

Make sure you are able to import libvirt without error:

python -c "import libvirt"

Finally, install the teuthology package and requirements.txt:

python setup.py develop
pip install -r requirements.txt

Hit a error when run teuthology:

(teuthology)[root@lab78 teuthology]# ~/.virtualenvs/teuthology/bin/teuthology targets.yaml noop.yaml
2014-08-10 20:50:50,618.618 WARNING:teuthology.report:No job_id found; not reporting results
2014-08-10 20:50:50,621.621 INFO:teuthology.repo_utils:Cloning https://github.com/ceph/ceph-qa-suite master from upstream
2014-08-10 20:50:53,680.680 INFO:teuthology.repo_utils:Resetting repo at /root/src/ceph-qa-suite_master to branch master
2014-08-10 20:50:53,681.681 CRITICAL:root:  File "/root/.virtualenvs/teuthology/bin/teuthology", line 9, in <module>
    load_entry_point('teuthology==0.1.0', 'console_scripts', 'teuthology')()
  File "/schooner/backup/xiaofeng/teuthology/scripts/run.py", line 8, in main
    teuthology.run.main(parse_args())
  File "/schooner/backup/xiaofeng/teuthology/teuthology/run.py", line 171, in main
    fetch_tasks_if_needed(ctx.config)
  File "/schooner/backup/xiaofeng/teuthology/teuthology/run.py", line 83, in fetch_tasks_if_needed
    suite_path = fetch_qa_suite(suite_branch)
  File "/schooner/backup/xiaofeng/teuthology/teuthology/repo_utils.py", line 167, in fetch_qa_suite
    enforce_repo_state(qa_suite_url, dest_path, branch)
  File "/schooner/backup/xiaofeng/teuthology/teuthology/repo_utils.py", line 39, in enforce_repo_state
    reset_repo(repo_url, dest_path, branch)
  File "/schooner/backup/xiaofeng/teuthology/teuthology/repo_utils.py", line 133, in reset_repo
    subprocess.check_output(

/schooner/backup/xiaofeng/teuthology/teuthology/run.py:36: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  if not exception.message:
2014-08-10 20:50:53,681.681 CRITICAL:root:AttributeError: 'module' object has no attribute 'check_output'

Solution: update python to 2.7

# https://bugs.launchpad.net/nova/+bug/1029014
    Replace subprocess.check_output with Popen

    The check_output method does not exist in python 2.6

A good blog for install 2.7 on centos 6: https://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/

Another blog for set python 2.7 as default python: blog.csdn.net/orangleliu/article/details/9415145

 

参考资料:
1. teuthology readme: https://github.com/AlfredChenxf/teuthology

2. HOWTO install Ceph teuthology on OpenStack: dachary.org/?p=2204

3. HOWTO run a Ceph Q&A suite: dachary.org/?p=2229

posted @ 2014-08-11 13:39  AlfredChen  阅读(1100)  评论(0编辑  收藏  举报