summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@TRAFCLASS-PACKET1.fuel.local>2016-03-10 10:10:27 -0500
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>2016-03-22 13:48:31 +0000
commit3051e176ebe8391baea4428270fdc10ecf10aec5 (patch)
tree319270ba970b0c099835e58cf2820f2c1e653f07
parentc281ce82f3aa4300cc210969aa70fbdccc3809c6 (diff)
Bug Fix - Fixes the heat template for noisy neighbours and its deployment
Change-Id: I4c45b204a06a728db276a2e4a5f905f3a34f2de5 Signed-off-by: user <user@TRAFCLASS-PACKET1.fuel.local> (cherry picked from commit 6b3a3a061aed097fcbc7f0c4dceeabf0f7312122)
-rw-r--r--yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py4
-rw-r--r--yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py4
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py3
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py8
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py10
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/deployment_unit.py1
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/heat_manager.py7
-rw-r--r--yardstick/vTC/apexlake/heat_templates/stress_workload.yaml40
-rw-r--r--yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py11
-rw-r--r--yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py2
10 files changed, 58 insertions, 32 deletions
diff --git a/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py b/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py
index 57b975811..8d9bf0962 100644
--- a/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py
+++ b/yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py
@@ -78,6 +78,10 @@ class VtcInstantiationValidationNoisy(base.Scenario):
str(self.options['amount_of_ram'])
test_case['params']['number_of_cores'] = \
str(self.options['number_of_cores'])
+ test_case['params']['network'] = \
+ str(self.options['default_net_name'])
+ test_case['params']['subnet'] = \
+ str(self.options['default_subnet_name'])
res = dict()
try:
diff --git a/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py b/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py
index 703e06cf8..f03226732 100644
--- a/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py
+++ b/yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py
@@ -77,6 +77,10 @@ class VtcThroughputNoisy(base.Scenario):
str(self.options['amount_of_ram'])
test_case['params']['number_of_cores'] = \
str(self.options['number_of_cores'])
+ test_case['params']['network'] = \
+ str(self.options['default_net_name'])
+ test_case['params']['subnet'] = \
+ str(self.options['default_subnet_name'])
res = dict()
try:
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py
index 41235635c..ac7fad88e 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py
@@ -34,7 +34,8 @@ class BenchmarkBaseClass(object):
params[param] = self.get_features()['default_values'][param]
for param in self.get_features()['parameters']:
- if params[param] not in \
+ if param in self.get_features()['allowed_values'] and \
+ params[param] not in \
(self.get_features())['allowed_values'][param]:
raise ValueError('Value of parameter "' + param +
'" is not allowed')
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
index 9610bc165..cbb4121bb 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
@@ -20,6 +20,8 @@ from experimental_framework import common
NUM_OF_NEIGHBORS = 'num_of_neighbours'
AMOUNT_OF_RAM = 'amount_of_ram'
NUMBER_OF_CORES = 'number_of_cores'
+NETWORK_NAME = 'network'
+SUBNET_NAME = 'subnet'
class InstantiationValidationNoisyNeighborsBenchmark(
@@ -40,6 +42,8 @@ class InstantiationValidationNoisyNeighborsBenchmark(
features['parameters'].append(NUM_OF_NEIGHBORS)
features['parameters'].append(AMOUNT_OF_RAM)
features['parameters'].append(NUMBER_OF_CORES)
+ features['parameters'].append(NETWORK_NAME)
+ features['parameters'].append(SUBNET_NAME)
features['allowed_values'][NUM_OF_NEIGHBORS] = \
['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
features['allowed_values'][NUMBER_OF_CORES] = \
@@ -50,6 +54,8 @@ class InstantiationValidationNoisyNeighborsBenchmark(
features['default_values'][NUM_OF_NEIGHBORS] = '1'
features['default_values'][NUMBER_OF_CORES] = '1'
features['default_values'][AMOUNT_OF_RAM] = '256M'
+ features['default_values'][NETWORK_NAME] = ''
+ features['default_values'][SUBNET_NAME] = ''
return features
def init(self):
@@ -58,6 +64,8 @@ class InstantiationValidationNoisyNeighborsBenchmark(
'local out_file = "' +
self.results_file + '"')
heat_param = dict()
+ heat_param['network'] = self.params[NETWORK_NAME]
+ heat_param['subnet'] = self.params[SUBNET_NAME]
heat_param['cores'] = self.params['number_of_cores']
heat_param['memory'] = self.params['amount_of_ram']
for i in range(0, int(self.params['num_of_neighbours'])):
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
index 3182837c5..ee02bcc93 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
@@ -18,6 +18,10 @@ from experimental_framework.benchmarks import rfc2544_throughput_benchmark \
from experimental_framework import common
+NETWORK_NAME = 'network'
+SUBNET_NAME = 'subnet'
+
+
class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark):
def __init__(self, name, params):
@@ -35,6 +39,8 @@ class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark):
features['parameters'].append('num_of_neighbours')
features['parameters'].append('amount_of_ram')
features['parameters'].append('number_of_cores')
+ features['parameters'].append(NETWORK_NAME)
+ features['parameters'].append(SUBNET_NAME)
features['allowed_values']['num_of_neighbours'] = \
['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
features['allowed_values']['number_of_cores'] = \
@@ -42,6 +48,8 @@ class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark):
features['allowed_values']['amount_of_ram'] = \
['256M', '1G', '2G', '3G', '4G', '5G', '6G', '7G', '8G', '9G',
'10G']
+ features['default_values'][NETWORK_NAME] = ''
+ features['default_values'][SUBNET_NAME] = ''
features['default_values']['num_of_neighbours'] = '1'
features['default_values']['number_of_cores'] = '1'
features['default_values']['amount_of_ram'] = '256M'
@@ -58,6 +66,8 @@ class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark):
heat_param = dict()
heat_param['cores'] = self.params['number_of_cores']
heat_param['memory'] = self.params['amount_of_ram']
+ heat_param['network'] = self.params[NETWORK_NAME]
+ heat_param['subnet'] = self.params[SUBNET_NAME]
for i in range(0, int(self.params['num_of_neighbours'])):
stack_name = self.stack_name + str(i)
common.DEPLOYMENT_UNIT.deploy_heat_template(self.template_file,
diff --git a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py b/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
index 186258f7d..596ee7a96 100644
--- a/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
+++ b/yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
@@ -76,7 +76,6 @@ class DeploymentUnit:
if not os.path.isfile(template_file):
raise ValueError('The specified file does not exist ("' +
template_file + '")')
- self.heat_manager.validate_heat_template(template_file)
try:
self.heat_manager.create_stack(template_file, stack_name,
parameters)
diff --git a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py b/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
index 28c069f6c..ab3df5c38 100644
--- a/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
+++ b/yardstick/vTC/apexlake/experimental_framework/heat_manager.py
@@ -76,9 +76,10 @@ class HeatManager:
:param stack_name: Name of the stack to be checked (type: str)
:return: (type: str)
"""
- for stack in self.heat.stacks.list():
- if stack.stack_name == stack_name:
- return stack.stack_status
+ if self.heat:
+ for stack in self.heat.stacks.list():
+ if stack.stack_name == stack_name:
+ return stack.stack_status
return 'NOT_FOUND'
def validate_heat_template(self, heat_template_file):
diff --git a/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml b/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml
index 85477fe85..9820705a4 100644
--- a/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml
+++ b/yardstick/vTC/apexlake/heat_templates/stress_workload.yaml
@@ -9,24 +9,18 @@ parameters:
type: string
memory:
type: string
+ network:
+ type: string
+ subnet:
+ type: string
resources:
- internal_net:
- type: OS::Neutron::Net
- properties:
- name: traffic_network
- internal_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: internal_net }
- cidr: 10.100.0.0/24
-
port:
type: OS::Neutron::Port
properties:
- network: { get_resource: internal_net }
+ network: { get_param: network }
fixed_ips:
- - subnet: { get_resource: internal_subnet }
+ - subnet: { get_param: subnet }
vm1:
type: OS::Nova::Server
@@ -49,28 +43,22 @@ resources:
dhclient eth1
sed -i 's/localhost/localhost traffic_vm1/g' /etc/hosts
- touch /etc/resolfconf/resolv.conf.d/tail
- echo 'nameserver 8.8.8.8' > /etc/resolvconf/resolv.conf.d/tail
+ touch /etc/resolvconf/resolv.conf.d/tail
+ echo 'nameserver 10.118.32.193' > /etc/resolvconf/resolv.conf.d/tail
resolvconf -u
+ echo 'nameserver 10.118.32.193' > /etc/resolv.conf
+
# Installation of stress
apt-get install -y stress
cd /home/clouduser
- # Setup merlin
- rm -rf merlin
- mkdir merlin
- cd merlin
- wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip
- apt-get install -y zip
- unzip MerlinAgent-12-06-2015-TNovaVM-001.zip
- ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm
- ./updateConfiguration.py ./instrumentation.cfg tags role=cpu_stress
- nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 &
- cd ..
# workload setup
- nohup stress -c #CORES --vm-bytes #MEMORY
+ echo 'stress -c $CORES --vm-bytes $MEMORY' > ./stress.sh
+ chmod +x ./stress.sh
+ nohup ./stress.sh &
+ #nohup stress -c #CORES --vm-bytes #MEMORY
params:
$NAME: { get_param: name }
diff --git a/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py b/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py
index 463035743..f65600f6e 100644
--- a/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py
+++ b/yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py
@@ -67,6 +67,8 @@ class InstantiationValidationInitTest(unittest.TestCase):
expected['parameters'].append('throughput')
expected['parameters'].append('vlan_sender')
expected['parameters'].append('vlan_receiver')
+ expected['parameters'].append('network')
+ expected['parameters'].append('subnet')
expected['parameters'].append(mut.NUM_OF_NEIGHBORS)
expected['parameters'].append(mut.AMOUNT_OF_RAM)
expected['parameters'].append(mut.NUMBER_OF_CORES)
@@ -83,6 +85,8 @@ class InstantiationValidationInitTest(unittest.TestCase):
expected['default_values']['throughput'] = '1'
expected['default_values']['vlan_sender'] = '-1'
expected['default_values']['vlan_receiver'] = '-1'
+ expected['default_values']['network'] = ''
+ expected['default_values']['subnet'] = ''
expected['default_values'][mut.NUM_OF_NEIGHBORS] = '1'
expected['default_values'][mut.NUMBER_OF_CORES] = '1'
expected['default_values'][mut.AMOUNT_OF_RAM] = '256M'
@@ -106,6 +110,8 @@ class InstantiationValidationInitTest(unittest.TestCase):
self.iv.results_file = 'res_file'
self.iv.params = {'number_of_cores': 1,
'amount_of_ram': 1,
+ 'network': 1,
+ 'subnet': 1,
'num_of_neighbours': 1}
self.iv.template_file = 'template.yaml'
self.iv.init()
@@ -115,7 +121,10 @@ class InstantiationValidationInitTest(unittest.TestCase):
'res_file' + '"')
mock_deploy_heat.assert_called_once_with('template.yaml',
'neighbour0',
- {'cores': 1, 'memory': 1})
+ {'cores': 1,
+ 'memory': 1,
+ 'network': 1,
+ 'subnet': 1})
self.assertEqual(self.iv.neighbor_stack_names, ['neighbour0'])
@mock.patch('experimental_framework.common.replace_in_file')
diff --git a/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py b/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py
index 6544fea43..fc5a7fddb 100644
--- a/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py
+++ b/yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py
@@ -77,6 +77,8 @@ class TestMultiTenancyThroughputBenchmark(unittest.TestCase):
heat_param = dict()
heat_param['cores'] = num_of_cores
heat_param['memory'] = amount_of_ram
+ heat_param['network'] = ''
+ heat_param['subnet'] = ''
neighbor_stack_names = list()
deployment_unit.\