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

[backport v2.8.next1] Steve socket is spammed on fresh visit to a resource detail page #10566

Closed
github-actions bot opened this issue Mar 6, 2024 · 2 comments · Fixed by #10579
Closed
Assignees
Labels
area/performance kind/bug priority/0 QA/manual-test Indicates issue requires manually testing size/0.5 Size Estimate 0.5
Milestone

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2024

This is a backport issue for #10540, automatically created via GitHub Actions workflow initiated by @richard-cox

Original issue body:

We should tackle this after fix for rancher/rancher#41809 has merged

Setup

  • Rancher version: 2.7.x

Describe the bug

After visiting by url / refreshing on an oldish steve based resource's detail page the steve socket gets spammed with messages.

This probably applies to the resource's edit page as well.

  • Very roughly we fetch resources. That response contains a revision. We watch for changes for that set of resource over web socket using the revision as a starting point
  • If that revision is too old we should get a resource.error too old message
  • The UI then knows to make a fresh request for resources which will have the latest changes and the current reviewed
  • There were scenarios where the too old message was not provided and will be / has been fixed via [SURE-7122] Excessive WebSocket activity when watching resources with permission by name rancher#41809
    • Socket spamming was due to a resource.stop --> resource.start --> resource.stop --> resource.start forever cycle
    • Fix means the cycle does not occurr resource.stop & resource.error 'too old' --> http request --> resource.start
  • This revealed another issue related to spamming sockets to do with too old handling
  • With the fix above fetched / watching resources is fine, however fetching / watching a single resource is not
    • Fetch single resource & use revision from within to watch (note - not the current system revision) --> resource.start with old revision --> resource stop & resource.error too old --> http request for single resource & use revision from within forever cycle
    • There's also a bug where the namespace for the single resource http request isn't passed through to the url construction, so the request is borked anyway

To Reproduce

Result

  • Multiple too old messages as the ui tries to watch with the old revision AND http requests with a bad url (no ns)

Expected Result

  • socket message with valid revision (http requests TBD)
@github-actions github-actions bot added this to the v2.8.next1 milestone Mar 6, 2024
@zube zube bot removed the [zube]: Backlog label Mar 6, 2024
@gaktive gaktive added QA/manual-test Indicates issue requires manually testing and removed QA/None labels Mar 8, 2024
@izaac
Copy link
Contributor

izaac commented Mar 15, 2024

Reproduced on v2.8.1

Steps here

2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45171)
2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45171)
2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45171)
2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45171)
2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45176)
2024/03/15 18:08:41 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45178)
2024/03/15 18:08:42 [DEBUG] WatchNames received error: event watch error: too old resource version: 37058 (45178)

@izaac
Copy link
Contributor

izaac commented Mar 15, 2024

I wasn't able to reproduce it on v2.8.3-rc4

And the configmap request spam described at the bottom of this comment on the parent issue of this backport is not reproducible either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance kind/bug priority/0 QA/manual-test Indicates issue requires manually testing size/0.5 Size Estimate 0.5
Projects
None yet
3 participants