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

BUG 1815039: Retrieve the latest status of SriovNetworkNodeState CR when update is… #175

Merged
merged 1 commit into from Apr 17, 2020

Conversation

pliurh
Copy link
Contributor

@pliurh pliurh commented Mar 31, 2020

… triggered

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Mar 31, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Bugzilla bug 1815039, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "4.4.z" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

BUG 1815039: Retrieve the latest status of SriovNetworkNodeState CR when update is…

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.

@pliurh
Copy link
Contributor Author

pliurh commented Mar 31, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Mar 31, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Bugzilla bug 1815039, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Mar 31, 2020
@pliurh pliurh requested a review from zshi-redhat March 31, 2020 08:54
@@ -281,9 +281,24 @@ func (dn *Daemon) nodeStateChangeHandler(old, new interface{}) {
}
reqReboot := false
reqDrain := false
if len(dn.LoadedPlugins) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be already loaded when nodeChange is called?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to ensure that the plugins will only be loaded once. Normally, the plugins will be loaded when the daemon starts, and nodeStateAddHandler will invoke nodeStateChangeHandler for the first time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the logic at the latest commit.

}
}
// Get the latest NodeState
latestState, err := dn.client.SriovnetworkV1().SriovNetworkNodeStates(namespace).Get(dn.name, metav1.GetOptions{})
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we guarantee latestState is the latest? I think there is a chance that daemon writer not updating node state immediately after policy is deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the CR change event will be put in the workqueue, and be processed one after another. So I add a logic to check if the spec of the newState is identical with the latestState, if not, the event will be skipped. It makes sure that only the event latestState will be processed.

@pliurh
Copy link
Contributor Author

pliurh commented Apr 8, 2020

/hold
I need to refactor this PR a bit.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2020
@pliurh
Copy link
Contributor Author

pliurh commented Apr 10, 2020

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2020
@SchSeba SchSeba mentioned this pull request Apr 13, 2020
if newState.GetObjectMeta().GetGeneration() == oldState.GetObjectMeta().GetGeneration() {
glog.V(2).Infof("nodeStateChangeHandler(): new generation is %d", newState.GetObjectMeta().GetGeneration())
// Get the latest NodeState
latestState, err := dn.client.SriovnetworkV1().SriovNetworkNodeStates(namespace).Get(dn.name, metav1.GetOptions{})
Copy link
Contributor

Choose a reason for hiding this comment

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

shall it use retry here to avoid transient failure (as the error handling is exiting the daemon)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2020
@pliurh
Copy link
Contributor Author

pliurh commented Apr 15, 2020

/test e2e-aws

1 similar comment
@pliurh
Copy link
Contributor Author

pliurh commented Apr 16, 2020

/test e2e-aws

@zshi-redhat
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2020
@pliurh
Copy link
Contributor Author

pliurh commented Apr 17, 2020

/test e2e-aws

@pliurh
Copy link
Contributor Author

pliurh commented Apr 17, 2020

/test e2e-aws

@openshift-merge-robot openshift-merge-robot merged commit 45b9f64 into openshift:master Apr 17, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: All pull requests linked via external trackers have merged: openshift/sriov-network-operator#175. Bugzilla bug 1815039 has been moved to the MODIFIED state.

In response to this:

BUG 1815039: Retrieve the latest status of SriovNetworkNodeState CR when update is…

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.

SchSeba added a commit to SchSeba/sriov-network-operator that referenced this pull request May 10, 2020
This Commit is base on openshift#175

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
@zshi-redhat
Copy link
Contributor

/cherry-pick release-4.4

@openshift-cherrypick-robot

@zshi-redhat: #175 failed to apply on top of branch "release-4.4":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/daemon/daemon.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/daemon/daemon.go
CONFLICT (content): Merge conflict in pkg/daemon/daemon.go
Patch failed at 0001 Retrieve the latest status of SriovNetworkNodeState CR when update is triggered

In response to this:

/cherry-pick release-4.4

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.

SchSeba added a commit to SchSeba/sriov-network-operator that referenced this pull request May 12, 2020
This commit is base on the CNF repo change openshift-kni/cnf-features-deploy#196

This commit also remove the check for logs as it's not needed anymore the bug was fixed by
openshift#175

Also here we fix some test issues related to the policyName field

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
SchSeba added a commit to SchSeba/sriov-network-operator that referenced this pull request May 12, 2020
This commit is base on the CNF repo change openshift-kni/cnf-features-deploy#196

This commit also remove the check for logs as it's not needed anymore the bug was fixed by
openshift#175

Also here we fix some test issues related to the policyName field

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
SchSeba added a commit to SchSeba/sriov-network-operator that referenced this pull request May 12, 2020
This commit is base on the CNF repo change openshift-kni/cnf-features-deploy#196

This commit also remove the check for logs as it's not needed anymore the bug was fixed by
openshift#175

Also here we fix some test issues related to the policyName field

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
SchSeba added a commit to SchSeba/sriov-network-operator that referenced this pull request May 12, 2020
This commit is base on the CNF repo change openshift-kni/cnf-features-deploy#196

This commit also remove the check for logs as it's not needed anymore the bug was fixed by
openshift#175

Also here we fix some test issues related to the policyName field

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
SchSeba pushed a commit to SchSeba/sriov-network-operator that referenced this pull request Aug 17, 2021
Use GlobalMgr for SriovNetwork controllers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants