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

Don't mark machine ready=false when internalIP is known #265

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

davidvossel
Copy link
Contributor

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, capk 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.

NONE

Signed-off-by: David Vossel <davidvossel@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidvossel

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 12, 2023
@davidvossel
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 12, 2023
@@ -349,6 +359,15 @@ func (r *KubevirtMachineReconciler) reconcileNormal(ctx *context.MachineContext)
return ctrl.Result{}, nil
}

func machineHasKnownInternalIP(kubevirtMachine *infrav1.KubevirtMachine) bool {
for _, addr := range kubevirtMachine.Status.Addresses {
if addr.Type == clusterv1.MachineInternalIP && addr.Address != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should skip ipv6 link local

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That made sense to me at first, but after discussing this further I'm not 100% sure. It's theoretically possible someone might be using this in a network where link local addresses for VMs technically work. It's just that the use case we're most familiar with (vms on pod network) wouldn't use link local.

@nunnatsa
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit c8158eb into kubernetes-sigs:main Sep 14, 2023
17 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants