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

handler: Retry enactment update #1215

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

qinqon
Copy link
Member

@qinqon qinqon commented Oct 24, 2023

Is this a BUG FIX or a FEATURE ?:

/kind bug

What this PR does / why we need it:
At some scenarios it takes some retries to update the enactment status if the network is not totally settle. This change add some retries to enactment status update.

Retry enactment status update on failure.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 24, 2023
)

func Update(cli client.Client, key types.NamespacedName, statusSetter func(*nmstate.NodeNetworkConfigurationEnactmentStatus)) error {
logger := log.WithValues("enactment", key.Name)
return retry.RetryOnConflict(retry.DefaultRetry, func() error {
return retry.OnError(retry.DefaultRetry, allErrors, func() error {

Choose a reason for hiding this comment

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

I would add a comment explaining how temporary network unavailability needs to be accounted for when handling errors. Is this the only place where this problem can happen? Or is more generic handling needed? Isn't connectivity verified before this update is attempted? Or is this when we try to update after rollback?

Copy link
Member

Choose a reason for hiding this comment

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

Hey @jcaamano, AFAIR you were working on some bug when this was discovered. Do you have a Jira handle? We would simply link it in the commit so that whoever is interested at any time would git blame and read what's needed

Copy link

Choose a reason for hiding this comment

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

This was something @qinqon tried out in context of https://issues.redhat.com//browse/OPNET-268

Copy link
Member Author

Choose a reason for hiding this comment

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

@jcaamano @mkowalski added some comments to explain it.

@mkowalski
Copy link
Member

/approve

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkowalski

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 Nov 3, 2023
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
@mkowalski
Copy link
Member

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2023
@kubevirt-bot kubevirt-bot merged commit 80c6e01 into nmstate:main Nov 16, 2023
7 of 8 checks passed
mkowalski pushed a commit to mkowalski/kubernetes-nmstate that referenced this pull request Nov 17, 2023
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
mkowalski pushed a commit to mkowalski/kubernetes-nmstate that referenced this pull request Nov 17, 2023
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
mkowalski pushed a commit to mkowalski/kubernetes-nmstate that referenced this pull request Jan 10, 2024
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
mkowalski pushed a commit to mkowalski/kubernetes-nmstate that referenced this pull request Jan 10, 2024
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
mkowalski pushed a commit to mkowalski/kubernetes-nmstate that referenced this pull request Jan 10, 2024
At some scenarios it takes some retries to update the enactment status
if the network is not totally settle. This change add some retries to
enactment status update.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
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. kind/bug lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants