aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability
AgeCommit message (Collapse)AuthorFilesLines
2018-09-10tc046 kill keystone process condition incorrect - dovetailrexlee87761-2/+2
Change-Id: If01abfd5a99b4cea74f835e258f3a982af9446cd Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-08-21Merge "the recovery action of "baremetal down" should be triggered mandatory"Rex Lee3-3/+6
2018-07-31the recovery action of "baremetal down" should be triggered mandatoryrexlee87763-4/+7
YARDSTICK-1222 has made attacker recover only when the sla not pass. But for baremetal down test case, the node need to power on even the sla pass. TODO: Make attacker can support mandatory recover in some situation. JIRA: YARDSTICK-1337 Change-Id: Ib567b9b9025e5ee421ea47140c468537ad16f090 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-20Bugfix: HA test case baremetal down ipmi power off failed - dovetailrexlee87761-27/+3
Test case tc025 baremetal down failed to ipmi power off the node. This patch target to solve: ipmi_password is not correctly fetched JIRA: YARDSTICK-1326 Change-Id: Ia915cd07cba420643fa9a679975178328be55700 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-06-26Bugfix: HA kill process recovery has a conflictrexlee87761-8/+11
It happens in Nokia SUT when running in the Plugfest. The problem happens when the start_process start to recover the killed process (like nova-api), but the self-cured mechanism already recovered. And somehow it lead to a conflict and has problems. So the recover of the HA attack-recover should be improved to only recover it when it needs to. JIRA: YARDSTICK-1222 Change-Id: I1acb5a7d59d6fe4e0de0b0c5942fa89e051dd1ff Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-06-15Convert SLA asserts to raisesMiikka Koistinen2-5/+12
This commit converts Python assertions to a custom exception in all places where SLA validation is checked with an assertion. This commit also fixes all emerged pylint errors. JIRA: YARDSTICK-966 Change-Id: If771ed03b2cbc0a43a57fcfb9293f18740b3ff80 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-05-09Merge "Fix log typos in benchmark/scenarios/availability"Emma Foley8-40/+36
2018-05-08Merge "Bug Fix: Start openvswitch service in Centos distro"Ross Brattain1-4/+2
2018-05-08Merge "Add support for restarting a service"Ross Brattain1-3/+4
2018-05-08Fix log typos in benchmark/scenarios/availabilityMiikka Koistinen8-40/+36
This commit fixes multiple log message typos and all the emerged pylint errors. MonitorProcess/MonitorOpenstackCmd.verify_SLA() repeat already logged information, so these prints are removed. JIRA: YARDSTICK-1145 Change-Id: Ifef26e4b4ff7766089caec24785511969c2d663e Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-05-03Bug Fix: Start openvswitch service in Centos distroDimitrios Markou1-4/+2
JIRA: YARDSTICK-1142 Change-Id: I82c479c95e10de37416081eacf2d8bee396e50dc Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-05-03Add support for restarting a serviceDimitrios Markou1-3/+4
JIRA: YARDSTICK-1138 Change-Id: Id57defb574eb7e0f5be81b52803cdb05f46796ab Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-04-16Get HA test case results on failureMiikka Koistinen2-36/+11
Now, yardstick HA test cases (which have 'sla action: monitor') do not output results if the test case SLA validation fails. This patch modifies the task runner and the serviceHA scenario so that during an SLA validation failure the test result data is captured correctly. Do similar changes in the general scenario. JIRA: YARDSTICK-1115 Change-Id: I648a8b229600c0ad089320ac3f803698f73aa800 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-03-13Merge "[Bug Fix] Support nova create instance operation"Ross Brattain2-0/+50
2018-03-09[Bug Fix] Support nova create instance operationDimitrios Markou2-0/+50
Add the ability to create a nova instance through the operation perspective JIRA: YARDSTICK-1038 Change-Id: Idac141958d65cc6c53b6bd27df83ac74ae8804ec Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-03-08Fetch Nova instance's private IPDimitrios Markou2-0/+28
Add the capability to fetch the private IP of a Nova instance through the operation perspective. JIRA: YARDSTICK-1040 Change-Id: Idc3d62bcd3f477a03a89f7dcc8d8616f3cfa2742 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-03-08Assign nova instance to security groupDimitrios Markou3-0/+55
Support the assigning of a nova instance to an existing security group through the operation perspective Change-Id: Ic1c26031c25d400fede2ecb298a66aec42dcfbc5 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-03-06Add start service operationDimitrios Markou1-0/+3
Support the capability to start a service through the operation perspective. JIRA: YARDSTICK-1041 Change-Id: If817f4a522546de2e4a826c1e85b3545e6f3efed Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2017-12-15bugfix: kill process do not accurately kill "nova-api"rexlee87761-1/+1
JIRA: YARDSTICK-849 1. update the kill process RegEx pattern to be more accurate 2. make attack_process to be parameter so it can be customized if the SUT is using a different name of attack_process Change-Id: I569730ced6c24aafbffcf2fc5752d3560d0adac5 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-10-28tc053 kill haproxy wrong mismatchrexlee87761-0/+5
JIRA: YARDSTICK-831 Change-Id: I587c486572f439952b8a31da664d1e2c1fb8dc27 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-10-04Add intermediate variables for attacker,monitor,result_checkerqiujuan9-44/+61
JIRA: YARDSTICK-790 Change-Id: I6bb36c98b8673155d3142fc54cfb39315d5ce613 Signed-off-by: qiujuan <juan_qiu@tongji.edu.cn>
2017-10-02drain runner queue and undo cancel_join_threadRoss Brattain1-1/+0
Sometimes the runners can hang. Initially debugging lead to the queue join thread, so I thought we could cancel all the join threads and everything would be okay. But it turns out canceling the queue join threads can lead to corruption of the queues, so when we go to drain the queues the task hangs. But it also turns out that we were not properly draining the queues in the task process. We were waiting for all the runners to exit, then draining the queues. This is bad and will cause the queues to fill up and hang and/or drop data or corrupt the queues. The proper fix seems to be to draining the queues in a loop before calling join with a timeout. Also modified the queue drain loops to no block on queue.get() Revert "cancel all queue join threads" This reverts commit 75c0e3a54b8f6e8fd77c7d9d95decab830159929. Revert "duration runner: add teardown and cancel all queue join threads" This reverts commit 7eb6abb6931b24e085b139cc3500f4497cdde57d. Change-Id: Ic4f8e814cf23615621c1250535967716b425ac18 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-01cancel all queue join threadsRoss Brattain1-0/+1
In some cases we are blocking in base.Runner join() because the queues are not empty call cancel_join_thread to prevent the Queue from blocking the Process exit https://docs.python.org/3.3/library/multiprocessing.html#all-platforms Joining processes that use queues Bear in mind that a process that has put items in a queue will wait before terminating until all the buffered items are fed by the "feeder" thread to the underlying pipe. (The child process can call the cancel_join_thread() method of the queue to avoid this behaviour.) This means that whenever you use a queue you need to make sure that all items which have been put on the queue will eventually be removed before the process is joined. Otherwise you cannot be sure that processes which have put items on the queue will terminate. Remember also that non-daemonic processes will be joined automatically. Warning As mentioned above, if a child process has put items on a queue (and it has not used JoinableQueue.cancel_join_thread), then that process will not terminate until all buffered items have been flushed to the pipe. This means that if you try joining that process you may get a deadlock unless you are sure that all items which have been put on the queue have been consumed. Similarly, if the child process is non-daemonic then the parent process may hang on exit when it tries to join all its non-daemonic children. cancel_join_thread() Prevent join_thread() from blocking. In particular, this prevents the background thread from being joined automatically when the process exits – see join_thread(). A better name for this method might be allow_exit_without_flush(). It is likely to cause enqueued data to lost, and you almost certainly will not need to use it. It is really only there if you need the current process to exit immediately without waiting to flush enqueued data to the underlying pipe, and you don’t care about lost data. Change-Id: I345c722a752bddf9f0824a11cdf52ae9f04669af Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-21bugfix: tc025 should use ipmi to poweroffroot2-31/+36
if it use shutdown, it'll take several minutes to shutdown, leads to the ipmi power on command fails Change-Id: I74b61325cbcc3a6ec070d2fa103accf84f29b0fa Signed-off-by: root <limingjiang@huawei.com>
2017-09-01Bugfix: ha test case criteria pass when sla not passrexlee87765-3/+23
ha test cases didn't store moniter info and report fail when sla didn't pass Change-Id: I0e5637e37a66e1bf03b47fe09d17e0a1acfa11c1 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-08-26Raise Exception if HA test case failedJingLu52-0/+10
Change-Id: Ia3677724075c1c1408f50bbfcebd3cbcde251d66 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-08-23Add test case file, document and related scripts of yardsticktjuyinkanglin8-1/+72
tc057(HA_TC014) JIRA: YARDSTICK-779 Change-Id: I6a812b1c88229b20a0dd0ce5bc135c9ba15266db Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2017-08-23Merge "Add test case file, document and related scripts of yardstick ↵Jing Lu3-1/+50
tc058(HA_TC015)"
2017-08-15YAML fixesRoss Brattain4-8/+9
There are multiple issues wiht YAML loading. 1. Jinja2 renders None values as a string 'None'. This is not valid YAML we need to render None values to '~' or 'null' which is the native YAML None value. 2. Jinja2 renders dict and lists that contain unicode with u'foo' values. This is not value YAML syntax. Because we are serializing dict and lists into YAML, we need to encode them as valid YAML. We can override Jinja2 finalize to use yaml.dump to dump inline YAML. We use yaml.safe_dump(elem, default_flow_style=True).replace('\n', '') to generate valid single-line YAML dict and list values. But this problem highlights the general difficulties with templating and loading files. We could avoid this Python->Jinja2->YAML->Python issue by directly injecting the list or dict after the YAML is loaded. I'm not sure of the real utility of these templates. 3. On Python 2 YAML loader is rendering all strings as unicode. This does not work for Trex because Trex is broken and badly coded. Trex does type checking against str() which is different for Python 2 and Python 3. The default YAML loader will return native string types, str() or unicode() for Python 2 and Python 3 respectively. The bad Trex codes is in convert_val: https://github.com/cisco-system-traffic-generator/trex-core/blob/master/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py#L674 def convert_val (val): if is_integer(val): return val if type(val) == str: return ipv4_str_to_num (is_valid_ipv4(val)) raise CTRexPacketBuildException(-11,("init val invalid %s ") % val ); This code is doing type(val) == str. This is bad and broken. We can't fix Trex, so we have to render all strings as native str() types The bug here was that the Heat template loader template_format.py was overriding the global YAML loader to always return unicode. We don't want this global override. To fix this we have to use local subclasses of the yaml.SafeLoader class. But in order to dynamically subclass from CSafeLoader or SafeLoader we have to use the type() builtin to define a new class at runtime. Once we have new classes defined, we can safely isolate different YAML constructors and return unicode or not depending on the case. To be consistent we implement a new yaml_loader.py module to centralize all non-Heat template yaml loading to ensure correct uncode/str conversion Change-Id: Iebf9cf78fbda390977c390436b0869e7bbf503eb Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-11Add test case file, document and related scripts of yardsticktjuyinkanglin3-1/+50
tc058(HA_TC015) JIRA: YARDSTICK-780 Change-Id: I4406776cb6b91265a0d2674b5dd200ca7d13ef14 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
2017-08-09bugfix: tc025 and tc054 failrexlee87761-0/+1
also modify tc025 an tc054 to be able to pass paras JIRA: YARDSTICK-772 Change-Id: Ibeba931804cccfd74fc70fcf4fdb6af9d5c8ab77 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-08-01replace yaml.load with yaml.safe_loadRoss Brattain4-4/+4
yaml.safe_load is safer, obviously. anteater will check for this template_format use specialized constructor based on yaml.SafeLoader JIRA: YARDSTICK-760 Change-Id: Ia3b0b3aa0765385a0ee472a4d83f49d424b5a77f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-25Add intermediate variable for HA testqiujuan6-17/+52
JIRA: YARDSTICK-397 Change-Id: I3489893caa5b8194b63cb844325ec0b2c554aecc Signed-off-by: qiujuan <juan_qiu@tongji.edu.cn>
2017-07-24Merge "HA testcase containerized Compass support"Jing Lu8-4/+188
2017-07-20HA testcase containerized Compass supportJingLu58-4/+188
Compass will be containerized in Euphrates release. This work is about support HA testcase in a containerized environment. Change-Id: Ibb668c81f046d6400293f8cd58181b9f20aeebe3 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-17Merge "attacker_process: fix typo s/envrioment/environment/"Rex Lee1-2/+2
2017-07-17Merge "test_attacker_baremetal: don't run local commands"Ross Brattain1-4/+1
2017-07-14attacker_process: fix typo s/envrioment/environment/Ross Brattain1-2/+2
Change-Id: I1e5db657eb88c73b5d9223c47e2d97dc79eec1f1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_attacker_baremetal: don't run local commandsRoss Brattain1-4/+1
these tests were failing to mock subprocess.check_output and thus were trying to run sudo commands on the local system. This is dangerous. Add the subprocess mock. Also mock the LOG object so we don't print bogus Runtime error tracebacks in the unittest logs when we test assertRaises() Change-Id: I01535f9952fbd95ce2f5972b641c51ff836e7e8c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_monitor_command: mock LOG so we don't output errorRoss Brattain1-4/+1
Don't print fake tracebacks to the unittest logs Change-Id: I8a468b8c6566f02be88a9dd222567c14c66b0956 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-30Use "OS_INSECURE" variable as the insecure mode indicatorJingLu54-5/+5
Now we use "OS_CACERT" as the insecure mode indicator, it is better to use "OS_INSECURE". Change-Id: I1406193e27510390b4b8fd8f4751d8361560172f Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-30Bugfix: remove test.dbf file in recovery scriptzshi1-1/+1
JIRA: YARDSTICK-696 Change-Id: I09b73079ff828c43040723794115bb07f74242e8 Signed-off-by: zshi <zshi@redhat.com>
2017-06-22HA testcase improvementJingLu58-8/+52
This patch improve HA test case in the following aspects: 1. the "GeneralHA" type now will check if the target service process in the controller node. 2. support ignore server certificate 3. add debug log for recovering service failed 4. improve method to kill keystone process Change-Id: I9ae7ab54391fe41d5d7f3e4951a7ac2e3ba75968 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-05-27Imporve 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>
2017-05-25Terminate openstack service process using kill command in HA test casesJingLu51-2/+5
JIRA: YARDSTICK-659 In some openstack environment, the service process cannot be killed by killall command but can be terminate by kill command. This patch is about to switch to use kill command in the fault_process_kill.bash to kill processes. Change-Id: Iec455ee56d3f31fb5c16de5994870d1acd33f41a Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-05-24fix bug: multi monitorHuanLi1-6/+15
JIRA: YARDSTICK-657 Change-Id: I77223cc43d529828cf3f763529019590c35b2fcb Signed-off-by: HuanLi <lihuansse@tongji.edu.cn>
2017-05-16Merge "Add a new monitor type: MultiMonitor that can run any number of other ↵Ross Brattain2-0/+78
monitors at the same time."
2017-05-06Bugfix: Support HA test cases in TripleOJingLu59-23/+48
Change-Id: Ib1f6f45677e66ca88fb546ea0662f52588e9d336 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-05-04Merge "Bugfix: Local Openstack Operation in HA test frameworks"Jing Lu3-40/+104
2017-05-04Bugfix: Local Openstack Operation in HA test frameworkstjuyinkanglin3-40/+104
JIRA: YARDSTICK-635 Change-Id: Ic27517714db9325e7a3b1ef623c49af61c36b2b5 Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>