-
Notifications
You must be signed in to change notification settings - Fork 2
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
Get multiport-eswitch mode from metalnet rundir #270
Conversation
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.
Looks no issue to me. But it would be nice to have one line comment like: run touch /var/run/metalnet/mode && echo -n "eswitch" > /var/run/metalnet/mode
to enable multiport eswitch mode, as this approach of configuration is not so crystal clear it is a manual step to setup the flag.
e7c6708
to
4463703
Compare
I added a comment and also some documentation in README.md covering multiport-eswitch and pf1-proxy |
4463703
to
e193110
Compare
I have reverted the removal of |
main.go
Outdated
@@ -104,7 +104,7 @@ func main() { | |||
flag.BoolVar(&enableIPv6Support, "enable-ipv6", false, "Enable IPv6 support") | |||
flag.IntVar(&publicVNI, "public-vni", 100, "Virtual network identifier used for public routing announcements.") | |||
flag.IPVar(&routerAddress, "router-address", net.IP{}, "The address of the next router.") | |||
flag.BoolVar(&multiportEswitchMode, "multiport-eswitch", false, "Enable multiport eswitch support") | |||
flag.BoolVar(&multiportEswitchMode, "multiport-eswitch", false, "Enable multiport eswitch support (unless specified in metalnet-dir)") |
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.
maybe 'Enale multiport eswitch support explicitly, unless specified in metalnet-dir' is a bit more understandable?
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.
Well arguments are already explicit, but then we would say "explicit unless" which is strange, so how about changing the parentheses to "(file in metalnet-dir can override this)"?
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 have reworded the help and also changed the handling so it should work normally when the metalnet-dir file is not present
e193110
to
c5ebb2c
Compare
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.
LGTM
In OSC it is beneficial to use the same metalnet deployment for both versions of dpservice - legacy (single-port) and multiport-eswitch ones.
Thus using the command-line argument is not the way to go, instead we simply
echo -n "eswitch" > /var/run/metalnet/mode
and metalnet then reads this information, just like it gets other stuff from virtlet(?) about VFs.The original implementation in 78efc7c is tested in our clusters, I simplified the code without being able to run it in a cluster, though I did verify the output locally.