-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Bug fixes #1947
Bug fixes #1947
Conversation
main.go
Outdated
if runtime.GOOS == "windows" { | ||
log.Info("Starting flannel in windows mode...") | ||
return &windows.WindowsManager{} | ||
} |
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.
Instead of doing this and creating a new file, why don't you just increase the verbosity required for the ErrUnimplemented
error to be logged and return nil? I think this is too much just to make the logs clearer
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.
My reasoning is that in this way I never display the "Starting flannel in iptables mode" message which was confusing users.
Also I hoped that it would allow me to delete the iptables_windows.go
file but it's still needed to compile on windows.
I was also thinking since we have more requests for flannel on windows there could at some point be something to do in the windows traffic manager even it does't use iptables or nftables.
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.
My main problem is that I find it confusing having so many windows files around. Why can't we remove iptables-_windows.go
and nftables_windows.go
?
I don't think we will ever need Windows doing anything around traffic manager because the forwarding is always there and the natting is also default when creating the overlay network.
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.
If we remove those files then the windows builds fail because all the other files in the package have this constraint:
//go:build !windows
// +build !windows
I have another idea though: instead of having a dedicated windows package which does nothing, I can move the log line inside the traffic manager Init methds so that the log can be different based on the OS.
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.
good idea!
ee75fed
to
5c96864
Compare
Related issue: #1939