Add ODL HA testcase 53/57153/3
authorDimitrios Markou <mardim@intracom-telecom.com>
Fri, 16 Mar 2018 13:51:49 +0000 (15:51 +0200)
committerDimitrios Markou <mardim@intracom-telecom.com>
Tue, 8 May 2018 09:53:37 +0000 (12:53 +0300)
This testcase confirms the resiliency of Opendaylight
in a HA deployment

SPEC: https://gerrit.opnfv.org/gerrit/#/c/50991

JIRA: HA-33
JIRA: YARSTICK-955

Change-Id: I4cb39d1970ed0333a43fbb58f8c7138908379dcb
Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
(cherry picked from commit d16b2e14fe420a646d4399986bd9f4d1ae3a606d)

tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml [new file with mode: 0644]
tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml

diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml
new file mode 100644 (file)
index 0000000..85ec510
--- /dev/null
@@ -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'
+
index 13cc710..1ebf9c2 100644 (file)
@@ -62,3 +62,10 @@ 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"}'