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 node detail page #10686

Closed
github-actions bot opened this issue Mar 22, 2024 · 3 comments
Closed
Assignees
Labels
kind/bug 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 22, 2024

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

Original issue body:

Setup

  • Rancher version: v2.9-head

Describe the bug

  • Rancher now returns a resource.error message when watching an individual resource over websocket
  • That revealed a scenario where the ui itself caused the spamming
  • That also revealed another bug, which this issue is about
    • The resource.error message is now returned when we try to watch a resource we should not
      • For instance the metrics.k8s.io.nodemetrics resource used in the node detail page
      • The resource.error though isn't one we let stick, so we just try to resource.start / watch again... which results in the same resource.error, repeat ad nauseam
    • Impact
      • This happens on navigate to the node detail page, as opposed to only when refreshing on the detail page
      • The spam does not stop by going from the detail page to the list page. Going from the node detail page where we watch an individual node metric to the node list where we watch all node metrics should behave the same as things like pod ... but it doesn't. Pods will stop the individual watch and start a watch for all.
      • This applies to all resources that we can't watch (no schema watch verb, about 8 out of 182 in a DS rke2 cluster)

To Reproduce

  • Bring up a rancher instance at or newer than 793118 (7th March)
  • Navigate to the node list
  • Bring up dev tools
  • Navigate to a node's detail page

Result

  • View the messages sent over the cluster socket repeat the resource.start, resource.stop / resource.error, resource.start cycle

Expected Result

  • We should not attempt to watch resources the user cannot watch

Screenshots
image

@github-actions github-actions bot added [zube]: Backlog kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this QA/None labels Mar 22, 2024
@github-actions github-actions bot added this to the v2.8.next2 milestone Mar 22, 2024
@gaktive gaktive changed the title [backport v2.8.next2] Steve socket is spammed on fresh visit to node detail page [backport v2.8.next1] Steve socket is spammed on fresh visit to node detail page Apr 2, 2024
@gaktive gaktive added size/0.5 Size Estimate 0.5 [zube]: Groomed and removed [zube]: Backlog labels Apr 3, 2024
@zube zube bot removed the [zube]: Next Up label Apr 10, 2024
@richard-cox richard-cox added QA/manual-test Indicates issue requires manually testing [zube]: To Test and removed QA/None QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this [zube]: Review labels Apr 17, 2024
@IsaSih IsaSih self-assigned this Apr 22, 2024
@IsaSih
Copy link

IsaSih commented Apr 22, 2024

Tested version v2.8-1a77fcd152f1a7bad3ae8e98bb96d96259f41510-head in a k3s single-node cluster on localhost. The resource.error described in the screenshot are no longer displayed. Just wanted to confirm that I can close the issue, but I still see the following resource.errors in the node details page:

Image

Also, the following resource.errors in the node lists:

Image

@richard-cox

@richard-cox
Copy link
Member

The Resource error warnings in the console can be ignored, they at some point should not be sent to the UI (see rancher/rancher#40627).

The resource.error messages are sent over web socket, so will appear in dev tools --> Network tab --> WS tab --> /k8s/clusters/<cluster id>/v1/subscribe row's Messages tab

image

The issue should be resolved if there are no resource.error messages there

@IsaSih
Copy link

IsaSih commented Apr 29, 2024

Tests pass on v2.8-94108186cf35028bb5f7db2c34c5ae99450dad9b-head

@IsaSih IsaSih closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug QA/manual-test Indicates issue requires manually testing size/0.5 Size Estimate 0.5
Projects
None yet
Development

No branches or pull requests

3 participants