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

Steve socket is spammed on fresh visit to a resource detail page #10540

Open
richard-cox opened this issue Mar 1, 2024 · 2 comments · Fixed by #10541
Open

Steve socket is spammed on fresh visit to a resource detail page #10540

richard-cox opened this issue Mar 1, 2024 · 2 comments · Fixed by #10541
Assignees
Labels
area/performance kind/bug priority/0 QA/manual-test Indicates issue requires manually testing QA/None size/2 Size Estimate 2
Milestone

Comments

@richard-cox
Copy link
Member

richard-cox commented Mar 1, 2024

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

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

Expected Result

  • After the first resource.error message is received the UI should make a new http request to fetch the resource and then send a watch message with no revision.
  • There should not be any repeat cycles of this (for example no spammed green lines )
  • image
@richard-cox
Copy link
Member Author

/backport v2.8.next1

@richard-cox
Copy link
Member Author

/backport v2.7.next1

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 QA/None size/2 Size Estimate 2
Projects
None yet
4 participants