aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/yardstick/nodes/apex_baremetal/pod.yaml46
-rw-r--r--etc/yardstick/nodes/apex_virtual/pod.yaml40
-rwxr-xr-xtests/ci/prepare_env.sh67
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml276
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml313
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml15
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml8
-rwxr-xr-xyardstick/benchmark/scenarios/availability/ha_tools/start_service.bash13
8 files changed, 771 insertions, 7 deletions
diff --git a/etc/yardstick/nodes/apex_baremetal/pod.yaml b/etc/yardstick/nodes/apex_baremetal/pod.yaml
new file mode 100644
index 000000000..4b058c499
--- /dev/null
+++ b/etc/yardstick/nodes/apex_baremetal/pod.yaml
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+nodes:
+-
+ name: node1
+ role: Controller
+ ip: ip1
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node2
+ role: Controller
+ ip: ip2
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node3
+ role: Controller
+ ip: ip3
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node4
+ role: Compute
+ ip: ip4
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node5
+ role: Compute
+ ip: ip5
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node6
+ role: Opendaylight-Cluster-Leader
+ ip: ip6
+ user: heat-admin
+ key_filename: node_keyfile
diff --git a/etc/yardstick/nodes/apex_virtual/pod.yaml b/etc/yardstick/nodes/apex_virtual/pod.yaml
new file mode 100644
index 000000000..59b51d224
--- /dev/null
+++ b/etc/yardstick/nodes/apex_virtual/pod.yaml
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+nodes:
+-
+ name: node1
+ role: Controller
+ ip: 192.0.2.15
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node2
+ role: Controller
+ ip: 192.0.2.4
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node3
+ role: Controller
+ ip: 192.0.2.6
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node4
+ role: Compute
+ ip: 192.0.2.10
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node5
+ role: Compute
+ ip: 192.0.2.14
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh
index d7c60d48f..8b9f887b2 100755
--- a/tests/ci/prepare_env.sh
+++ b/tests/ci/prepare_env.sh
@@ -16,6 +16,7 @@
: ${EXTERNAL_NETWORK:='admin_floating_net'}
: ${USER_NAME:='ubuntu'}
: ${SSH_KEY:='/root/.ssh/id_rsa'}
+: ${DEPLOY_SCENARIO:='unknown'}
# Extract network name from EXTERNAL_NETWORK
# e.g. EXTERNAL_NETWORK='ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24'
@@ -62,7 +63,73 @@ verify_connectivity() {
}
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+if [ "$INSTALLER_TYPE" == "apex" ]; then
+ # check the connection
+ verify_connectivity "${INSTALLER_IP}"
+
+ pod_yaml="$YARDSTICK_REPO_DIR/etc/yardstick/nodes/apex_baremetal/pod.yaml"
+
+ # update "ip" according to the CI env
+ ssh -l root "${INSTALLER_IP}" -i ${SSH_KEY} ${ssh_options} \
+ "source /home/stack/stackrc && openstack server list -f yaml" > node_info
+
+ controller_ips=($(awk '/control/{getline; {print $2}}' < node_info | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'))
+ compute_ips=($(awk '/compute/{getline; {print $2}}' < node_info | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'))
+ odl_ip=""
+ # Get ODL's cluster default module-shard Leader IP in HA scenario
+ if [[ ${DEPLOY_SCENARIO} == os-odl-*-ha ]]; then
+ for ip in "${controller_ips[@]}";
+ do
+ if [[ "$odl_ip" ]]; then
+ break
+ fi
+ for ((i=0; i<${#controller_ips[@]}; i++));
+ do
+ ODL_STATE=$(curl -s -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" \
+ "http://"${ip}":8081/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-"${i}"-shard-default-operational,type=DistributedOperationalDatastore" \
+ | grep -o \"RaftState\"\:\"Leader\" | tr ":" "\n" | sed -n '2p' | sed 's/\"//g');
+
+ if [[ ${ODL_STATE} == "Leader" ]]; then
+ odl_ip=${ip}
+ break
+ fi
+ done;
+ done
+
+ if [[ -z "$odl_ip" ]]; then
+ echo "ERROR: Opendaylight Leader IP is emtpy"
+ exit 1
+ fi
+
+ elif [[ ${DEPLOY_SCENARIO} == *"odl"* ]]; then
+ odl_ip=${controller_ips[0]}
+ fi
+
+ if [[ ${controller_ips[0]} ]]; then
+ sed -i "s|ip1|${controller_ips[0]}|" "${pod_yaml}"
+ fi
+ if [[ ${controller_ips[1]} ]]; then
+ sed -i "s|ip2|${controller_ips[1]}|" "${pod_yaml}"
+ fi
+ if [[ ${controller_ips[2]} ]]; then
+ sed -i "s|ip3|${controller_ips[2]}|" "${pod_yaml}"
+ fi
+ if [[ ${compute_ips[0]} ]]; then
+ sed -i "s|ip4|${compute_ips[0]}|" "${pod_yaml}"
+ fi
+ if [[ ${compute_ips[1]} ]]; then
+ sed -i "s|ip5|${compute_ips[1]}|" "${pod_yaml}"
+ fi
+ if [[ ${odl_ip} ]]; then
+ sed -i "s|ip6|${odl_ip}|" "${pod_yaml}"
+ fi
+
+
+ # update 'key_filename' according to the CI env
+ sed -i "s|node_keyfile|${SSH_KEY}|" "${pod_yaml}"
+
+fi
if [ "$INSTALLER_TYPE" == "fuel" ]; then
# check the connection
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml
new file mode 100644
index 000000000..85ec510df
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml
@@ -0,0 +1,276 @@
+##############################################################################
+## Copyright (c) 2018 Intracom Telecom and others.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC092 config file;
+ SDN Controller resilience in HA configuration
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host = attack_host or 'node6' %}
+
+scenarios:
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+ steps:
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ attackers:
+ -
+ fault_type: "kill-process"
+ process_name: "opendaylight"
+ key: "kill-process"
+ host: {{attack_host}}
+
+ monitors:
+ - monitor_type: "process"
+ process_name: "opendaylight"
+ host: {{attack_host}}
+ key: "monitor-recovery"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "start-service"
+ host: {{attack_host}}
+ operation_key: "start-service"
+ action_parameter:
+ service: "opendaylight"
+ rollback_parameter:
+ service: "opendaylight"
+
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+
+ steps:
+
+ - actionKey: "monitor-recovery"
+ actionType: "monitor"
+ index: 1
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 3
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 4
+
+ - actionKey: "kill-process"
+ actionType: "attacker"
+ index: 5
+
+ - actionKey: "start-service"
+ actionType: "operation"
+ index: 6
+
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 80
+ host: athena
+ sla:
+ max_outage_time: 40
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "hermes"
+ return_parameter:
+ all: "@private_ip"
+
+ - operation_type: "general-operation"
+ key: "nova-create-instance"
+ operation_key: "nova-create-instance"
+ action_parameter:
+ serverconfig: "hermes yardstick-image yardstick-flavor test_one"
+ rollback_parameter:
+ serverconfig: "hermes"
+
+ - operation_type: "general-operation"
+ key: "add-server-to-secgroup"
+ operation_key: "add-server-to-secgroup"
+ action_parameter:
+ serverconfig: "hermes ODLHA1"
+ rollback_parameter:
+ serverconfig: "hermes ODLHA1"
+
+
+ steps:
+ - actionKey: "nova-create-instance"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "add-server-to-secgroup"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 3
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 4
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+contexts:
+ -
+ type: Node
+ name: LF
+ file: {{file}}
+ -
+ name: ODLHA1
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+ host: athena
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ athena:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ ares:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ networks:
+ test_one:
+ cidr: '10.0.1.0/24'
+ router: 'test_router'
+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml
new file mode 100644
index 000000000..a034471aa
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml
@@ -0,0 +1,313 @@
+##############################################################################
+## Copyright (c) 2018 Intracom Telecom and others.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC093 config file;
+ SDN Vswitch resilience in non-HA or HA configuration
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host_cmp_one = attack_host_cmp_one or 'node4' %}
+{% set attack_host_cmp_two = attack_host_cmp_two or 'node5' %}
+{% set systemd_service_name = systemd_service_name or 'openvswitch-switch'%}
+
+scenarios:
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+ steps:
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+
+ nodes:
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+-
+ type: "GeneralHA"
+ options:
+ attackers:
+ -
+ fault_type: "kill-process"
+ process_name: "openvswitch"
+ key: "kill-process-cmp-one"
+ host: {{attack_host_cmp_one}}
+
+ -
+ fault_type: "kill-process"
+ process_name: "openvswitch"
+ key: "kill-process-cmp-two"
+ host: {{attack_host_cmp_two}}
+
+ monitors:
+ - monitor_type: "process"
+ process_name: "openvswitch"
+ host: {{attack_host_cmp_one}}
+ key: "monitor-recovery-cmp-one"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+ - monitor_type: "process"
+ process_name: "openvswitch"
+ host: {{attack_host_cmp_two}}
+ key: "monitor-recovery-cmp-two"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 20
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 20
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "restart-service-cmp-one"
+ host: {{attack_host_cmp_one}}
+ operation_key: "start-service"
+ action_parameter:
+ service: {{systemd_service_name ~ " restart"}}
+ rollback_parameter:
+ service: "openvswitch"
+
+ - operation_type: "general-operation"
+ key: "restart-service-cmp-two"
+ host: {{attack_host_cmp_two}}
+ operation_key: "start-service"
+ action_parameter:
+ service: {{systemd_service_name ~ " restart"}}
+ rollback_parameter:
+ service: "openvswitch"
+
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+
+ steps:
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+ - actionKey: "kill-process-cmp-one"
+ actionType: "attacker"
+ index: 4
+
+ - actionKey: "kill-process-cmp-two"
+ actionType: "attacker"
+ index: 5
+
+ - actionKey: "monitor-recovery-cmp-one"
+ actionType: "monitor"
+ index: 6
+
+ - actionKey: "monitor-recovery-cmp-two"
+ actionType: "monitor"
+ index: 7
+
+
+ - actionKey: "restart-service-cmp-one"
+ actionType: "operation"
+ index: 8
+
+ - actionKey: "restart-service-cmp-two"
+ actionType: "operation"
+ index: 9
+
+
+ nodes:
+ {{attack_host_cmp_one}}: {{attack_host_cmp_one}}.LF
+ {{attack_host_cmp_two}}: {{attack_host_cmp_two}}.LF
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 80
+ host: athena
+ sla:
+ max_outage_time: 40
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "hermes"
+ return_parameter:
+ all: "@private_ip"
+
+ - operation_type: "general-operation"
+ key: "nova-create-instance"
+ operation_key: "nova-create-instance"
+ action_parameter:
+ serverconfig: "hermes yardstick-image yardstick-flavor test_one"
+ rollback_parameter:
+ serverconfig: "hermes"
+
+ - operation_type: "general-operation"
+ key: "add-server-to-secgroup"
+ operation_key: "add-server-to-secgroup"
+ action_parameter:
+ serverconfig: "hermes ODLnoHA1"
+ rollback_parameter:
+ serverconfig: "hermes ODLnoHA1"
+
+
+ steps:
+ - actionKey: "nova-create-instance"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "add-server-to-secgroup"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 3
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 4
+
+ nodes:
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+contexts:
+ -
+ type: Node
+ name: LF
+ file: {{file}}
+ -
+ name: ODLnoHA1
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+ host: athena
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ athena:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ ares:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ networks:
+ test_one:
+ cidr: '10.0.1.0/24'
+ router: 'test_router'
+
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
index 13cc710f3..f174a90e4 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
@@ -62,3 +62,18 @@ test_cases:
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
"host": "node1"}'
+-
+ file_name: opnfv_yardstick_tc092.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host": "node6"}'
+-
+ file_name: opnfv_yardstick_tc093.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host_cmp_one": "node4","attack_host_cmp_two": "node5",
+ "systemd_service_name": "openvswitch"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
index 42a170a89..feb8a6631 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
@@ -61,3 +61,11 @@ test_cases:
task_args:
default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml",
"attack_host": "node6"}'
+-
+ file_name: opnfv_yardstick_tc093.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host_cmp_one": "node4","attack_host_cmp_two": "node5",
+ "systemd_service_name": "openvswitch"}'
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash b/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
index 858d86ca0..2388507d7 100755
--- a/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
@@ -9,24 +9,23 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# Start a service and check the service is started
+# Start or restart a service and check the service is started
set -e
service_name=$1
+operation=${2-start} # values are "start" or "restart"
-Distributor=$(lsb_release -a | grep "Distributor ID" | awk '{print $3}')
-
-if [ "$Distributor" != "Ubuntu" -a "$service_name" != "keystone" -a "$service_name" != "neutron-server" -a "$service_name" != "haproxy" ]; then
+if [ -f /usr/bin/yum -a "$service_name" != "keystone" -a "$service_name" != "neutron-server" -a "$service_name" != "haproxy" -a "$service_name" != "openvswitch" ]; then
service_name="openstack-"${service_name}
-elif [ "$Distributor" = "Ubuntu" -a "$service_name" = "keystone" ]; then
+elif [ -f /usr/bin/apt -a "$service_name" = "keystone" ]; then
service_name="apache2"
elif [ "$service_name" = "keystone" ]; then
service_name="httpd"
fi
if which systemctl 2>/dev/null; then
- systemctl start $service_name
+ systemctl $operation $service_name
else
- service $service_name start
+ service $service_name $operation
fi