aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbench
AgeCommit message (Expand)AuthorFilesLines
2018-02-22[NFVBENCH-68] Skip bonding interfaces for interface discoveryYichen Wang1-8/+34
2018-02-22Fix for bug with external chain and no arpMichael Pedersen1-8/+8
2018-02-16[NFVBENCH-67] NFVbench should have same TX rate for different rate formatsYichen Wang1-0/+4
2018-02-15NFVBENCH-66 Fixed rate run with multiple frame sizes sends same tx/rxmortenhillbom1-1/+1
2018-02-09[NFVBENCH-65] 1.2.2: AttributeError: 'RunningTrafficProfile' object has no at...ahothan2-2/+2
2018-01-23[NFVBENCH-63] Make sure CLI overrides the default configsYichen Wang1-0/+4
2018-01-17[NFVBENCH-58] Add option to specify dest MAC with EXT CHAIN when ARP isMichael Pedersen3-4/+46
2018-01-16[NFVBENCH-62] Add support for non-openstack environmentsahothan7-33/+74
2018-01-02Multiple bugfixes for NFVbenchYichen Wang3-9/+20
2017-12-21[NFVBENCH-59] Add Unit Testing of the NDR/PDR convergence algorithm using the...ahothan10-36/+152
2017-11-24Add support to use vswitch to handle V2V in PVVP SRIOV scenarioYichen Wang4-18/+52
2017-11-10NFVBENCH-46 Change names of identity v3 fieldsKerim Gokarslan1-2/+2
2017-10-30NFVBENCH-45 Fix typo on imix_avg_l2_sizeKerim Gokarslan1-2/+1
2017-10-18NFVBENCH-44 Use message when logging exceptionKerim Gokarslan1-4/+1
2017-10-18NFVBENCH-43 Change default flavor ram to 4GBmortenhillbom1-1/+1
2017-10-18NFVBENCH-42 Add multiple fluentd aggregators supportKerim Gokarslan4-64/+63
2017-10-17NFVBENCH-41 Add fluentd result tag to nfvbench serverKerim Gokarslan2-6/+5
2017-10-16NFVBENCH-40 Add pylint to toxKerim Gokarslan22-274/+257
2017-10-13Merge "NFVBENCH-5 NFVBENCH-39 Fix long prep time with large number of flows"Alec Hothan2-51/+84
2017-10-13NFVBENCH-5 NFVBENCH-39 Fix long prep time with large number of flowsahothan2-51/+84
2017-10-11NFVBENCH-38 Fix typo drop_percentageKerim Gokarslan2-5/+2
2017-10-11NFVBENCH-37 Read fluentd result tag from configuration fileKerim Gokarslan2-3/+15
2017-10-09NFVBENCH-36 Send results to fluentd on show-summary optionKerim Gokarslan1-1/+4
2017-09-27NFVBENCH-35 Runlogdate is 0 in resultnfvbench1.0.11Kerim Gokarslan2-8/+16
2017-09-27Merge "NFVBENCH-34 Pass configuration file to entrypoint script"Alec Hothan1-10/+7
2017-09-27NFVBENCH-34 Pass configuration file to entrypoint scriptKerim Gokarslan1-10/+7
2017-09-26NFVBENCH-33 STLError exception when the packet path drops all packetsKerim Gokarslan1-2/+7
2017-09-21NFVBENCH-32 Check nan result values before integer castingKerim Gokarslan4-17/+29
2017-09-20NFVBENCH-30 check_traffic_time_sec not working as expectedKerim Gokarslan1-3/+4
2017-09-19Merge "NFVBENCH-29 Add a user-provided label option to the fluentd perf records"1.0.9Alec Hothan3-1/+10
2017-09-19NFVBENCH-29 Add a user-provided label option to the fluentd perf recordsmortenhillbom3-1/+10
2017-09-19NFVBENCH-28 Set result values for NDR/PDR if they cannot be found within the ...Kerim Gokarslan1-0/+15
2017-09-19Merge "NFVBENCH-25 Send run results to fluentd"Alec Hothan7-36/+157
2017-09-19NFVBENCH-25 Send run results to fluentdKerim Gokarslan7-36/+157
2017-09-17Documentation updateahothan1-2/+2
2017-09-16StatsManager must clean up self when there is an exception in __init__1.0.8ahothan2-727/+8
2017-09-15NFVBENCH-27 Search vm image under project folderKerim Gokarslan4-37/+45
2017-09-13NFVBENCH-24 Send runlogdate as dateKerim Gokarslan1-1/+1
2017-09-12NFVBENCH-23 Do not send runlogdate for logs about server statusKerim Gokarslan1-2/+8
2017-09-06NFVBENCH-18 Add microsecond precision to fluentd records1.0.5Kerim Gokarslan1-3/+11
2017-09-01Merge "NFVBENCH-15 REST server stays busy after invalid run request without b...1.0.4Alec Hothan1-5/+9
2017-08-31NFVBENCH-13 Change default flow count to 10k (from 2)mortenhillbom1-1/+1
2017-08-31NFVBENCH-15 REST server stays busy after invalid run request without bodyKerim Gokarslan1-5/+9
2017-08-31NFVBENCH-12 Add run summary to fluentd streamKerim Gokarslan3-8/+84
2017-08-28NFVBENCH-11 Cannot override extra_specs in flavor using -c1.0.3ahothan2-25/+27
2017-08-27NFVBENCH-10 Relax config error messageahothan1-1/+2
2017-08-23NFVBENCH-8 config checking fails with Exception TypeError: string indices mus...1.0.2ahothan2-17/+11
2017-08-22NFVBENCH-1 Number of seconds to wait for VMs to pass traffic can bemortenhillbom2-1/+6
2017-08-22NFVBENCH-6 Add support for sending logs to fluentd with fluentd client libraryahothan4-4/+88
2017-08-22Change the signature for config validation functionYichen Wang2-3/+3
try: subprocess.check_call(['make', '-C', build_root, 'clean']) except subprocess.CalledProcessError: logging.error('Failure to make clean') raise logging.info('Building targets: {}'.format(make_targets)) try: output = subprocess.check_output(["make"] + make_args + ["-C", build_root] + make_targets) logging.info(output) except subprocess.CalledProcessError as e: logging.error("Failed to build Apex artifacts") logging.error(e.output) raise e def build_cache(cache_source, cache_dir): """ Tar up new cache with unique name and store it in cache storage directory. Also update journal file with new cache entry. :param cache_source: source files to tar up when building cache file :param cache_dir: cache storage location :return: None """ if cache_dir is None: logging.info("No cache dir specified, will not build cache") return cache_name = 'apex-cache-{}.tgz'.format(str(uuid.uuid4())) cache_full_path = os.path.join(cache_dir, cache_name) os.makedirs(cache_dir, exist_ok=True) try: subprocess.check_call(['tar', '--atime-preserve', '--dereference', '-caf', cache_full_path, '-C', cache_source, '.']) except BaseException as e: logging.error("Unable to build new cache tarball") if os.path.isfile(cache_full_path): os.remove(cache_full_path) raise e if os.path.isfile(cache_full_path): logging.info("Cache Build Complete") # update journal cache_entries = get_journal(cache_dir) if cache_entries is None: cache_entries = [cache_name] else: cache_entries.append(cache_name) journal_file = os.path.join(cache_dir, CACHE_JOURNAL) with open(journal_file, 'w') as fh: yaml.safe_dump(cache_entries, fh, default_flow_style=False) logging.info("Journal updated with new entry: {}".format(cache_name)) else: logging.warning("Cache file did not build correctly") def prune_cache(cache_dir): """ Remove older cache entries if there are more than 2 :param cache_dir: Cache storage directory :return: None """ if cache_dir is None: return cache_modified_flag = False cache_entries = get_journal(cache_dir) while len(cache_entries) > 2: logging.debug("Will remove older cache entries") cache_to_rm = cache_entries[0] cache_full_path = os.path.join(cache_dir, cache_to_rm) if os.path.isfile(cache_full_path): try: os.remove(cache_full_path) cache_entries.pop(0) cache_modified_flag = True except OSError: logging.warning("Failed to remove cache file: {}".format( cache_full_path)) break else: logging.debug("No more cache cleanup necessary") if cache_modified_flag: logging.debug("Updating cache journal") journal_file = os.path.join(cache_dir, CACHE_JOURNAL) with open(journal_file, 'w') as fh: yaml.safe_dump(cache_entries, fh, default_flow_style=False) def main(): parser = create_build_parser() args = parser.parse_args(sys.argv[1:]) if args.debug: log_level = logging.DEBUG else: log_level = logging.INFO os.makedirs(os.path.dirname(args.log_file), exist_ok=True) formatter = '%(asctime)s %(levelname)s: %(message)s' logging.basicConfig(filename=args.log_file, format=formatter, datefmt='%m/%d/%Y %I:%M:%S %p', level=log_level) console = logging.StreamHandler() console.setLevel(log_level) console.setFormatter(logging.Formatter(formatter)) logging.getLogger('').addHandler(console) # Since we only support building inside of git repo this should be fine try: apex_root = subprocess.check_output( ['git', 'rev-parse', '--show-toplevel']).decode('utf-8').strip() except subprocess.CalledProcessError: logging.error("Must be in an Apex git repo to execute build") raise apex_build_root = os.path.join(apex_root, BUILD_ROOT) if os.path.isdir(apex_build_root): cache_tmp_dir = os.path.join(apex_root, TMP_CACHE) else: logging.error("You must execute this script inside of the Apex " "local code repository") raise ApexBuildException("Invalid path for apex root: {}. Must be " "invoked from within Apex code directory.". format(apex_root)) dep_playbook = os.path.join(apex_root, 'lib/ansible/playbooks/build_dependencies.yml') utils.run_ansible(None, dep_playbook) unpack_cache(cache_tmp_dir, args.cache_dir) build(apex_build_root, args.build_version, args.iso, args.rpms) build_cache(cache_tmp_dir, args.cache_dir) prune_cache(args.cache_dir) if __name__ == '__main__': main()