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
Conversation
|
@pliurh: This pull request references Bugzilla bug 1815039, which is invalid:
Comment In response to this:
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. |
|
/bugzilla refresh |
|
@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
In response to this:
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. |
pkg/daemon/daemon.go
Outdated
| @@ -281,9 +281,24 @@ func (dn *Daemon) nodeStateChangeHandler(old, new interface{}) { | |||
| } | |||
| reqReboot := false | |||
| reqDrain := false | |||
| if len(dn.LoadedPlugins) == 0 { | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
pkg/daemon/daemon.go
Outdated
| } | ||
| } | ||
| // Get the latest NodeState | ||
| latestState, err := dn.client.SriovnetworkV1().SriovNetworkNodeStates(namespace).Get(dn.name, metav1.GetOptions{}) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
/hold |
|
/unhold |
pkg/daemon/daemon.go
Outdated
| 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{}) |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
/test e2e-aws |
1 similar comment
|
/test e2e-aws |
|
/lgtm |
|
/test e2e-aws |
|
/test e2e-aws |
|
@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:
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. |
This Commit is base on openshift#175 Signed-off-by: Sebastian Sch <sebassch@gmail.com>
|
/cherry-pick release-4.4 |
|
@zshi-redhat: #175 failed to apply on top of branch "release-4.4": In response to this:
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. |
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>
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>
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>
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>
Use GlobalMgr for SriovNetwork controllers
… triggered