kubevirt / cloud-provider-kubevirt

Kubernetes cloud-provider for KubeVirt
Apache License 2.0
73 stars 34 forks source link

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

Closed davidvossel closed 1 year ago

davidvossel commented 1 year ago

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.

qinqon commented 1 year ago

/lgtm /approve

kubevirt-bot commented 1 year ago

[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: - ~~[OWNERS](https://github.com/kubevirt/cloud-provider-kubevirt/blob/main/OWNERS)~~ [qinqon] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment