Skip to content
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

Merged
merged 12 commits into from
Jun 11, 2018
Merged

Conversation

hwchiu
Copy link
Contributor

@hwchiu hwchiu commented Jun 8, 2018

  • 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.

@codecov
Copy link

codecov bot commented Jun 8, 2018

Codecov Report

Merging #27 into master will decrease coverage by 0.5%.
The diff coverage is 79.54%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
nl/link.go 65.9% <ø> (ø)
nl/netlink_event.go 75% <75%> (ø)
nl/netlink_handler.go 87.5% <87.5%> (ø)
openvswitch/ovs.go 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d7d3ce...18d1105. Read the comment docs.

@@ -0,0 +1,40 @@
package netlinkEvent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package name seems wrong

@@ -0,0 +1,72 @@
package netlinkEvent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package name seems wrong

@John-Lin
Copy link
Contributor

John-Lin commented Jun 9, 2018

Should consider the netlink event tracker only activate in unix domain socket server since we'll run two kinds of grpc servers

@hwchiu
Copy link
Contributor Author

hwchiu commented Jun 9, 2018

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")
Copy link
Contributor

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

@John-Lin John-Lin requested a review from chenyunchen June 10, 2018 15:43
@zyfdegh
Copy link
Contributor

zyfdegh commented Jun 11, 2018

Bool flags do not require users to specify true or false statement, to say, using --track-netlink is Okay which means true, not -track-netlink=true. ;)

@hwchiu
Copy link
Contributor Author

hwchiu commented Jun 11, 2018

@zyfdegh Thanks.
According to the manual. we need to avoid the usage -xxx true which is not support in bool form

-flag
-flag=x
-flag x  // non-boolean flags only

@hwchiu hwchiu merged commit 60182e1 into master Jun 11, 2018
@hwchiu hwchiu deleted the hwchiu/VX-92 branch June 11, 2018 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants