summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts
AgeCommit message (Collapse)AuthorFilesLines
2023-01-30Create a unique machine nameLuc Provoost1-0/+9
Using containers, we need a unique --file-prefix parameter in the EAL DPDK configuration. The file-prefix name is the name of the PROX machine. This is defined by the name parameter in the rapid.env file. When the name parameter is not specified in the rapid.env file, the name will be defined in the test file. The machine name will still be defined in the same way, but when a name is not unique, an number will be appended to the name to make it unique. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I0b4e3be60f8ddef6c7eb30bca25c041ea270e238
2023-01-17Allow a different pod spec for each podLuc Provoost3-23/+37
A new parameter is now introduced in the [PODx] sections of the rapid.pods file. This parameter specifies the pod spec yaml file that will be used to create this specif pod. When this parameter is not available, the default pod-rapid.yaml file will be used. The parameter name is spec_file_name. Also cleaned some lines of code exceeding 80 characters. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: Id26881517d45baf4bf6be2e82b4f9e049f2b2547
2023-01-17Fix issue with system_ready_for_rapid fileLuc Provoost2-3/+5
In the /opt/rapid directory, we used to check for the existance of the file system_ready_for_rapid. This file was created when all the initialization is done properly. This check was however broken and always resulted succesfully, even if the file did not exist. When executing runrapid.py, the system will now wait to connect to PROX, till this file exists. The file is created when running start.sh Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: Idca52549aae40070a0b6ea1d7ccbf6c322dc631d
2023-01-09Optional MAC address and other changesLuc Provoost3-16/+50
The MAC address of the dataplane interfaces in the environment file is now optional. If not specified, the HW MAC address of that interface will be used. When using l2 tests, the parameter will be needed anyway and the test will fail if the MAC address is not specified. Starting from DPDK 20.11, the EAL --pci-whitelist parameter changed into --allow. We are now checking the DPDK version of the PROX instance to determine which parameter to use. For pods using cgroup v2, we are now using a different file to determine the cpuset available to the pod. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I7a88458406b9ae3c8cae9c583cc37121d40c5073
2023-01-09Add entry in the log file when copying filesLuc Provoost1-0/+3
Added some extra logging in the rapid log file when we copy files to or from the PROX instances. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: If9947ce87cec34f8336c69a243e9d5340ca37aef
2023-01-09fix regex expression to find IPV4 addressLuc Provoost1-1/+1
helper.lua contains code to parse the IP addresses in the parameters.lua file. The regular expression to find the IPV4 address is fixed. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I9baf2b059fa281dc408bd0ea59b77d294750c1ef
2022-09-15Fix thresholds for increment_till_failLuc Provoost1-1/+1
The thresholds that define a successful step of the binary search, were not read from the test file or initialised to the default value in case of the increment_till_fail test. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I8347a683f35f8fd2ff26161709bf0bd16387f2e0
2022-09-15Removing the --socket-mem eal parameterLuc Provoost1-25/+1
This parameter is not needed any more for a successful run on a Kubernetes environment. I had to remove the parameter since this was not working anymore on the K8s deployments I am currently using. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I784611d66e003f1a6e344b2d9c7a2c06c5c2b114
2022-09-14Change search success criteriumLuc Provoost2-4/+12
When running a step in the binary search, we can now change the behaviour by adding a new parameter in the [test] section of the test file: generator_threshold. The default value for this parameter is set to inf, which results in the same behaviour as before this change was implemented. The relative difference between what the cores can generate and what is actually sent into the generator's interface must be lower than the generator_threshold, for the test to be successful. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: Id3e787b3571bdb9f241763fceaffccb9ea81a264
2022-09-13Fix the core to check number of bucketsLuc Provoost1-1/+1
We need to check the number of buckets PROX is using for the irq duration distribution. In the past, the scripts sent a command to PROX to check this on core 1. This was typically a core running the the IRQ task in case of VMs. With containers, this is not the case any more and we need to query which core will run this IRQ task. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: If06295774b05d94549955cfbb0b1bb5f4eaf03e2
2022-02-07Fix the search algorithmLuc Provoost1-9/+14
In case, we are sending less packets through than the requested amount of packets, we will now stop the binary search. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I7ddb8860d47104beffdd5ff05c0359f91f4908e9
2022-02-06Added sleep_time optional configuration in rapidXavier Simonart5-3/+13
This can for instance be useful to ensure that inter-iteration time is higher than SUT switch max_idle time. Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: I3a94b022f4d38e0c97d5cbd343b36a9a3ed5fd9e
2022-02-06Added support for no warmupXavier Simonart1-0/+4
If warmup time is set to 0, there will be no warmup at all. Before this patch, generator was started and immediately stopped which could result in some packets sent. Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: I7acada86c527bcde70ab0117b79f95208a382cdd
2022-02-06Added support for mis-ordered packets in rapidXavier Simonart3-11/+25
- mis-ordered packets are reported/displayed in an extra column - a treshold can be specified for mis-ordered packets, as a criterium Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: I3e17f86c44e54abcec2412ec57ba5303105b7b91
2021-12-30Prevent rapid considering delayed packets as lostXavier Simonart1-0/+1
In case of high latency in SUT, rapid was considering those packets as lost Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: Ifd52bb0f41e1995105bf216ed1068a50250403d8
2021-12-20Add support for preventing rapid to change flowsXavier Simonart2-5/+8
By default, in flowsize and warmup tests, rapid will set the flows by changing some fields. However, rapid only support some types of flows. Using this patch, one can let PROX define the flows, and prevent rapid to do it. This is done by specifying number of flows to 0 in rapid configuration. Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: I69c7e223aaf536ebcfe9fb52e8305d5625e79fa6
2021-11-02Create combined image and add helm chartYury Kylulin11-4/+131
Changes in this commit: 1) Create self contained image, rapid scripts can be executed from the management pod and create other testing pods in the cluster. 2) Helm chart to automate rapid deployment and proper service account configuration to be able to start management pod. 3) Fix for migration to paramiko. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: I0281871cce392b3003e0274602a5c90c29af9b23
2021-09-06Changes from ViNePerfSridhar K. N. Rao4-15/+31
This patch adds changes to support using rapid to run tests only. 1. Fix format.yaml path. Add format.yaml as datafile in setup.cfg 2. Do not call generate lua if starting prox is not required. 3. Move logs to results directory - if present 4. Machines should not be used in del, if not created. Fix syntax error. Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com> Change-Id: I580716573d0be2a8da02035f4d180e81b63b3fc8
2021-08-20Fix ssh timeout issueLuc Provoost1-1/+1
Moving to paramiko for ssh introduced a bug: when starting PROX through ssh, a default timeout of 15 seconds was started. The timer is now disable since we need to run PROX as long as the test will take. Change-Id: I65162fff33beb6d30d2f5ee2b83f9bef7880ce4b Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-07-16Using paramiko for all ssh & scpLuc Provoost6-118/+118
By using paramiko, we can now also use differnt credentials to login into the PROX instances. In the ssh section of the environment file, you can now also add the password parameter. Change-Id: I08d31cbf0d02d7e82b7fbe34268851f73ff5dde0 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-06-21Add support for multisocket memory reservationYury Kylulin3-16/+38
Automatic detection of allowed NUMA nodes for memory allocation added to Kubernetes environment. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: I4f8b2f64971d43414bbd290f7fcbc6210c1d6d71
2021-06-08fix container image and use latest codeLuc Provoost1-10/+4
The container image was not containing a working prox executable any more. Also took out the commit id, so we always have the latest prox code in the latest container image Change-Id: I4336e06031d5bf5b3f08f4bc32b76703fde34040 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-05-12Fix latency buckets with multiple lat coresLuc Provoost3-66/+98
The bucket data of the last latency core was taken into account when collecting the latency stats. We are now adding the bucket data for all cores. Also changed the error reporting when PROX instance is breaking the pipe connection (e.g. when the dataplane network is overloaded). Cleaning up some trailing spaces in pox_ctrl.py Change-Id: I09ba01ac65e7e4e9ff03ad47da83aa4f83250a67 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-05-10Reinstate installation of igb_uioLuc Provoost2-1/+9
For good performance on some platforms, we need the igb_uio driver. With this change, the driver is compiled and insmod done during boot time. When running the rapid scripts, the devbind.sh script is sent to the instances (after replacing the string "MACADDRESS"). Make sure you uncomment the proper line to chose which driver you want to use. Change-Id: I69549400a97f29e06add6ab44515e96ffa9ce0e8 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-05-10Fixing rapidxt for XtestingLuc Provoost5-4/+25
Changes were needed for installing the python rapid python package by adding 2 new files: pyproject.toml & setup.cfg. Also fixed a bug in rapidxt.py Change-Id: Iac98b6068afef4a5f1a97459ea1109211607d53d Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-05-05New test case: gen versus swap via gatewayLuc Provoost4-10/+134
A new test was added: tests/basicrapid_gw.test. Traffic generated will now go to the reflector (swap instance) via the Gateway. The swap instance will also send the traffic back via the gateway. This use case is created to support GCP testing where the interfaces are defined with a /32 netmask, and hence all traffic is routed via the gateway. Change-Id: I60142d650072ab345cd47a0f32cb6a8275da0542 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-30Do not run after_boot.sh by defaultLuc Provoost1-10/+12
In the definition of the stack in openstack-rapid.yaml, we define a CloudConfig resource. after_boot.sh is called automatically by a service (check-prox-system-setup.service), after each boot. In this file, defined in the CloudConfig resource, you can put instructions needed for succesful operation and to fix certain issues in your environment. By default, this file should NOT be executed, hence we should not have this in the CloudConfig. Change the name back to after_boot.sh if you need to execute this code. Change-Id: Ifd3f86fe6dfd31444b799833d6b435a310708f25 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-28Default use of rapid_rsa_keyLuc Provoost6-23/+35
A secret and public key pair is available in the rapid directory: rapid_rsa_key and rapid_rsa_key.pub. createrapid.py is now modified to upload this key into OpenStack if the keypair does not already exist in OpenStack. Which keypair to use is now only defined in params_rapid.yaml. You can still define a key pair with a different name in params_rapid.yaml. If the secret and public key files are not available, a new keypair will be created and the secret key file will be saved. The name of the secret key file is the name as the OpenStack keypair name. The name of the public file is the same, with the pub extension. Change-Id: Ib8b5e4bf3a3d3138216698dc588a6908248220c0 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-22Fix error in sut throughput measurementLuc Provoost1-1/+1
In the fomula to calculate the sut throughput measurement, we used the frequency of the wrong machine: the generator. This issue showed up when testing with generator and sut on a different type of compute node, with different processor frequency. Change-Id: Ib42bb8a30924d6bc6bb2773aed5dcc9145bb50fc Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-16Adding documentation in the test filesLuc Provoost16-15/+239
a README file in the tests subdirectory is now describing the parameters used in the test description files. Each test files has a comment pointing to the README file for more information. Change-Id: I49b9b3e1fac0a65c43e7f2d7dc90612923e28f78 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-15Rework of statistics reportingLuc Provoost28-200/+305
- Cleanup of the format.yaml file. - Adding of the packet mis-ordering statistics - Added a warmup phase to get the correct mis-ordering statistics since ARP messages need to be dealt with before we can collect correct misordering stats - Code cleanup avoiding some long lines - Removing background traffic control from rapid_flowsizetest.py since this is already done in the iteration code in rapid_test.py Change-Id: I4c60a90353f27b8e2d0b62505e8f1cd886a17f0a Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-12Code improvementsLuc Provoost5-280/+268
Rework of some of the code for better readability Change-Id: I559e88faba31d93e593d39cf436f3e114ba4528a Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-08cgnat test case addedLuc Provoost6-20/+346
A cgnat test can now be executed. This test needs 3 PROX instances. The first one, the generator needs to have an interface on the private dataplane network. The second instance, the cgnat needs to have it's first dataplane interface on the private network, while the second data plane needs to be on the public network. The third instance will be playing the role of internet server that the generator is connecting to. It will have one dataplane interface on the public network. This third instance will increase the packet size of the received packets by padding it with zeros and it will send the packets back to the cgnat mutliple times. How many times is defined by a multiplier in the cgnat.cfg file. In that cgnat file, we also define a range of IP addresses that will be used for the dynamic source IP NAT-ing. Make sure that the ports are allowed to accept other IP addresses than their own (e.g. allowed address pairs) and that the range of IP addresses is not overlapping with other machines in the public network. Change-Id: Ibc1c8513ac4e8a304378814fceb28c090dff895f Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-04-07Log ssh & scp related issues also on screenLuc Provoost1-10/+3
When scripts are doing an ssh or scp to the PROX instances, errors were sometimes hidden. E.g. when we try to upload a config file to the PROX instance that is already existing but owned by another user, we would not see the error on the screen. Note this will only happen if you build your own image. In case you use the pre-canned PROX images, this should not cause issues. Change-Id: I94176b737cd548c93afc71450a85910d7eca2b0c Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-03-15Fix the tuned optimizationsLuc Provoost8-30/+55
tuned-adm is now run through check_prox_system_setup.sh at the first system startup/reboot. This will result in the correct grub cmdline parameters. We are also coying the default rapid_rsa_key in the authorized_keys of the rapid user, which is now the default user to run the tests. Fixed also an issue in handle_mirror.c: using now ETYPE_IPv4. Changed deploycentostools.sh to reflect the changes done when building the image with disk-image-create. Change-Id: I5933d21faef9fe02b56c01d0b96e2c143cc5476d Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-03-10Remove useless site.retry from treeCédric Ollivier1-1/+0
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Id2a3fc69d097024cff608103ba7310388a273976
2021-02-25Preparation for packet mis-ordering statsLuc Provoost5-14/+18
Changed PROX and the python scripts so that the "lat all stats" command also returns the mis_ordered, extent and duplicate statistics. In order to make this work properly, we need now to also stop and restart the latency cores, every time we stop and start the generator cores, since the sequence numbers are reinitialised every time we start the generator core. Change-Id: Ic4212a989c8ee9d0f026a34ca63a08b982c32b71 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-02-11Add support for native Kubernetes CPU Manager0.0.1Yury Kylulin33-21/+132
For Kubernetes environment core ids in the config and test files are relative and automatically remapped to the allowed cores allocated for container. There is no change to the baremetal or VM environment. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: I63e499723e8213de1b05d4175eb3eddc4492ccf5
2021-02-01Fix the default test fileLuc Provoost1-1/+1
In a previous change, all test files were moved to the tests subdirectory. When not specifying the test file on the command line as a parameter, the default test file is used, as specified in rapid_defaults.py It did not reflect the fact that all test files were moved to this directory. Change-Id: I5c77b75dbdde040d0e30dda2b97e981dff572f2f Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-01-29Add rapid script sources in the imageYury Kylulin2-17/+22
Make image more universal and add rapid scripts for mgmt from the container. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: Ia46a8e147f978dd64bfe6c7b44f7dff92e241855
2021-01-27creation of tests and configs subdirectoriesLuc Provoost40-58/+136
All test files are now in the tests directory. All PROX config files moved to the configs directory. When specifying a test on the runrapid.py command line, you should now also mention the directory: e.g. --test tests/basicrapid.test In these test files, you need now to also include the configs subdirectory when specifying the prox configuration that needs to be used. The --map parameter has also changed. It can still take the file name of the map file, that specifies which PROX instance to use during a test. On top of that, you can now also specify a list of indices of the machines to be used during a test: e.g. --map [1,3]. Change-Id: I887cba59834dd8c903a22bc80959b10da2775398 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2021-01-27Add default SSH keysYury Kylulin2-0/+50
Adding default RSA keys for SSH access. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: Id9552717591a805562f3ed2f840251bd9f6a71c1
2020-12-28Improved PROX cleanup when exitingLuc Provoost23-167/+232
Sending now a 'quit' command to PROX, so that the thread running PROX in an ssh session is now cleaned up correctly. Also fixed a problem with the logging when running the code more than once. We only create handlers now, when they do not yet exist. Updated the rapid version. Also added some more tests in the testcases.yaml for xtesting. At the end of a run, the PROX.log files are copied in the results directory. The success criterium for a test 'pass_threshold' has been removed from the test files and is to be controlled by the xtesting testcases.yaml file. Change-Id: Ifbbb1c91f32c9176f52025d9ae4c495b432a94c9 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2020-12-10Fix for new config file structureYury Kylulin3-1/+21
Fix subnet configuration for the dataplane interface. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: I612113a86a960284303915d5d003bf67a1b48a72
2020-12-10Moving to python 3 for kubernetes scriptsYury Kylulin4-13/+11
Move to python version 3 in all scripts for kubernetes environment. Streamline file names to match existing libraries. Signed-off-by: Yury Kylulin <yury.kylulin@intel.com> Change-Id: Id875f4240a87ab600b445cb9a7fd97ec1335f88a
2020-12-08Reporting test details for all testsopnfv-10.0.0stable/jermaLuc Provoost8-60/+44
Test details were only implemented in rapid_flowsizetest.py. When executing other tests, an error occured. That is now fixed, although in some cases, None is returned. The format.yaml files defines now alsowhat will be reported in the Xtesting details. Change-Id: I5feae62dcf228664b24451d3fc5dfaaadf7edb5e Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2020-11-18Support for xtestingLuc Provoost12-15/+197
Some files were added to for rapid testing in the xtesting framework Change-Id: Id912789c5007ca8390a67fb5b359296089aa9618 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2020-11-13Fix for latency reporting and log file handlerLuc Provoost3-5/+5
The latency histogram dat did not contain samples collected during the first measurement of each step. The maximum latency did take the first step into account. As a result, you might see a test run with a maximum latency not showing up in the latency histogram data. This has been fixed by also including the data from the first measurement in the histogram data. In some cases, we also reported the wrong speed from the last unsuccessful step. This is now fixed and we do report the speed from the last successful step. In rapid_log.py, a fix was added to execute the rollover on the file handler of the log file in all cases. In some cases, the file handler with index 0 was not the file handler of the log file. Change-Id: I6c2b16c21dd0ee17d1d14e46c4c544e185324256 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2020-10-19Support dataplane subnet mask & latency histogramLuc Provoost16-36/+76
There is a new parameter in the config_file: dataplane_subnet_mask. This parameter is added to the dataplane IP addresses and is needed by the Linux stack to deal with some protocols (e.g. ARP). If not present, the default value of 24 will be used. In the end, this will make sure that IP addresses in the rapid.env file will have this mask, e.g. /24 If you use other tools than createrapid.py to create the rapid.env file, make sure to add the mask. This commit also introduces a change when exiting: we only copy the prox.log files from the different prox instances in case we expect a new prox.log file to be created in these instances. When using a valid format.yaml file, the tool will now also send the latency distribution data (histogram) to the URL. The tool is now also checking the value of bucket_size_exp: it needs to be 11 or more. Change-Id: I633cdc64ef687fdb6625be1e7482a5a371f83e93 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
2020-09-29New PROX version, background traffic reportingLuc Provoost18-86/+89
deploycentostools.sh is now installing a recent PROX version. When using background traffic, the tool is also reporting the total traffic that was handled by the NFVi stack, including foreground & background traffic. The use of the prox_socket and prox_launch_exit was also broken in a previous release and is now fixed. When setting prox_socket to false for a PROX instance, we will not create a socket connection to control that PROX instance. Setting this option to false is not meaningful for the generator PROX instances since we would not be able to control the behavior of the PROX generator during the test. You could use the generator against another non-PROX instance and then set prox_socket to false for that non-PROX instance. Default is true. prox_launch_exit is used to start and stop the PROX program inside the instance. Default is true. This is useful in case you want to start PROX manually to be able to inspect the PROX UI, but at the same time, let the rapid scripts control the testing. Change-Id: Ib5aa809f4be201859542769f5f55f4989dad97ef Signed-off-by: Luc Provoost <luc.provoost@intel.com>