aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability
AgeCommit message (Collapse)AuthorFilesLines
2017-06-01Imporve monitor_process pass criteriaJingLu57-15/+37
JIRA: YARDSTICK-660 The monitor func()'s criteria in the monitor_process.py now is whether at least one process of the specific controller node service is recovered. But in reality is more resonable to use whether processes have been recoverd to it's original amount. This patch is aiming at improving the isssue Change-Id: I950ce2a89555801b96092735b0d670e892049927 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 37921fcd232cd2fbba9f45ef9fa5d8c912f54af6)
2017-06-01Add a new monitor type: MultiMonitor that can run any number of other ↵LiHuan2-0/+78
monitors at the same time. JIRA: YARDSTICK-397 Change-Id: Ic5cb79f0820029e306373abead1ea43fac9abee2 Signed-off-by: LiHuan <lihuanwk@126.com> (cherry picked from commit 747a3260fef52fb5f7da337bc149ec202a05be6e)
2017-05-06Bugfix: Support HA test cases in TripleOJingLu59-23/+48
Change-Id: Ib1f6f45677e66ca88fb546ea0662f52588e9d336 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 67da8f2ddb5cbf14bbf0df48b10240ba6ebadbe9)
2017-05-04Bugfix: Local Openstack Operation in HA test frameworksdanube.2.RC1danube.2.0tjuyinkanglin3-40/+104
JIRA: YARDSTICK-635 Change-Id: Ic27517714db9325e7a3b1ef623c49af61c36b2b5 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn> (cherry picked from commit 2fb95fbb9380ea7ce92dcb32cd2f0789b9f91bdc)
2017-05-04standardize ssh authRoss Brattain8-59/+19
we need to be following defautl paramiko rules, first use pkey, then key_filenames (autodetecting ~/.ssh/ keys), then password We have too much boilerplate redudant code everywhere, we need to standardize on a factory function that takes a node dict. Using Python3 ChainMap we can layer overrides and defaults. VNF descriptors have to default key_filename, password to Python None. The only way to do this is to omit key values if the variable is not defined, this way the dict will not have the value and it will default to Python None Add python2 chainmap backport Updated unittest mocking to use ssh.SSH.from_node Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 99abbb424007da2e01762f3c040a39c0157cbe1f)
2017-05-04attacker_general: fix logging to use %sRoss Brattain1-11/+10
Change-Id: Ib451d7883eb5df13cfe95477cea43c076ac0452a Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 45f46d5220cbfa89224d55caf94a079fccd2679f)
2017-05-04Modify HA test cases and HA test script to support other installerstjuyinkanglin3-6/+0
JIRA: YARDSTICK-633 Change-Id: I65fd1ba11504dc61485f83c3bcc93bec4d41883b Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn> (cherry picked from commit 27cc0643cf93f4b44c12fbdfcc3e0841d46214c4)
2017-05-04Merge "fix ha issue when run tc050~tc054 in ci" into stable/danubeJing Lu2-9/+12
2017-05-04fix ha issue when run tc050~tc054 in cirexlee87762-9/+12
JIRA: YARDSTICK-634 Change-Id: I46681c7e8afe391eef9c5309470028167e911950 Signed-off-by: rexlee8776 <limingjiang@huawei.com> (cherry picked from commit 71bbbdb18b5f8621b8b4ed9aa0e4fcc1e8882085)
2017-05-04Bugfix: fix HA test case tc046JingLu53-3/+11
The original way to kill keystone service didn't work anymore. this patch uses killall -u to kill keystone processes. Change-Id: I553b716f17a5ab7e57630468517642a92f06dd27 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 909606466c50aab19017b6e6cedd3e213aff7c27)
2017-05-04operation_general: fix logging to use %sRoss Brattain1-1/+1
Change-Id: I1b37cbf07e8858ca3e75bb74c57fe84485ff4989 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 37f600566c56542999529da47299c4caf54d073a)
2017-05-04Merge "Bugfix: fix HA testcases" into stable/danubeJing Lu3-11/+3
2017-05-04Bugfix: fix HA testcasesJingLu53-11/+3
Change-Id: Ic930c59fcf3d7e53d385016051596b6563dca0d7 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 01261850ea2ea2cb92572c9cfcb2c64bfafe9cbe)
2017-05-04bugfix: fix HA testcasesJingLu51-1/+1
Change-Id: Ib38e94610a108ff7195cefdfaf048e0f4fd894e8 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 6604cb5f2d6e3c819cb8488f1ad3468184822cf9)
2017-02-17Update missing license headersDeepak S4-0/+32
Change-Id: I063fd37fe25754c94d164ae5a209d15b69322093 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-02-14Update Openstack CLI Command in yardstick ha test framework configuration ↵tjuyinkanglin2-2/+2
files and TC052 JIRA: YARDSTICK-547 Change-Id: Idde2dc56436c9cf4b8696bfd0056ab4e47c97c9a Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2017-02-07more logging fixesRoss Brattain3-23/+21
don't use .format() with logging, use regular %s logginer formatter Change-Id: I1ce0d81cc3f81c35003ef453e82c57faeb46c49f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-16Use """ to replace ''' in docstringchenjiankun7-9/+9
JIRA: YARDSTICK-525 For consistency, we always use """triple double quotes""" around docstrings. Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-12Add support for Python 3Ross Brattain16-21/+50
Porting to Python3 using Openstack guidelines: https://wiki.openstack.org/wiki/Python3 This passes unittests on Python 3.5 and passes opnfv_smoke suite Updates: use six for urlparse and urlopen fix exception.message attribute removal run unittests on python3 use unitest.mock on python 3 fix open mock for vsperf fix float division by using delta/eplison comparison use unicode in StringIO use plugin/sample_config.yaml relative path from test case fixed apexlake unittests upgraded to mock 2.0.0 to match python3 unittest.mock features fixed flake8 issues implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes() implement safe unicode encode/decode with oslo_utils.encodeutils heat: convert pub key file from bytes to unicode pkg_resources returns raw bytes, in python3 we have to decode this to utf-8 unicode so JSON can encode it for heat template JIRA: YARDSTICK-452 Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-05use context manager for stdin files and use _put_file_shellRoss Brattain8-58/+77
requires https://gerrit.opnfv.org/gerrit/#/c/25183/ use new ssh method _put_file_shell to upload files. We have to use _put_file_shell because we rely on ~/ path expansions. Eventually we should move to remote absolute paths so we can use sftp upload. For ssh.execute() replace open() with context manager context managers were invented partly to control freeing resources. Opening files without closing them will leak file descriptors. The old standard method for closing files: f = open('data.txt') try: data = f.read() finally: f.close() was replaced with a context manager with open('data.txt') as f: data = f.read() Reference: Raymond Hettinger's Pycon 2013 presentation: https://speakerdeck.com/pyconslides/transforming-code-into-beautiful-idiomatic-python-by-raymond-hettinger-1 Video: https://youtu.be/OSGv2VnC0go?t=2522 Always use context managers for files Update: rebased now that _put_file_shell was merged Change-Id: Iabfc0e43aa3b7766d7c658115e13d21c31efb2a9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-30switch logging to proper usageRoss Brattain16-47/+47
The logging methods do string interpolation themselves From the reference: https://docs.python.org/2/library/logging.html#logging.Logger.debug Logger.debug(msg, *args, **kwargs) Logs a message with level DEBUG on this logger. The msg is the message format string, and the args are the arguments which are merged into msg using the string formatting operator. (Note that this means that you can use keywords in the format string, together with a single dictionary argument.) There are two keyword arguments in kwargs which are inspected: exc_info which, if it does not evaluate as false, causes exception information to be added to the logging message. If an exception tuple (in the format returned by sys.exc_info()) is provided, it is used; otherwise, sys.exc_info() is called to get the exception informatio The reason logging does string interpolation itselfs is to implement deferred interpolation. String interpolation involves evaluating arguments, so it can introduce significant computation. The logging module tries to be smart about deferring interpolation until the last possible moment. The logging methods check isEnabledFor for the log level and won't interpolate if the level is not enabled. https://github.com/python/cpython/blob/2.7/Lib/logging/__init__.py#L1178 def warning(self, msg, *args, **kwargs): if self.isEnabledFor(WARNING): self._log(WARNING, msg, args, **kwargs) logging actually waits to interpolate the string in LogRecord.getMessage() https://github.com/python/cpython/blob/2.7/Lib/logging/__init__.py#L328 if self.args: msg = msg % self.args Change-Id: Ie09efe0a66881e19bd8119caa376075e605627a2 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-10add option to connect to non-standard ssh portRoss Brattain8-11/+27
not all enviroments have port 22 enabled for SSH. In particular for network isolation NAT and port forwarding may be used. example pod.yaml: nodes: - ip: 10.2.45.145 name: node1 password: '' role: Controller ssh_port: 5000 user: root - ip: 10.2.45.145 name: node2 password: '' role: Controller ssh_port: 5001 user: root - ip: 10.2.45.145 name: node3 password: '' role: Controller ssh_port: 5002 user: root JIRA: YARDSTICK-407 Change-Id: I8f9d6e388f31d291dd15cb900d7f71f347e41ef6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-08-19bugfix: serviceha do not provide result to influxdbrexlee87761-0/+4
JIRA: YARDSTICK-320 Change-Id: I94cdc2cc9f4f356484d49916d2c67bac61e38967 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-08-01Merge "Create Bash Sheel Utilities"liang gao7-0/+99
2016-07-29Create Bash Sheel Utilities for TC052tjuyinkanglin5-1/+63
JIRA: YARDSTICK-277 Change-Id: I4837ec865e73c3a77cd5edc076be15f3a0695617 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2016-07-29Create Bash Sheel Utilitiestjuyinkanglin7-0/+99
JIRA: YARDSTICK-277 Change-Id: I7379d4fe375d22e544ab93b48d56a017a60c4b9f Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2016-07-26Merge "Create Bash Sheel Utilities for TC054"liang gao2-0/+19
2016-07-25Create Bash Sheel Utilities for TC054tjuyinkanglin2-0/+19
JIRA: YARDSTICK-277 Change-Id: I723bc6e0d054020831a8e9f743f20e51d937e4dc Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2016-07-25Code Clean for HA Testing Frameworktjuyinkanglin4-4/+10
JIRA: YARDSTICK-272 Change-Id: Icf41642fe0c31584f92c68cc9f97fa3f1e90b66e Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2016-07-18code clean uptjuyinkanglin4-8/+8
JIRA: YARDSTICK-272 Change-Id: Id2f1b3d1beff8843700cdfcaaa1e8f496f445ed9 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2016-07-08Creating Director and related codes.lihuan5-1/+273
Add a new scenario type 'ScenarioGeneral' that support orchestrating general HA test scenarios. Director, ActionPlayer and RollbackPlayer are uesed to execute the test scenario (or test flow). JIRA: YARDSTICK-288 Change-Id: Ied2ccd4712f3c3efde6771bfa4538c1e9e137c11 Signed-off-by: lihuan <lihuansse@tongji.edu.cn>
2016-07-06Creating result checker classeslihuan5-0/+231
JIRA: YARDSTICK-276 Change-Id: I63c4f2c36108e95f5d3b7da42e66cb8c9b16c817 Signed-off-by: lihuan <lihuansse@tongji.edu.cn>
2016-07-05Creating a generic opertionlihuan4-0/+174
Operation class is used to do some work on the target system such as creating a VM instance. JIRA: YARDSTICK-275 Change-Id: Ib62846824b74dcdae51f143bc59fba385cc7d84c Signed-off-by: lihuan <lihuansse@tongji.edu.cn>
2016-06-30Creating a generic monitorlihuan3-1/+94
JIRA: YARDSTICK-274 Change-Id: Iac8c525b36b2778767177b17e6107866cc514e40 Signed-off-by: lihuan <lihuansse@tongji.edu.cn>
2016-06-25Creating a generic attackerqiujuan4-0/+142
JIRA: YARDSTICK-273 Change-Id: Id81b554b559d14ced440a1fa004d14d791fd2306 Signed-off-by: qiujuan <juan_qiu@tongji.edu.cn>
2016-01-10The secondi HA test case-shutdown controllerwym_libra16-69/+303
1) add "attacker_baremetal.py" for fault injection 2) modify the monitor to excute on remote node after ssh connection 3) move all shell scripts together JIRA: YARDSTICK-182 Change-Id: Ibb9dc908224ddb8b99a0140b75c1a046503f6dfb Signed-off-by: wym_libra <yimin.wang@huawei.com>
2016-01-10Rewrite the HA test case (2)wym_libra8-137/+344
idea: refact the Monitor class in old file "monitor.py" with the base class and sub-class. detail: 1) the BaseMonitor is the base class of other monitor 2) each monitor run in independent process 3) there are two monitor("openstack-cmd" and "process") for the first test case 4) MonitorMgr class used to manager monitor process JIRA: YARDSTICK-149 Change-Id: I2eede94481f740812212e6cb673d175b5f543c15 Signed-off-by: wym_libra <yimin.wang@huawei.com>
2015-12-18Rewrite the HA test case (1)wym_libra9-123/+171
refactor the attacker implement. 1) BaseAttacker is added 2) a simple attacker named "kill-process" inherit the BaseAttacker 3) serviceha.py selects an attacker through the BaseAttacker by attacker name JIRA: YARDSTICK-149 Change-Id: Ib718d5edc6b5e14bc3ea0592e0146468ff70b43e Signed-off-by: wym_libra <yimin.wang@huawei.com>
2015-11-13A initial HA test casewym_libra7-0/+376
1)stop an openstack service 2)then monitor the corresponding api and check the availability of it 3)recovery the openstack service JIRA: YARDSTICK-149 Change-Id: Id7b77d2f5c71844729c04f37442c8cfaa270ab12 Signed-off-by: wym_libra <yimin.wang@huawei.com>