Skip to content

Conversation

@dinhxuanvu
Copy link
Member

The NodeIP is always the host IP.

Signed-off-by: Vu Dinh vudinh@outlook.com

Which issue(s) this PR addresses:

Closes #

@openshift-ci openshift-ci bot requested review from copejon and sallyom October 28, 2022 17:35
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 28, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dinhxuanvu
Once this PR has been reviewed and has the lgtm label, please assign pacevedom for approval by writing /assign @pacevedom in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dinhxuanvu dinhxuanvu force-pushed the nodeIP branch 2 times, most recently from 10e7933 to aaffa68 Compare October 28, 2022 17:37
@dinhxuanvu
Copy link
Member Author

@benluddy PTAL

The NodeIP is always the host IP.

Signed-off-by: Vu Dinh <vudinh@outlook.com>
@dinhxuanvu dinhxuanvu changed the title Remove NodeIP from configurable microshift config Remove NodeIP configurable option from microshift config Oct 28, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 28, 2022

@dinhxuanvu: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

}

func findNodeIP() string {
hostIP, err := util.GetHostIP()
Copy link
Contributor

Choose a reason for hiding this comment

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

We expect hosts to have multiple IPs. How does the user influence how this function picks the IP to use?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems the nodeIP option is not repected in main branch, even it is user configurable. We probably want to fix it. This influence approach shall also work for microshift-ovs-init service script, which sets up the nodeIP interface for ovn-kubernetes CNI plugin.

Copy link
Member

Choose a reason for hiding this comment

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

In which scenario would a user want to pick a specific IP? The IP to which core components of microshift bind to shouldn't really matter to the end-user since their applications will most likely only communicate via the different services.

Copy link
Contributor

Choose a reason for hiding this comment

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

I remember that some popular distros also supported specifying the interface name or something like IP(eth0) to make it work with DHCP too

Copy link
Member

@dgrisonnet dgrisonnet Oct 31, 2022

Choose a reason for hiding this comment

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

If I am not mistaken, the nodeIP is not even configurable in OCP today. The closest thing I could find is this effort: https://github.com/openshift/enhancements/blob/ef85659d01738b9f89958d5f0da31cff05bb1182/enhancements/network/ip-interface-selection.md but this seem way too complex for MicroShift to need something like that right now.

I remember that some popular distros also supported specifying the interface name or something like IP(eth0) to make it work with DHCP too

I am not sure why that would be beneficial to do for control plane components.

Another concern I have is what would happen if microshift was first started with a nodeIP, but then a user decided to change it on the fly. Everything that used to depend on the previous nodeIP will not be able to reach the new nodeIP if we don't have a way to propagate the update. I don't think that's supported in k8s in general since one would most likely have to delete the node to update the IP on the various components.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unlike OCP hosts, we have to deal with the fact that a host running MicroShift may change its IP or move between networks. So we either need a way to pick a node IP that will never change, or we need to support it being updated. Could we always use a localhost IP or the hardware's IPv6 local address, for example? What effect would that have? What needs to use the node IP?

@openshift-merge-robot
Copy link
Contributor

@dinhxuanvu: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2022
var microshiftDataDir = config.GetDataDir()
var (
microshiftDataDir = config.GetDataDir()
nodeIP = config.GetNodeIP()
Copy link
Member

Choose a reason for hiding this comment

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

instead of defining that globally every time, could we perhaps create a structure that could be passed on to the various init functions alongside the configuration?

}

func findNodeIP() string {
hostIP, err := util.GetHostIP()
Copy link
Member

Choose a reason for hiding this comment

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

In which scenario would a user want to pick a specific IP? The IP to which core components of microshift bind to shouldn't really matter to the end-user since their applications will most likely only communicate via the different services.

@mangelajo
Copy link
Contributor

I believe NodeIP is important to let the services know which specific IP we will be listening to if it's not the one on default route. Or if we want it to listen to 0.0.0.0 ?

Also bear in mind that IPv6 values should be accepted here.

@dinhxuanvu
Copy link
Member Author

It looks like the opinion here is that we will need to keep this NodeIP option configurable given the possibility of multiple IP options and/or changes. That sounds fair. I would recommend folks to comment on #1030 PR on where to keep this option in the new config. Thanks.

@dinhxuanvu dinhxuanvu closed this Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants