sdnfv / openNetVM

A high performance container-based NFV platform from GW and UCR.
http://sdnfv.github.io/onvm/
Other
263 stars 136 forks source link

Default CPU Cores for Manager #219

Closed EthanBaron14 closed 4 years ago

EthanBaron14 commented 4 years ago

New syntax for running the manager script.

Summary:

Implemented the improvements outlined in Issue #190.

When running the manager, users no longer have to input manager cores, a port mask, and a set of NF cores using positional arguments in the go.sh script. This functionality was retained, but from here on out we'll be suggesting that users use a new syntax with flags. In this PR, I added three flags: -m, -k, and -n, which set the cores for the manager to run on, the hexadecimal port mask, and the cores for the NF to run on in a hexadecimal port mask, respectively. The new go.sh syntax is as follows:

./go.sh -k <port mask> -n <NF core mask> [OPTIONS]

Users have the option to manually set at least three cores to use with the manager, using either -m or the legacy positional option syntax. There is no upper bound on the number of cores that the manager can use, but we require at least three.

Users will also be warned if their manager and NF cores overlap, regardless of the script running syntax they choose to use, because overlapping cores could cause some issues. Users will also see a message if they are using the default cores 0, 1 and 2 if they do not set the -m flag.

When a user opts to use the new syntax, they are required to specify -k and -n flags to set the port and NF core masks. This is because there is no intuitive default for these values. If a user instead decides to use a combination of the legacy and new methods and includes one of the new flags, the manager will not run, because we would have conflicting information specified in multiple places.

For any input arguments now, the script will do minor syntax checking with regular expressions. This will give more intuitive error messages if the user mistakenly enters bad input arguments.

Usage:

This PR includes
Resolves issues #190
Breaking API changes
Internal API changes
Usability improvements 👍
Bug fixes
New functionality
New NF/onvm_mgr args 👍
Changes to starting NFs
Dependency updates
Web stats updates

Merging notes:

bc is a new dependency for openNetVM. It can be installed with

sudo apt-get install bc

TODO before merging :

Test Plan:

Tested running the manager with default cores, manually set cores, and various numbers of cores. Tested both legacy and new manager running syntax. Verified that user cannot use a combination of the syntax types. Verified that manager does not recognize new syntax as an attempt at running legacy syntax with improper arguments. Verified that regex correctly parses the input. Tested to see that warnings and dialogues are printed in the appropriate situations. Verified that changes to usage make sense and are formatted correctly.

Review:

@kevindweb - you wrote the bash script, I believe.

EthanBaron14 commented 4 years ago

@onvm

onvm commented 4 years ago

@onvm

CI Message

Your results will arrive shortly

EthanBaron14 commented 4 years ago

Added some final changes that @kevindweb suggested. Ready for final review.

onvm commented 4 years ago

@onvm

CI Message

Error: Failed to parse Speed Tester stats

EthanBaron14 commented 4 years ago

@onvm now

onvm commented 4 years ago

@onvm now

CI Message

Your results will arrive shortly

EthanBaron14 commented 4 years ago

@onvm last time

onvm commented 4 years ago

@onvm last time

CI Message

Your results will arrive shortly

EthanBaron14 commented 4 years ago

@onvm verify I didn't break anything by updating readme's

onvm commented 4 years ago

@onvm verify I didn't break anything by updating readme's

CI Message

Your results will arrive shortly

EthanBaron14 commented 4 years ago

@kevindweb @WilliamMaa sorry I forgot to update one of the README.md files; can you guys review again?