aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/deploy.sh4
-rw-r--r--mcp/config/scenario/defaults-aarch64.yaml2
-rw-r--r--mcp/scripts/lib.sh8
-rw-r--r--mcp/scripts/user-data.template2
4 files changed, 12 insertions, 4 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 427850fda..e2e4a1c6f 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -272,10 +272,10 @@ pushd "${DEPLOY_DIR}" > /dev/null
# Install required packages
[ -n "$(command -v apt-get)" ] && sudo apt-get install -y \
git make rsync mkisofs curl virtinst cpu-checker qemu-kvm uuid-runtime \
- libvirt-bin
+ libvirt-bin cloud-guest-utils e2fsprogs
[ -n "$(command -v yum)" ] && sudo yum install -y --skip-broken \
git make rsync genisoimage curl virt-install qemu-kvm util-linux \
- libvirt
+ libvirt cloud-utils-growpart e2fsprogs
# For baremetal, python is indirectly required for PDF parsing
if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then
diff --git a/mcp/config/scenario/defaults-aarch64.yaml b/mcp/config/scenario/defaults-aarch64.yaml
index d9898191e..edcd8d9ac 100644
--- a/mcp/config/scenario/defaults-aarch64.yaml
+++ b/mcp/config/scenario/defaults-aarch64.yaml
@@ -17,6 +17,7 @@ virtual:
- https://linux.enea.com/mcp-repos/ocata/xenial/archive-mcpocata.key
repos:
# <repo name> <repo prio> deb [arch=<arch>] <repo url> <repo dist> <repo comp>
+ - saltstack 500 deb [arch=arm64] http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11 xenial main
- armband_openstack 1100 deb [arch=arm64] http://linux.enea.com/mcp-repos/ocata/xenial ocata main
- armband_mk_openstack 1100 deb [arch=arm64] http://linux.enea.com/apt-mk/xenial nightly ocata
# NOTE(armband): Empty repo, keep commented out as reference
@@ -25,6 +26,7 @@ virtual:
install:
- linux-image-generic-hwe-16.04-edge
- linux-headers-generic-hwe-16.04-edge
+ - salt-minion
control:
pkg:
install:
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 654f45e1f..8dd92e1ec 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -51,11 +51,15 @@ function mount_image {
OPNFV_LOOP_DEV=$(losetup -f)
export OPNFV_MNT_DIR OPNFV_LOOP_DEV
[ -n "${OPNFV_NBD_DEV}" ] && [ -n "${OPNFV_LOOP_DEV}" ] || exit 1
+ qemu-img resize "${image_dir}/${image}" 3G
sudo qemu-nbd --connect="${OPNFV_NBD_DEV}" --aio=native --cache=none \
"${image_dir}/${image}"
sleep 5 # /dev/nbdNp1 takes some time to come up
- # grub-update does not like /dev/nbd*, so use a loop device to work around it
# Hardcode partition index to 1, unlikely to change for Ubuntu UCA image
+ if sudo growpart "${OPNFV_NBD_DEV}" 1; then
+ sudo e2fsck -yf "${OPNFV_NBD_DEV}p1" && sudo resize2fs "${OPNFV_NBD_DEV}p1"
+ fi
+ # grub-update does not like /dev/nbd*, so use a loop device to work around it
sudo losetup "${OPNFV_LOOP_DEV}" "${OPNFV_NBD_DEV}p1"
mkdir -p "${OPNFV_MNT_DIR}"
sudo mount "${OPNFV_LOOP_DEV}" "${OPNFV_MNT_DIR}"
@@ -66,6 +70,8 @@ function mount_image {
sudo cp /etc/resolv.conf "${OPNFV_MNT_DIR}/run/resolvconf"
echo "GRUB_DISABLE_OS_PROBER=true" | \
sudo tee -a "${OPNFV_MNT_DIR}/etc/default/grub"
+ sudo sed -i -e 's/^\(GRUB_TIMEOUT\)=.*$/\1=1/g' -e 's/^GRUB_HIDDEN.*$//g' \
+ "${OPNFV_MNT_DIR}/etc/default/grub"
}
function apt_repos_pkgs_image {
diff --git a/mcp/scripts/user-data.template b/mcp/scripts/user-data.template
index 6752039bf..b6544774c 100644
--- a/mcp/scripts/user-data.template
+++ b/mcp/scripts/user-data.template
@@ -11,7 +11,7 @@ if [ "$(uname -i)" = "aarch64" ]; then
SALT_REPO=linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11
fi
wget -O - "https://${SALT_REPO}/SALTSTACK-GPG-KEY.pub" | sudo apt-key add -
-echo "deb https://${SALT_REPO} xenial main" > /etc/apt/sources.list.d/salt.list
+echo "deb https://${SALT_REPO} xenial main" > /etc/apt/sources.list.d/saltstack.list
apt update
apt-get install -y salt-minion
rm /etc/salt/minion_id
ghlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.

*************************************
Yardstick Test Case Description TC019
*************************************

+-----------------------------------------------------------------------------+
|Control Node Openstack Service High Availability                             |
|                                                                             |
+--------------+--------------------------------------------------------------+
|test case id  | OPNFV_YARDSTICK_TC019_HA: Control node Openstack service down|
|              |                                                              |
+--------------+--------------------------------------------------------------+
|test purpose  | This test case will verify the high availability of the      |
|              | service provided by OpenStack (like nova-api, neutro-server) |
|              | on control node.                                             |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|test method   | This test case kills the processes of a specific Openstack   |
|              | service on a selected control node, then checks whether the  |
|              | request of the related Openstack command is OK and the killed|
|              | processes are recovered.                                     |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|attackers     | In this test case, an attacker called "kill-process" is      |
|              | needed. This attacker includes three parameters:             |
|              | 1) fault_type: which is used for finding the attacker's      |
|              | scripts. It should be always set to "kill-process" in this   |
|              | test case.                                                   |
|              | 2) process_name: which is the process name of the specified  |
|              | OpenStack service. If there are multiple processes use the   |
|              | same name on the host, all of them are killed by this        |
|              | attacker.                                                    |
|              | 3) host: which is the name of a control node being attacked. |
|              |                                                              |
|              | e.g.                                                         |
|              | -fault_type: "kill-process"                                  |
|              | -process_name: "nova-api"                                    |
|              | -host: node1                                                 |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|monitors      | In this test case, two kinds of monitor are needed:          |
|              | 1. the "openstack-cmd" monitor constantly request a specific |
|              |    Openstack command, which needs two parameters:            |
|              | 1) monitor_type: which is used for finding the monitor class |
|              | and related scritps. It should be always set to              |
|              | "openstack-cmd" for this monitor.                            |
|              | 2) command_name: which is the command name used for request  |
|              |                                                              |
|              | 2. the "process" monitor check whether a process is running  |
|              |    on a specific node, which needs three parameters:         |
|              | 1) monitor_type: which used for finding the monitor class and|
|              | related scritps. It should be always set to "process"        |
|              | for this monitor.                                            |
|              | 2) process_name: which is the process name for monitor       |
|              | 3) host: which is the name of the node runing the process    |
|              |                                                              |
|              | e.g.                                                         |
|              | monitor1:                                                    |
|              | -monitor_type: "openstack-cmd"                               |
|              | -command_name: "nova image-list"                             |
|              | monitor2:                                                    |
|              | -monitor_type: "process"                                     |
|              | -process_name: "nova-api"                                    |
|              | -host: node1                                                 |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|metrics       | In this test case, there are two metrics:                    |
|              | 1)service_outage_time: which indicates the maximum outage    |
|              | time (seconds) of the specified Openstack command request.   |
|              | 2)process_recover_time: which indicates the maximun time     |
|              | (seconds) from the process being killed to recovered         |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|test tool     | Developed by the project. Please see folder:                 |
|              | "yardstick/benchmark/scenarios/availability/ha_tools"        |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|references    | ETSI NFV REL001                                              |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|configuration | This test case needs two configuration files:                |
|              | 1) test case file: opnfv_yardstick_tc019.yaml                |
|              | -Attackers: see above "attackers" discription                |
|              | -waiting_time: which is the time (seconds) from the process  |
|              | being killed to stoping monitors the monitors                |
|              | -Monitors: see above "monitors" discription                  |
|              | -SLA: see above "metrics" discription                        |
|              |                                                              |
|              | 2)POD file: pod.yaml                                         |
|              | The POD configuration should record on pod.yaml first.       |
|              | the "host" item in this test case will use the node name in  |
|              | the pod.yaml.                                                |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|test sequence | description and expected result                              |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|step 1        | start monitors:                                              |
|              | each monitor will run with independently process             |
|              |                                                              |
|              | Result: The monitor info will be collected.                  |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|step 2        | do attacker: connect the host through SSH, and then execute  |
|              | the kill process script with param value specified by        |
|              | "process_name"                                               |
|              |                                                              |
|              | Result: Process will be killed.                              |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|step 3        | stop monitors after a period of time specified by            |
|              | "waiting_time"                                               |
|              |                                                              |
|              | Result: The monitor info will be aggregated.                 |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|step 4        | verify the SLA                                               |
|              |                                                              |
|              | Result: The test case is passed or not.                      |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|post-action   | It is the action when the test cases exist. It will check the|
|              | status of the specified process on the host, and restart the |
|              | process if it is not running for next test cases             |
|              |                                                              |
+--------------+--------------------------------------------------------------+
|test verdict  | Fails only if SLA is not passed, or if there is a test case  |
|              | execution problem.                                           |
|              |                                                              |
+--------------+--------------------------------------------------------------+