-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the netlink_event_tracker to handle netlink event #27
Conversation
hwchiu
commented
Jun 8, 2018
•
edited
Loading
edited
- The Server support the netlink event tracker now.
- It will remove the veth from OVS after the container has been removed.
- Since some testing will change the ovs command file mode, we should force the parallel=1 to avoid testing fail.
…ission to create veth
Codecov Report
@@ Coverage Diff @@
## master #27 +/- ##
==========================================
- Coverage 85.03% 84.53% -0.51%
==========================================
Files 5 7 +2
Lines 127 181 +54
==========================================
+ Hits 108 153 +45
- Misses 12 19 +7
- Partials 7 9 +2
Continue to review full report at Codecov.
|
netlink/netlink_handler.go
Outdated
@@ -0,0 +1,40 @@ | |||
package netlinkEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package name seems wrong
netlink/netlink_handler_test.go
Outdated
@@ -0,0 +1,72 @@ | |||
package netlinkEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package name seems wrong
Should consider the |
I will add a option to start the event track and we can decide which server should active that function from the arguments. |
server/main.go
Outdated
flag.StringVar(&tcpAddr, "tcp", "", "Run as a TCP server and listen on target address") | ||
flag.StringVar(&unixPath, "unix", "", "Run as a UNIX server and listen on target path") | ||
flag.BoolVar(&nlEventTracker, "nl", false, "Run as a Netlink Event Tracker") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to propose the flag names and usage descriptions
flag.BoolVar(&nlEventTracker, "track-netlink", false, "Run as a netlink event tracker for garbage collection")
// OR
flag.BoolVar(&nlEventTracker, "netlink-gc", false, "Run as a netlink event tracker for garbage collection")
the command can be used like
./network-controller -unix=/tmp/grpc.sock -track-netlink=true
OR
./network-controller -unix=/tmp/grpc.sock -netlink-gc=true
Bool flags do not require users to specify true or false statement, to say, using |
@zyfdegh Thanks.
|