aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
AgeCommit message (Collapse)AuthorFilesLines
2018-11-05Update Multi Port Stats reading for PROXDanielMartinBuckley1-10/+24
JIRA: YARDSTICK-1458 Removed excessive jitter by removing extra sleeps in start/stop/reset ssh Removed extra retries when bad data returned Added a slep at end of test to give runner a chance to empty the queue on shutdown Added a timeout on port retry attempts Change-Id: Ica60b11c7af242817a83c154157827581f60d16a Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-3/+4
This new class is designed to be used in a ``GenericVNF`` object (VNF or traffic generator) in a builder pattern. This consumer class will be instantiated when initializing the ``GenericVNF`` derived object. The ``GenericVNFConsumer`` endpoint is the ``GenericVNF``derived object itself. ``GenericVNFEndpoint`` is an interface class to be inherited in a ``GenericVNF`` child object; the VNF object will implement the endpoints methods. NewVNF(GenericVNF, GenericVNFEndpoint): def __init__(self, name, vnfd, task_id): ... self._consumer = vnf_base.GenericVNFConsumer([task_id], self) self._consumer.start_rpc_server() JIRA: YARDSTICK-1293 Change-Id: I1bcd980352099e9ebefdab0c96d51aa46f6a1e54 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-29NFVI support for standalone, baremetal and heat contextsChornyi, TarasX1-4/+11
JIRA: YARDSTICK-1257 Change-Id: I6733bd49ac91985e8f3d7722e6990e8733bb430e Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-28Decrease Sampling interval - Invalid Port resultsDanielMartinBuckley1-4/+6
JIRA: YARDSTICK-1219 The computed in/fwd throughputs displayed on the L2FWD, L3FWD and VPE dashboards. The computed value is likely 4x the expected value. It is required to return sampling information form Generator AND VNF at least every 1 second. Change-Id: I4435fd05ba3116ead836843a4c2fce133b767a28 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-06-26Decrease Sampling intervalDanielMartinBuckley1-9/+19
JIRA: YARDSTICK-1219 Currently NSB for NFVI using PROX returns sampling information every 13 seconds. This is too slow. It is required to return sampling information form Generator AND VNF at least every 1 second. This change is depandant on JIRA: YARDSTICK-1212 and YARDSTICK-1220 Change-Id: Ica7ab795a2919d191d8cd846d028e15739e33fb7 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-06-05Fix NSB NFVi metrics accuracyXavier Simonart1-9/+15
JIRA: YARDSTICK-1212 Change-Id: Ic4d4a3c00e4e278f4de06cc176ff663892895569 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-03-09Do NOT hardcode interface speed for PROX testsDanielMartinBuckley1-2/+2
JIRA: YARDSTICK-1035 Do not hardcode NIC/interface speed in PROX test. Test assumes NIC used is 10Gbps. This is incorrect. It could support 1Gbps, 10Gbps, 25Gbps, 40Gbps or something else. This is used to calculate pps (Packets Per Second) In Baremetal the NIC speed could be extracted. however when run on a virtual machine this is not possible. Solution: Add in options section of test file. eg. Options: interface_speed_gbps: 10 Where 10 refers to a 10Gbps. In a setup where multiple interfaces are used. This will refer to the speed of the slowest connection. Change-Id: I89ab16479a2cdd1d79e52cbcc5a972762c60d057 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-03-01NSB: move interface probe to VNF, and attempt driver-only probe firstRoss Brattain1-1/+2
If no devices are present we can't detect MAC address so we can't match Heat ports to interfaces. If only the driver is missing we can try to probe the driver using lspci. We can use lspci to ask the kernel what driver it should use for the PCI device. If we can't probe at all because the device is already bound, we can use dpkd-devind to find all the PCI address we care about and create a map with PCI device and real kernel driver. Then we can dpdk force rebind to the kernel driver. Once we have rebound to the kernel driver we can detect MAC address and all the other attributes that are required. Fix VnfSshHelper to allow override of wait timeout And a bunch of other refactors that got swept up in this JIRA: YARDSTICK-835 Change-Id: I14cb657ed289a77941d048345d06ced5b5d5da52 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-28Addition of storage of extra counters for GrafanaDanielMartinBuckley1-5/+21
JIRA: YARDSTICK-1036 This stores a number of extra counters in influxdb for Prox test cases. It also stores existing counters with a "succcess_" tag. Previously throughput where stored without success or failure indication. Also "Result_" counters are also stored. These can now be used by Grafana to graph output. Change-Id: Ie5636c14ecbab1b53a988bdfbd47ddd1fcdbd695 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2017-10-19BugFix: Negative dropped packets in Prox testsAbhijit Sinha1-3/+3
Removed the abs function which can potentially mask negative dropped packets. Dropped packets in Prox workload VNF = rx_packets - tx_packets Change-Id: I510a351e899cdf9a1f366d632b9f0528b1d9dcce Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-10-13BugFix: Fix to negative dropped packets appearing in results.DanielMartinBuckley1-1/+1
As per defect: the "VNF packets dropped" time series is negative - negative number of packets dropped is not meaningful. Solution: Return a positive value. Change-Id: I358006a691f2d6b5954333b9f7a745aba97ae44f Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2017-10-03NSB PROX test hang fixesRoss Brattain1-12/+29
The PROX tests were hanging in the duration runner. These are fixes for various errors: raise error in collect_kpi if VNF is down move prox dpdk_rebind after collectd stop fix dpdk nicbind rebind to group by drivers prox: raise error in collect_kpi if the VNF is down prox: add VNF_TYPE for consistency sample_vnf: debug and fix kill_vnf pkill is not matching some executable names, add some debug process dumps and try switching back to killall until we can find the issue sample_vnf: add default timeout, so we can override default 3600 SSH timeout collect_kpi is the point at which we check the VNFs and TGs for failures or exits queues are the problem make sure we aren't silently blocking on non-empty queues by canceling join thread in subprocess fixup duration runner to close queues and other attempt to stop duration runner from hanging VnfdHelper: memoize port_num resource: fail if ssh can't connect at the end of 3600 second test our ssh connection is dead, so we can't actually stop collectd unless we reconnect fix stop() logic to ignore ssh errors Change-Id: I6c8e682a80cb9d00362e2fef4a46df080f304e55 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-20prox: fix TG KPIsRoss Brattain1-1/+3
The problem is that we share the same ProxResourceHelper for both VNF and TG. For VNF we want to talk to resource.py and get collectd KPIs. For TG we need to read from the queue the TG calculated KPIs and we also want collectd KPIs. workaround is to use a different method name collect_collectd_kpi for VNFs Change-Id: Icc2132758e37ce210f5600a0cd433077930208e5 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-19prox: pass prox_config_dict between Processes using queueRoss Brattain1-7/+0
we generate the prox_config_dict in the _run Process, but we also need it in the _traffic_runner Process to get core info. use a queue to pass the config list between the processes enable collect_kpi Change-Id: Ibaf41d606e559a87addf43d6ddaed206dbd2d20c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-09-14NSB: fix port topologyMartin Banszel1-6/+5
Add a new PortPair class to resolve the topology into list of public and private ports. Before we were calculating public/private in multiple locations and using different conventions. In addition for all the DPDK test we need to use the DPDK port number and no rely on interface ordering or interface naming conventions. We used to use xe0 -> 0, xe1 -> 1, etc. This is not the DPDK port number. Use the new dpdknicbind_helper class to parse the output of dpdk-devbind.py to find the actual DPDK port number at runtime. We then use this DPDK port number to correctly calculate the port_mask_hex. The port mask maps the DPDK port num (PMD ID) to the LINK ID used in the pipeline config We also need to make sure we only use the interfaces matched to the topology and not use all the interfaces, because in some cases we will have unused interfaces. In particular TRex always requires an even number of interfaces, so for single port TRex tests we have to create the second port and not use it. Thus we had to modify the traffic generator stats code to only dump stats for used ports and no unused ports. Ixia was using interface ordering to map to Ixia ports, instead we use the dpdk_port_num which must be hardcoded for Ixia. Renamed traffic_profile.execute to traffic_profile.execute_traffic so we can trace the code easier. We pass the port used by the traffic profile to generate_samples so we don't get stats for unused ports. Fixed up vPE config creation and bring up issues. Fixed up CGNAPT and UDP_Replay to work correctly. Tested with 4-port scale-out Change-Id: I2e4f328bff2904108081e92a4bf712333fa73869 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-09-05PROX: catch ports stats parse errorRoss Brattain1-2/+8
for some reason port status returned fewer fields, catch this for debug and return empty result dict so test continues and hopefully we get a valid stat read on next call. Change-Id: I54f1a86707d2a00efcb82a7e0239d12f90a6542c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-04Addition of Prox NSB changes in yardstickabhijitsinha1-48/+37
JIRA: YARDSTICK-802 Addition of Prox L2Fwd, MPLS test cases for BM and Heat. updates: Most of tg_prox and prox_vnf were absorbed into the base classes. delete most of ProxDpdkVnfSetupEnvHelper, it is handled by DpdkVnfSetupEnvHelper baseclass use standard _build_pipeline_kwargs methods don't use terminate() use baseclass version add new method kill_vnf that runs pkill -x replace resource_helper.execute() with vnf_execture for dumping stats In order to share code between tg_prox and vnf_prox refactor to have tg_prox hold and wrap a ProxApproxVnf instance and call methods on that class. Do this instead of multiple-inheritance. Implement ProxApproxVnf.terminate() using prox socket command based exit, (stop_all, quit, force_quit). vnf_execute calls resource_helper.execute() which calls socket methods on the sut object. Since tg_prox wraps the VNF object, we can call terminate on the VNF object and it should work correctly. move prox config generation to parent process we need to get core number info from config file inside the TG processes, so we need to generate the config in the parent process so the data is copied to the child during the fork. moved more config file methods to the setup_helper class. we run force_quit after quit, so the socket should already be closed this will trigger socket error, so add _ignore_errors option for vnf_execute to ignore socket errors Fixed the terminate issue. Added MPLS tests. Added TG Stats in_packet/out_packet Fixed compile (pep8) issues Fixed MPLS TG port stats, in/out packets Added Grafana dashboards for L2FWD and MPLS Traffic profiles modified for tolerated loss and precision as per DATS tests. Added unit test case for Mpls Single port test stats collection support. Change-Id: Idd9493f597c668a3bb7d90e167e6a418546106e8 Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-14PROX VNF and TGRoss Brattain1-0/+117
PROX was added to samplevnf project https://git.opnfv.org/samplevnf/tree/VNFs/DPPD-PROX JIRA: YARDSTICK-638 Change-Id: If9875b1130c6bed87deb8720b0d8b28ede9289d9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>