From d71e101ac1420ed03fa2dbecb76fc8156a16761a Mon Sep 17 00:00:00 2001 From: Hans Feldt Date: Mon, 29 Jun 2015 15:27:55 +0200 Subject: Add support for action hooks in runner config pre-start and post-stop intention is to be used to gather information about the target system. single-shot and periodic-action intention is to perform actions on the infrastructure or cloud resources. For example server live migration or network interface down. Example of what can be added in the runner section: pre-start-action: command: "heat stack-show demo" periodic-action: interval: 10 command: "ifconfig vboxnet1" single-shot-action: after: 30 command: "nova show goofy.demo" post-stop-action: command: "nova list" pre-start and post-stop data are added into the output file. periodic and single-shot are not because that would interfere with the actual sampled data. Besides the intention is not to log statistics but do things with the infrastructure such as server live migration. TODO: add sections to the output file, something like pre, data & post JIRA: YARDSTICK-46 Change-Id: Ia059813fb74733f86368aea9c7a20e5afb71d228 Signed-off-by: Hans Feldt --- samples/ping-ext-stimuli.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 samples/ping-ext-stimuli.yaml (limited to 'samples') diff --git a/samples/ping-ext-stimuli.yaml b/samples/ping-ext-stimuli.yaml new file mode 100644 index 000000000..cfe791567 --- /dev/null +++ b/samples/ping-ext-stimuli.yaml @@ -0,0 +1,49 @@ +--- +# Sample benchmark task config file +# Measure network latency using ping, destination is an external server +# Make sure servers have internet access before running this test. +# For example using virtual MOS do something this on the host: +# sudo iptables -t nat -A POSTROUTING -s 172.16.0.0/24 \! -d 172.16.0.0/24 -j MASQUERADE +# +# This sample demonstrates the use of runner actions - hooks inserted in +# diffrent places of the runner execution. +# + +schema: "yardstick:task:0.1" + +scenarios: +- + type: Ping + host: goofy.demo + target: 8.8.8.8 + runner: + type: Duration + duration: 60 + interval: 1 + pre-start-action: + command: "heat stack-show demo" + periodic-action: + interval: 10 + command: "ifconfig vboxnet1" + single-shot-action: + after: 30 + command: "nova show goofy.demo" + post-stop-action: + command: "nova list" + sla: + max_rtt: 10 + action: monitor + +context: + name: demo + image: cirros-0.3.3 + flavor: m1.tiny + user: cirros + servers: + goofy: + floating_ip: true + networks: + test: + cidr: '10.0.1.0/24' + external_network: "net04_ext" + -- cgit 1.2.3-korg