tempest
TRANSCRIPT
![Page 1: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/1.jpg)
OpenStackTempestを動かしてみた
Tsutomu Takekawa2012.06.12
13年6月12日水曜日
![Page 2: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/2.jpg)
• Tempestとは?
• 実行までの流れ• Tempestの内容
• 課題
目次
2
13年6月12日水曜日
![Page 3: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/3.jpg)
• Tempestとは?
• OpenStackプロジェクトの一つhttps://github.com/openstack/tempest
• 自動テストツール• OpenStackデプロイ環境の不具合を発見
• リリース前のチェック機構として重要
3
13年6月12日水曜日
![Page 4: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/4.jpg)
Tempest実行までの流れ
• gitからtempestを取得git clone https://github.com/openstack/tempest.git
• tempest/etc/tempest.configの設定https://github.com/openstack/tempest/blob/master/etc/tempest.conf.sample
https://github.com/takekawa/tempest_test/blob/master/tempest.conf
• テストの実行cd tempest
./run_test.sh
4
13年6月12日水曜日
![Page 5: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/5.jpg)
テスト実行例https://raw.github.com/takekawa/tempest_test/master/testresult.txt
5
~/tempest$ ./run_tests.sh -ltempest.api.compute.admin.test_aggregates.AggregatesAdminTestJSON.test_aggregate_add_host_as_user[gate,negative] ... oktempest.api.compute.admin.test_aggregates.AggregatesAdminTestJSON.test_aggregate_add_host_create_server_with_az[gate] ... oktempest.api.compute.admin.test_aggregates.AggregatesAdminTestJSON.test_aggregate_add_host_get_details[gate] ... oktempest.api.compute.admin.test_aggregates.AggregatesAdminTestJSON.test_aggregate_add_host_list[gate] ... ok....tempest.api.compute.admin.test_quotas.QuotasAdminTestJSON.test_create_server_when_cpu_quota_is_full[gate] ... SKIP: This test require the change in nova component https://review.openstack.org/#/c/25887/, the related bug is https://bugs.launchpad.net/nova/+bug/1160749 once the change is merged I will enable this testcasetempest.api.compute.admin.test_quotas.QuotasAdminTestJSON.test_create_server_when_instances_quota_is_full[gate,negative] ... SKIP: This test require the change in n
....======================================================================FAIL: tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basicops----------------------------------------------------------------------_StringException: Traceback (most recent call last): File "/home/takekawa/tempest/tempest/scenario/test_server_basic_ops.py", line 151, in test_server_basicops % thing)AssertionError: <Server: instance860185532> failed to get to expected status.In ERROR state.
-------------------- >> begin captured logging << --------------------requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 192.168.108.130requests.packages.urllib3.connectionpool: DEBUG: "POST /v2.0/tokens HTTP/1.1" 200 3132requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 192.168.108.130requests.packages.urllib3.connectionpool: DEBUG: "POST /v2/2f314b484e4b4b749511ba1e52badc59/servers HTTP/1.1" 202 446requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 192.168.108.130requests.packages.urllib3.connectionpool: DEBUG: "GET /v2/2f314b484e4b4b749511ba1e52badc59/servers/240a7a16-b40b-41bf-9ac3-84797a489062 HTTP/1.1" 200 1230tempest.test: DEBUG: Adding <Server: instance860185532> to shared resources of TestServerBasicOpsrequests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 192.168.108.130requests.packages.urllib3.connectionpool: DEBUG: "GET /v2/2f314b484e4b4b749511ba1e52badc59/servers/240a7a16-b40b-41bf-9ac3-84797a489062 HTTP/1.1" 200 1289--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------Ran 750 tests in 2307.401s
FAILED (SKIP=62, errors=71, failures=31)
13年6月12日水曜日
![Page 6: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/6.jpg)
Tempestの内容
• テストフィールドhttps://github.com/openstack/tempest/tree/master/doc/source/field_guide
• api - API tests
• cli - CLI tests
• scenario - complex scenario tests
• stress - stress tests
• thirdparty - 3rd party api tests
• whitebox - white box testing
• nosetests のテスト集
• api,scenario,cli, whitebox,thridparty
• テストスクリプト• stress6
13年6月12日水曜日
![Page 7: Tempest](https://reader035.vdocuments.site/reader035/viewer/2022080214/55a990e61a28ab3f608b467c/html5/thumbnails/7.jpg)
課題• 単一環境(DevStack)のみ発生するエラーが存在• APIのrate-limitの上限を越える場合あり
(rate-limitを無効にするか、数値を増やす)• テスト時間がながい場合がある
run_test.shだと30分だったが、nosetestsでを実行した際、5時間くらいかかった⇒何故?
• テスト出力大きすぎ。ざっくり2万行 ⇒ Jenkins等で制御するとみやすくなる
• ドキュメント不足⇒ コード読む。メソッド名がたより?
7
使いこなすには慣れが必要
13年6月12日水曜日