summaryrefslogtreecommitdiffstats
path: root/benchmarks/playbooks/iperf.yaml
diff options
context:
space:
mode:
authorMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 06:42:23 -0800
committerNauman Ahad <nauman.ahad@xflowresearch.com>2016-02-01 22:27:40 +0000
commit30f974a996efbb4b7f7b4fc3a47a1454c3fe80e5 (patch)
treeee1d930fca39fa6875de6e18a2ae3dd9dba6f70f /benchmarks/playbooks/iperf.yaml
parentc013d5c523c42221f2c3594f0a751e9181b80a6b (diff)
bug fix: result collection bug fix for docker images
Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com> (cherry picked from commit 971a7c98515a9d83661f5e423f7e8390f35dca59)
Diffstat (limited to 'benchmarks/playbooks/iperf.yaml')
-rw-r--r--benchmarks/playbooks/iperf.yaml30
1 files changed, 15 insertions, 15 deletions
diff --git a/benchmarks/playbooks/iperf.yaml b/benchmarks/playbooks/iperf.yaml
index 8f6d9cc2..d6bc00ed 100644
--- a/benchmarks/playbooks/iperf.yaml
+++ b/benchmarks/playbooks/iperf.yaml
@@ -1,14 +1,14 @@
- hosts: 127.0.0.1
connection: local
- tasks:
+ tasks:
- name: getting directory
shell: echo $PWD
register: qtip_dir
- name: making Iperf directory
- file: path=../../{{Dest_dir}}/iperf state=directory
+ file: path={{workingdir}}/{{Dest_dir}}/iperf state=directory
- name: making temporary iperf directory
- file: path=../../{{Dest_dir}}/iperf/iperf_temp state=directory
+ file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp state=directory
- hosts: "{{role}}"
@@ -53,7 +53,7 @@
when: iptable_entry != '' and installertype == 'fuel'
- name: Installing IPERF when Ubuntu
shell: apt-get install iperf3 -y
- when: ansible_os_family == "Debian" and rolename == '1-server'
+ when: ansible_os_family == "Debian" and rolename == '1-server'
- name: Installing Iperf3
shell: yum install iperf3 -y
when: ansible_os_family == "RedHat"
@@ -65,13 +65,13 @@
- name: Running Iperf on Host
shell: iperf3 --time {{duration}} -b {{bandwidthGbps}}G -c {{ip1}} -J -O10 >> ./qtip_result/iperf_raw.json
ignore_errors: yes
- with_items:
+ with_items:
- "{{ip1}}"
when: rolename == "2-host" and "{{privateip1}}" == "NONE"
- name: Running Iperf on Host
shell: iperf3 --time {{duration}} -b{{bandwidthGbps}}G -c {{privateip1}} -J -O10 >> ./qtip_result/iperf_raw.json
ignore_errors: yes
- with_items:
+ with_items:
- "{{ip1}}"
when: rolename == "2-host" and "{{privateip1}}" != "NONE"
- name: Fetching result transformation script
@@ -83,14 +83,14 @@
copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result
when: rolename =="2-host" and "{{ip2}}" == ''
- name: consolidating report
- shell: cd $HOME/qtip_result && python final_report.py IPERF
+ shell: cd $HOME/qtip_result && python final_report.py IPERF
when: rolename =="2-host" and "{{ip2}}" == ''
- - name: Files to Copy
+ - name: Files to Copy
shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2
register: files_to_copy
when: rolename =="2-host" and "{{ip2}}" == ''
- name: copy results
- fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/iperf/iperf_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp
with_items: files_to_copy.stdout_lines
when: rolename =="2-host" and "{{ip2}}" == ''
- name: registering log files
@@ -98,7 +98,7 @@
register: copy_log_results
when: rolename =="2-host" and "{{ip2}}" == ''
- name: copying log results
- fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/iperf/iperf_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp
with_items: copy_log_results.stdout_lines
when: rolename =="2-host" and "{{ip2}}" == ''
@@ -111,15 +111,15 @@
rolename: "{{role}}"
when: role is defined
- name: extracting_json
- shell: (find ../../{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/iperf/)
+ shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/)
when: rolename == "2-host"
- name: making_logs_folder
- shell: mkdir -p ../../{{Dest_dir}}/iperf/logs
+ shell: mkdir -p {{workingdir}}/{{Dest_dir}}/iperf/logs
- name: extracting_log
- shell: (find ../../{{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/iperf/logs)
+ shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/logs)
when: rolename == "2-host"
- name: removing iperf_raw file
- shell: rm -rf ../../{{Dest_dir}}/iperf/iperf_raw.json
+ shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json
when: rolename == "2-host"
- name: removing iperf_temp
- shell: rm -rf ../../{{Dest_dir}}/iperf/iperf_temp
+ shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp \ No newline at end of file