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

virt-controller, hot plug: Avoid race between status update and annotation update #11921

Closed
wants to merge 2 commits into from

Conversation

oshoval
Copy link
Contributor

@oshoval oshoval commented May 15, 2024

What this PR does

Determining if an annotation update is required is done according to the
interfaces in the VMI status.
Currently, updating the VMI status with multus infoSource happens
after the first annotation update attempt.
This causes an unrequired attempt to update annotations,
because the status is completely missing at this stage.

Fix it by updating annotations only after the VMI is running,
eliminating the transient state false hotplug detection.

Beside that:
Move updateMultusAnnotation next to GeneratePodAnnotations.
Both are related to network, make them next to each other.

Fixes #

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

None

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 15, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign enp0s3 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@oshoval
Copy link
Contributor Author

oshoval commented May 15, 2024

/cc @AlonaKaplan

@oshoval oshoval changed the title WIP: virt-controller, hot plug: Avoid race between status update and annotation update virt-controller, hot plug: Avoid race between status update and annotation update May 15, 2024
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 15, 2024
…ation update

Determining if an annotation update is required is done according to the
interfaces in the VMI status.
Currently, updating the VMI status with multus infoSource happens
after the first annotation update attempt.
This causes an unrequired attempt to update annotations,
because the status is completely missing at this stage.

Fix it by updating annotations only after the VMI is running,
eliminating the transient state false hotplug detection.

Signed-off-by: Or Shoval <oshoval@redhat.com>
…eratePodAnnotations

Both are related to network, make them next to each other.

Signed-off-by: Or Shoval <oshoval@redhat.com>
@kubevirt-bot
Copy link
Contributor

@oshoval: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubevirt-unit-test-arm64 651c0e6 link false /test pull-kubevirt-unit-test-arm64
pull-kubevirt-e2e-k8s-1.30-sig-compute-serial 651c0e6 link true /test pull-kubevirt-e2e-k8s-1.30-sig-compute-serial

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.

@oshoval
Copy link
Contributor Author

oshoval commented May 20, 2024

@AlonaKaplan @EdDev
do we want this or to close it ?

@oshoval
Copy link
Contributor Author

oshoval commented May 20, 2024

i am closing it, if someone will see it is important we can reopen

the 2nd commits is fine, but it is just a nit
and later we can refactor to merge the two network related functions that update the annotations on
a follow-up

@oshoval oshoval closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. release-note-none Denotes a PR that doesn't merit a release note. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants