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

Only set internal ip on node when default IP is present on VMI #268

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

davidvossel
Copy link
Member

We've seen instances where the vmi.Status.Interfaces list temporarily clears and stops reporting the default instance IP. This occurs when the qemu guest agent can not be contacted, such as during an internal soft reboot. It also occurs for reasons we do not 100% understand yet.

Since we know this vmi.Status.Interfaces field is dependent on the qemu guest agent, there will be times where the agent is unavailable. To smooth over those time periods, cloud-provider-kubevirt now only reports IP changes on the node when we're certain the IP has actually changed, and does not clear out the internal IP when no default ip is reported on the vmi status.

Signed-off-by: David Vossel <davidvossel@gmail.com>
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Sep 12, 2023
// TODO: detect type of all addresses, right now pick only the default
for _, i := range ifs {
if i.Name == "default" {
// Only change the IP if it is known, not if it is empty
if i.Name == "default" && i.IP != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure this is not affected by link local ipv6 ? so we wrongly enter here when we should not ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We know there's an issue with clearing IPs, but i don't have evidence that link local is causing us issues. I'm not 100% sure we'd be correct in filtering out link local.

@qinqon
Copy link
Contributor

qinqon commented Sep 15, 2023

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2023
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

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

The pull request process is described here

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2023
@kubevirt-bot kubevirt-bot merged commit 3626606 into kubevirt:main Sep 15, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants