-
Notifications
You must be signed in to change notification settings - Fork 7
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
Check if vip interface exists #89
base: master
Are you sure you want to change the base?
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.
it would be nice to check the vip interface using net.InterfaceByName(iface) than exec.
@ojmhetar I see that
Might be worth checking if that helps. |
After trying keepalived:2.0.10, I found that while it does not run with an non-existing interface, it exits with status 0.
|
config.Networking.PodSubnet, config.MasterConfiguration.Networking.PodSubnet)) | ||
} | ||
} | ||
if config.MasterConfiguration.Networking.DNSDomain != config.Networking.DNSDomain { | ||
errorList = append(errorList, fmt.Errorf("configuration conflict: Networking.DNSDomain=%q, MasterConfiguration.Networking.DNSDomain=%q. Values should be identical, or MasterConfiguration.Networking.DNSDomain omitted", | ||
config.Networking.DNSDomain, config.MasterConfiguration.Networking.DNSDomain)) | ||
} | ||
if config.VIPConfiguration.RouterID != -1 { |
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.
Hi Ojas, just curious why not look for NetworkInterface itself here, i think we have a separate check where we verify that both RouterID and NetworkInterface are provided.
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.
The idea was to only error here if this cluster is intended to be HA. If interface is empty, it could be done intentionally for a non-HA cluster.
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, just had a small question
If the specified interface does not exist, keepalived will repeatedly kill and respawn a child process. keepalived will not fail fast on an "invalid" configuration, since in some situations it is possible that the interface may come up later. (Is this behavior we want to preserve during init?)
If keepalived is not fully operational, it will not route requests to the APIServer which will cause problems further in the init process.