diff options
-rwxr-xr-x | src/dpdk/Makefile.dpdk_meson | 74 | ||||
-rw-r--r-- | src/ovs/Makefile.ovs_dpdk_meson | 123 | ||||
-rw-r--r-- | src/package-list.mk.dpdk_meson | 32 | ||||
-rwxr-xr-x | systems/centos/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/debian/build_base_machine.sh | 3 | ||||
-rw-r--r-- | systems/fedora/24/build_base_machine.sh | 3 | ||||
-rw-r--r-- | systems/fedora/25/build_base_machine.sh | 3 | ||||
-rw-r--r-- | systems/fedora/26/build_base_machine.sh | 3 | ||||
-rw-r--r-- | systems/fedora/33/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/opensuse/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/rhel/7.2/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/rhel/7.3/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/rhel/7.5/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/ubuntu/build_base_machine.sh | 3 | ||||
-rw-r--r-- | tools/cloudinfo.py | 94 | ||||
-rw-r--r-- | tools/k8s/load-generator/Dockerfile | 27 | ||||
-rwxr-xr-x | tools/k8s/load-generator/README.md | 24 | ||||
-rwxr-xr-x | tools/k8s/load-generator/config.zpl | 52 | ||||
-rw-r--r-- | tools/k8s/load-generator/csdeployment.yaml | 39 | ||||
-rw-r--r-- | tools/pkt_gen/trex/trex_client.py | 6 |
20 files changed, 501 insertions, 3 deletions
diff --git a/src/dpdk/Makefile.dpdk_meson b/src/dpdk/Makefile.dpdk_meson new file mode 100755 index 00000000..d0dd9e1a --- /dev/null +++ b/src/dpdk/Makefile.dpdk_meson @@ -0,0 +1,74 @@ +# makefile to manage dpdk package +# + +# Copyright 2022 Anuket +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# Contributors: +# Aihua Li, Huawei Technologies. +# Martin Klozik, Intel Corporation. +# Christian Trautman, Red Hat Inc. +# Sridhar Rao, The Linux Foundation. + +include ../mk/master.mk +include ../package-list.mk +include /etc/os-release + +.PHONY: install force_make + +ifndef VHOST_USER + VHOST_USER = n +endif +WORK_DIR = dpdk +TAG_DONE_FLAG = $(WORK_DIR)/.$(DPDK_TAG).tag.done + +all: force_make + @echo "Finished making $(WORK_DIR) " + +INSTALL_TARGET = force_make + +force_make: $(TAG_DONE_FLAG) + $(AT)cd $(WORK_DIR) && git pull $(DPDK_URL) $(DPDK_TAG) + $(AT)cd $(WORK_DIR) && meson build + $(AT)cd $(WORK_DIR) && cd build && meson configure -Denable_kmods=true && ninja + @echo "Make done" + +install: $(INSTALL_TARGET) + $(AT)sudo cp -a $(WORK_DIR)/$(DPDK_TARGET)/kmod $(INSTALL_DIR)/lib/modules/$(KERNEL_VERSION) + @echo "install done" + +# hard way to clean and clobber +clean: + $(AT)cd $(WORK_DIR) && git clean -xfd *.o +clobber: + $(AT)rm -rf $(WORK_DIR) + +# distclean is for developer who would like to keep the +# clone git repo, saving time to fetch again from url +distclean: + $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f + +test: + @echo "Make test in $(WORK_DIR) (stub) " + +sanity: + @echo "Make sanity in $(WORK_DIR) (stub) " + +$(WORK_DIR): + $(AT)git clone $(DPDK_URL) dpdk + +$(TAG_DONE_FLAG): $(WORK_DIR) + $(AT)cd $(WORK_DIR); git checkout $(DPDK_TAG) + $(AT)touch $@ diff --git a/src/ovs/Makefile.ovs_dpdk_meson b/src/ovs/Makefile.ovs_dpdk_meson new file mode 100644 index 00000000..4b4d997d --- /dev/null +++ b/src/ovs/Makefile.ovs_dpdk_meson @@ -0,0 +1,123 @@ +# makefile to manage ovs package +# + +# Copyright 2022 Anuket +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# Contributors: +# Aihua Li, Huawei Technologies. +# Sridhar Rao, The Linux Foundation + +include ../mk/master.mk +include ../package-list.mk + +WORK_DIR = ovs +TAG_DONE_FLAG = $(WORK_DIR)/.$(OVS_TAG).done +CONFIG_CMD = +CONFIG_CMD += ./configure +OVS_VANILLA = ../../src_vanilla/ovs + +# If WITH_LINUX is defined, OVS is built without DPDK but with kernel +# module +# By default, OVS is built with DPDK + +# WITH_LINUX is the Linux kernel build directory used for building +# OVS kernel module as documented in OVS --with-linux switch +ifneq ($(WITH_LINUX),) # Building with Linux kernel +CONFIG_CMD += --with-linux=$(WITH_LINUX) + +else # Building with DPDK + +# DPDK_DIR is the top directory for dpdk source tree +# it can be passed in from Makefile command +# if it is not set, try to read it in from environment +# if it is still not set, then set it using relative path +PKG_CONFIG_PATH := ../dpdk/dpdk/build/meson-private +LD_CONFIG_PATH := ../dpdk/dpdk/build/lib +export LD_CONFIG_PATH +export PKG_CONFIG_PATH + +# echo $$ENV{LD_CONFIG_PATH} + +CONFIG_CMD += --with-dpdk=shared +CONFIG_CMD += CFLAGS="-g -O2 -Wno-cast-align" + +endif # Kernel vs. DPDK + +.PHONY: install force_install config force_make + +# install depends on make +force_install: force_make + +all: force_make + @echo "Finished making $(WORK_DIR) " + +config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure + $(AT)cd $(WORK_DIR); LD_CONFIG_PATH=../../dpdk/dpdk/build/lib PKG_CONFIG_PATH=../../dpdk/dpdk/build/meson-private $(CONFIG_CMD) + @echo "Configure done" + +INSTALL_TARGET = force_install force_make + +force_make: $(WORK_DIR)/Makefile + $(AT)cd $(WORK_DIR) && git pull $(OVS_URL) $(OVS_TAG) + @echo "git pull done" + $(AT)echo "WITH_LINUX = $(WITH_LINUX)" + $(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) + @echo "Make done" + +force_install: + $(AT)sudo make -C $(WORK_DIR) modules_install + $(AT)sudo $(MAKE) -C $(WORK_DIR) install + +install: $(INSTALL_TARGET) + +# hard way to clean and clobber +clean: + $(AT)cd $(WORK_DIR) && git clean -xfd *.o +clobber: + $(AT)rm -rf $(WORK_DIR) + $(AT)rm -rf $(OVS_VANILLA) + +# distclean is for developer who would like to keep the +# clone git repo, saving time to fetch again from url +distclean: + $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f + +test: + @echo "Make test in $(WORK_DIR) (stub) " + +sanity: + @echo "Make sanity in $(WORK_DIR) (stub) " + +.PHONY: boot +# boot ovs is the process to produce the script 'configure' +boot $(WORK_DIR)/configure: + @echo "booting up ovs" + $(AT)cd $(WORK_DIR); ./boot.sh + @echo "done booting ovs" + +boot $(WORK_DIR)/configure: $(TAG_DONE_FLAG) + +$(WORK_DIR): + $(AT)git clone $(OVS_URL) ovs + $(AT)mkdir -p $(OVS_VANILLA) + $(AT)cp -rf ./* $(OVS_VANILLA) + +$(TAG_DONE_FLAG): $(WORK_DIR) + $(AT)cd ovs; git checkout $(OVS_TAG) +ifneq ($(PATCH_FILE),) + $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE) +endif + $(AT)touch $@ diff --git a/src/package-list.mk.dpdk_meson b/src/package-list.mk.dpdk_meson new file mode 100644 index 00000000..3c219e53 --- /dev/null +++ b/src/package-list.mk.dpdk_meson @@ -0,0 +1,32 @@ +# Copyright (c) 2016-2017 Intel corporation. +# +# 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 +# +# Upstream Package List +# +# Everything here is defined as its suggested default +# value, it can always be overriden when invoking Make + +# dpdk section +# DPDK_URL ?= git://dpdk.org/dpdk +DPDK_URL ?= http://dpdk.org/git/dpdk +DPDK_TAG ?= v22.03 + +# OVS section +OVS_URL ?= https://github.com/openvswitch/ovs +OVS_TAG ?= v2.17.0 + +# VPP section +VPP_URL ?= https://git.fd.io/vpp +VPP_TAG ?= v21.01 + +# QEMU section +QEMU_URL ?= https://github.com/qemu/qemu.git +QEMU_TAG ?= v3.1.1 + +# TREX section +TREX_URL ?= https://github.com/cisco-system-traffic-generator/trex-core.git +TREX_TAG ?= v2.86 diff --git a/systems/centos/build_base_machine.sh b/systems/centos/build_base_machine.sh index fdaa37b5..31b26e87 100755 --- a/systems/centos/build_base_machine.sh +++ b/systems/centos/build_base_machine.sh @@ -47,6 +47,8 @@ pciutils cifs-utils sysstat sshpass +meson +ninja-build # libs libpcap-devel @@ -79,6 +81,7 @@ yum -y install $(echo " rh-python36 rh-python36-python-tkinter python3-setuptools +python3-pyelftools git-review " | grep -v ^#) # prevent ovs vanilla from building from source due to kernel incompatibilities diff --git a/systems/debian/build_base_machine.sh b/systems/debian/build_base_machine.sh index cc3f1eb8..e41837a2 100755 --- a/systems/debian/build_base_machine.sh +++ b/systems/debian/build_base_machine.sh @@ -27,6 +27,9 @@ apt-get -y install curl apt-get -y install git apt-get -y install wget apt-get -y install python3-venv +apt-get -y install python3-pyelftools +apt-get -y install meson +apt-get -y install ninja-build # Make and Compilers apt-get -y install make diff --git a/systems/fedora/24/build_base_machine.sh b/systems/fedora/24/build_base_machine.sh index bbde9b77..12bff64a 100644 --- a/systems/fedora/24/build_base_machine.sh +++ b/systems/fedora/24/build_base_machine.sh @@ -34,6 +34,8 @@ pixman-devel openssl-devel redhat-rpm-config elfutils-libelf-devel +meson +ninja-build # tools curl @@ -63,6 +65,7 @@ python3-libs libreport-python3 abrt-python3 abrt-addon-python3 +python3-pyelftools # libs numactl diff --git a/systems/fedora/25/build_base_machine.sh b/systems/fedora/25/build_base_machine.sh index df8ae620..0ac53809 100644 --- a/systems/fedora/25/build_base_machine.sh +++ b/systems/fedora/25/build_base_machine.sh @@ -34,6 +34,8 @@ pixman-devel openssl-devel redhat-rpm-config elfutils-libelf-devel +meson +ninja-build # tools curl @@ -63,6 +65,7 @@ python3-libs libreport-python3 abrt-python3 abrt-addon-python3 +python3-pyelftools # libs numactl diff --git a/systems/fedora/26/build_base_machine.sh b/systems/fedora/26/build_base_machine.sh index 84c0695b..323824b5 100644 --- a/systems/fedora/26/build_base_machine.sh +++ b/systems/fedora/26/build_base_machine.sh @@ -34,6 +34,8 @@ pixman-devel openssl-devel redhat-rpm-config elfutils-libelf-devel +meson +ninja-build # tools curl @@ -63,6 +65,7 @@ python3-libs libreport-python3 abrt-python3 abrt-addon-python3 +python3-pyelftools # libs numactl diff --git a/systems/fedora/33/build_base_machine.sh b/systems/fedora/33/build_base_machine.sh index f521827e..f3a27644 100644 --- a/systems/fedora/33/build_base_machine.sh +++ b/systems/fedora/33/build_base_machine.sh @@ -34,6 +34,8 @@ pixman-devel openssl-devel redhat-rpm-config elfutils-libelf-devel +meson +ninja-build # tools curl @@ -62,6 +64,7 @@ python3-libs python3-libreport python3-abrt python3-abrt-addon +python3-pyelftools # libs numactl diff --git a/systems/opensuse/build_base_machine.sh b/systems/opensuse/build_base_machine.sh index 8b26440c..b7d4249a 100755 --- a/systems/opensuse/build_base_machine.sh +++ b/systems/opensuse/build_base_machine.sh @@ -50,6 +50,8 @@ sysstat java-1_8_0-openjdk git-review mlocate +meson +ninja-build # python python3 @@ -59,6 +61,7 @@ python3-setuptools python3-devel python3-tk python3-virtualenv +python3-pyelftools # libraries libnuma1 diff --git a/systems/rhel/7.2/build_base_machine.sh b/systems/rhel/7.2/build_base_machine.sh index c0f367ab..aefa5e5d 100755 --- a/systems/rhel/7.2/build_base_machine.sh +++ b/systems/rhel/7.2/build_base_machine.sh @@ -34,6 +34,8 @@ pkglist=(\ openssl-devel\ pixman-devel\ sysstat\ + meson\ + ninja-build\ ) # Tools @@ -60,6 +62,7 @@ pkglist=( pkglist=( "${pkglist[@]}"\ python-six\ + python3-pyelftools\ ) # install RHEL compatible epel for sshpass diff --git a/systems/rhel/7.3/build_base_machine.sh b/systems/rhel/7.3/build_base_machine.sh index 42c36e4c..55532781 100755 --- a/systems/rhel/7.3/build_base_machine.sh +++ b/systems/rhel/7.3/build_base_machine.sh @@ -34,6 +34,8 @@ pkglist=(\ openssl-devel\ pixman-devel\ sysstat\ + meson\ + ninja-build\ ) # Tools @@ -60,6 +62,7 @@ pkglist=( pkglist=( "${pkglist[@]}"\ python-six\ + python3-pyelftools\ ) # install RHEL compatible epel for sshpass diff --git a/systems/rhel/7.5/build_base_machine.sh b/systems/rhel/7.5/build_base_machine.sh index deb4e8a2..3dc04b15 100755 --- a/systems/rhel/7.5/build_base_machine.sh +++ b/systems/rhel/7.5/build_base_machine.sh @@ -34,6 +34,8 @@ pkglist=(\ openssl-devel\ pixman-devel\ sysstat\ + meson\ + ninja-build\ ) # Tools @@ -60,6 +62,7 @@ pkglist=( pkglist=( "${pkglist[@]}"\ python-six\ + python3-pyelftools\ ) # install RHEL compatible epel for sshpass diff --git a/systems/ubuntu/build_base_machine.sh b/systems/ubuntu/build_base_machine.sh index 2f3e7b25..910cd173 100755 --- a/systems/ubuntu/build_base_machine.sh +++ b/systems/ubuntu/build_base_machine.sh @@ -31,6 +31,9 @@ apt-get -y install libssl1.0.0 apt-get -y install libxml2 apt-get -y install zlib1g-dev apt-get -y install scapy +apt-get -y install meson +apt-get -y install ninja-build +apt-get -y install python3-pyelftools # Linux Kernel Source apt-get -y install linux-source diff --git a/tools/cloudinfo.py b/tools/cloudinfo.py new file mode 100644 index 00000000..18550e78 --- /dev/null +++ b/tools/cloudinfo.py @@ -0,0 +1,94 @@ +# Copyright 2022 The Linux Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +""" +Get Cloud information and save it a file +""" + +import os +import json +from kubernetes import client, config +from kubernetes.client.rest import ApiException +from conf import settings + +def save_kubernetes_info(): + """ + Save Kubernetes Cluster Info + """ + config.load_kube_config(settings.getValue('K8S_CONFIG_FILEPATH')) + with open(os.path.join(settings.getValue('RESULTS_PATH'), + 'cloud_info.txt'), 'a+') as outf: + api = client.CoreV1Api() + try: + node_info = api.list_node() + except ApiException as err: + raise Exception from err + for ni_item in node_info.items: + outf.write("\n ******************************************** \n") + outf.write("\n System Information \n") + sinfo = {'Architecture': ni_item.status.node_info.architecture, + 'Container Runtime Version':ni_item.status.node_info.container_runtime_version, + 'kernel version':ni_item.status.node_info.kernel_version, + 'Kube Proxy Version':ni_item.status.node_info.kube_proxy_version, + 'Kubelet Version':ni_item.status.node_info.kubelet_version, + 'Operating System':ni_item.status.node_info.operating_system, + 'OS Image':ni_item.status.node_info.os_image} + json.dump(sinfo, outf, indent=4) + outf.write("\n List of Addresses \n") + addresses = [] + for addrs in ni_item.status.addresses: + entry = {'address': addrs.address, 'type': addrs.type} + addresses.append(entry) + json.dump(entry, outf, indent=4) + sinfo['List of Addresses'] = entry + outf.write("\n Allocatable Resources \n") + sinfo['Allocatable Resources'] = ni_item.status.allocatable + json.dump(ni_item.status.allocatable, outf, indent=4) + outf.write("\n Available Resources \n") + sinfo['Available Resources'] = ni_item.status.capacity + json.dump(ni_item.status.capacity, outf, indent=4) + api = client.VersionApi() + try: + version_info = api.get_code() + except ApiException as err: + raise Exception from err + outf.write("\n Version Information \n") + vinfo = {'git_commit': version_info.git_commit, 'git_version': version_info.git_version, + 'platform': version_info.platform, 'go_version': version_info.go_version} + #json.dump(vinfo, outf, indent=4) + result = {**sinfo, **vinfo} + return result + +def save_openstack_info(): + """ + Save Openstack Info + """ + return None + +def save_cloud_info(): + """ + Save Cloud Information + """ + if settings.getValue('K8S'): + return save_kubernetes_info() + elif settings.getValue('OPENSTACK'): + return save_openstack_info() + else: + print("Unsupported Cloud") + return None + return 0 + +if __name__ == "__main__": + save_cloud_info() diff --git a/tools/k8s/load-generator/Dockerfile b/tools/k8s/load-generator/Dockerfile new file mode 100644 index 00000000..6212f6b2 --- /dev/null +++ b/tools/k8s/load-generator/Dockerfile @@ -0,0 +1,27 @@ +# Copyright 2022 The Linux Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM debian:bullseye +RUN mkdir -p /opt/spirent/inception +EXPOSE 3357 +EXPOSE 13731 +EXPOSE 13771 +EXPOSE 17731 +RUN apt-get clean && \ + apt-get update && \ + apt-get install -y net-tools procps +COPY ./config.zpl /opt/spirent/inception/config.zpl +COPY ./cloudstress /opt/spirent/inception/cloudstress +WORKDIR /opt/spirent/inception +CMD ["cloudstress", "--conffile", "config.zpl"] diff --git a/tools/k8s/load-generator/README.md b/tools/k8s/load-generator/README.md new file mode 100755 index 00000000..3b03a9b0 --- /dev/null +++ b/tools/k8s/load-generator/README.md @@ -0,0 +1,24 @@ +# Stressor for Cloud-Native Usecases using Spirent Cloudstress
+
+## Updating the configuration
+
+Modify the config.zpl file according to your requirements - configure the required amount of CPU and Memory stresses.
+
+## Building container (if required)
+
+Download the cloudstress binary from the artifacts.
+
+Build using the following command
+
+```sh
+$ docker build --rm -t autocloudstress .
+```
+
+## Using existing container.
+
+Pre-built container exists in dockerhub as: vsperf/autocloudstress:thoth
+
+## Running workloads.
+
+Run the built or existing container as pods.
+Example deployment file: csdeployment.yaml present in this folder.
diff --git a/tools/k8s/load-generator/config.zpl b/tools/k8s/load-generator/config.zpl new file mode 100755 index 00000000..a0dbc281 --- /dev/null +++ b/tools/k8s/load-generator/config.zpl @@ -0,0 +1,52 @@ +# Copyright 2022 Spirent Communications. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +#rfc.zeromq.org/spec:4/ZPL + +generator + cpu + utilization = 100.0 + running = "true" + block + writes_per_sec = 1048576 + write_size = 2M + reads_per_sec = 1048576 + read_size = 2M + queue_depth = 4 + vdev_path = "/tmp" + vdev_size = 1048576000 + file_size = 1000 + running = "true" + pattern = "random" + memory + writes_per_sec = 1048576 + write_size = 2000000 + reads_per_sec = 1048576 + read_size = 2000000 + buffer_size = 250000000 + running = "true" + pattern = "random" + network.client + connections = 10 + threads = 5 + ops_per_connection = 10 + protocol = tcp + writes_per_sec = 1043576 + write_size = 2000000 + reads_per_sec = 1043576 + read_size = 2000000 + running = "true" + network.server + running = "true" diff --git a/tools/k8s/load-generator/csdeployment.yaml b/tools/k8s/load-generator/csdeployment.yaml new file mode 100644 index 00000000..e6d32d5f --- /dev/null +++ b/tools/k8s/load-generator/csdeployment.yaml @@ -0,0 +1,39 @@ +# Copyright 2022 The Linux Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cloudstress-deployment +spec: + selector: + matchLabels: + app: cloudstress + replicas: 2 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: cloudstress + spec: + containers: + - name: cloudstress + image: vsperf/autocloudstress:thoth + resources: + requests: + cpu: "2000m" + memory: "2000Mi" + limits: + cpu: "2000m" + memory: "2000Mi" diff --git a/tools/pkt_gen/trex/trex_client.py b/tools/pkt_gen/trex/trex_client.py index 680497ec..01d4d389 100644 --- a/tools/pkt_gen/trex/trex_client.py +++ b/tools/pkt_gen/trex/trex_client.py @@ -108,7 +108,7 @@ class Trex(ITrafficGenerator): self._stlclient = None self._verification_params = None self._show_packet_data = False - self.trial_results = [] + self.trial_results = {} def show_packet_info(self, packet_a, packet_b): """ @@ -521,8 +521,8 @@ class Trex(ITrafficGenerator): return stats - @staticmethod - def calculate_results(stats): + # @staticmethod + def calculate_results(self, stats): """Calculate results from Trex statistic """ result = OrderedDict() |