Skip to content

[release-4.18] [KNI][upstream] nrt: log: return updated generation value for cache #357

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

Merged

Conversation

shajmakh
Copy link
Member

@shajmakh shajmakh commented Jun 16, 2025

Cherry-pick nrt log fix from upstream and skip commit verification for cherrypick-prefixed branches.

@openshift-ci openshift-ci bot requested review from ffromani and swatisehgal June 16, 2025 14:53
@shajmakh shajmakh force-pushed the cherrypick-nrtfix branch 2 times, most recently from 1231a20 to 0ff8290 Compare June 16, 2025 15:06
@shajmakh shajmakh changed the title Merge pull request #908 from shajmakh/nrt-gen-log-fix cherrypick: Merge pull request #908 from shajmakh/nrt-gen-log-fix Jun 16, 2025
@shajmakh
Copy link
Member Author

@ffromani is such a workaround works for us?
0ff8290
it is what we do for resyncs anyway.
We can have another option which is amending the git commits that are cherry-picked from u/s using the keyword UPSTREAM however that would be necessary for all the commits.

@shajmakh shajmakh changed the title cherrypick: Merge pull request #908 from shajmakh/nrt-gen-log-fix [release-4.18] cherrypick: Merge pull request #908 from shajmakh/nrt-gen-log-fix Jun 17, 2025
@shajmakh shajmakh force-pushed the cherrypick-nrtfix branch 2 times, most recently from fbf46ba to 4b94c85 Compare June 18, 2025 14:41
@shajmakh shajmakh closed this Jun 19, 2025
@shajmakh shajmakh reopened this Jun 19, 2025
@shajmakh shajmakh force-pushed the cherrypick-nrtfix branch from 4b94c85 to 8e09e67 Compare June 19, 2025 11:33
@shajmakh shajmakh changed the title [release-4.18] cherrypick: Merge pull request #908 from shajmakh/nrt-gen-log-fix [release-4.18] [KNI][upstream] nrt: log: return updated generation value for cache Jun 19, 2025
shajmakh added 2 commits June 19, 2025 14:34
The logs show misaligned generation value when tackling the same node in
overreserve.go and filter.go logs where the former is always up to date
while the latter is never updated (generation=0):

```
1 overreserve.go:310] "NodeTopology podset fingerprint mismatch" logger="nrtcache.resync" generation=3 node="node-1"
...
1 filter.go:202] "invalid topology data" logger="FilterWithNominatedPods.Filter.NodeResourceTopologyMatch" pod="default/test-6f798bf799-tj7bc" pod="default/test-6f798bf799-tj7bc" podUID="f221ce7c-09c9-4462-a67a-95f5fdec3fb7" node="node-1" generation=0
```

The only cache implementation that defines and uses "generation" is
OverReserve thus this commit updates the method GetCachedNRTCopy() to return updated
generation value in the returned CachedNRTInfo.

Signed-off-by: Shereen Haj <[email protected]>
(cherry picked from commit 4bf93e9)
Add a unit test mainly for GetCachedNRTCopy() to verify the returned
generation. To help with the verification, make FlushNodes not only
report about the new generation (which only updated there) but also
return it so we'd be able to compare the values.

Signed-off-by: Shereen Haj <[email protected]>
(cherry picked from commit ffe2ce2)
@ffromani
Copy link
Member

/approve
/lgtm

this follow the new process we agreed upon in #373
thanks for your updates and for having drive the process improvement!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2025
Copy link

openshift-ci bot commented Jun 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ffromani, shajmakh

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 0bffcad into openshift-kni:release-4.18 Jun 19, 2025
10 checks passed
shajmakh added a commit to shajmakh/scheduler-plugins that referenced this pull request Jun 20, 2025
Update RESYNC.log.md to reflect the cherry-picked commits in openshift-kni#357

Signed-off-by: Shereen Haj <[email protected]>
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants