rancher: [BUG] 2.9.3: many resources show "unknown" in cluster mangaement and edit is not possible

Rancher Server Setup

  • Rancher version: v2.9.3 - Installation option (Docker install/Helm Chart): docker

Information about the Cluster

  • Cluster Type (Local/Downstream): harvester provisoned downstream

User Information

  • What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom) admin

Describe the bug Unable to access the context menu for harvester-provisioned clusters (on harvester 1.3.2) due to incorrectly handled errors:

ActionMenu.vue:112 TypeError: Cannot read properties of undefined (reading 'name')
    at n.get (provisioning.cattle.io.cluster.js:249:45)
    at n.get (resource-class.js:928:26)
    at get (<anonymous>)
    at n.get (provisioning.cattle.io.cluster.js:91:14)
    at n.get (resource-class.js:842:22)
    at options (action-menu.js:44:16)
    at C.e._wrappedGetters.<computed>.e._wrappedGetters.<computed> (vuex.esm.js:881:12)
    at Rr.<anonymous> (vuex.esm.js:140:12)
    at e.get (vue.min.js:11:28262)
    at e.evaluate (vue.min.js:11:2
<!--Steps to reproduce the behavior-->

**Result**

**Expected Result**
<!--A clear and concise description of what you expected to happen.-->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem.-->

**Additional context**
<!--Add any other context about the problem here.-->

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

Screenshot_20241118_220738_Samsung Internet.jpg

The UI started working as expected once I disabled the ui-sql-cache feature flag.

Thank you both for the update.

The ui-sql-cache feature flag was part of the two settings in https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-experimental-features/ui-server-side-pagination. As a reminder server-side pagination is not meant for production and in 2.9 is only beneficial in specific scenarios (though this could all change in 2.11…).

The UI started working as expected once I disabled the ui-sql-cache feature flag.

can confirm this. after disabling the ui-sql-cache feature, rancher:v2.9.3 works as expected.

@bpedersen2 @niesel thank you both for your quick responses.

@moio @MbolotSuse I would guess that the http request fetching the resources contain the correct metadata.state for the resource and then an update over websocket omits it.

@richard-cox

If this is happening for other resources and not just provisioning and management clusters there may be an issue with how it’s calculated.

It happens with pretty much all Resources in the UI under Workloads, Secrets, Apps, Policy, etc. At first the state shows as “Active”, then after a short time all States switch to “Unknown”. The difference is, when I look at these “normal” resources I don’t get the TypeErrors. Just those Warnings/Errors appear Resource error [management] <blablub.io.xyz> event watch error: an error on the server ("unable to decode an event from the watch stream: http2: response body closed") has prevented the request from succeeding

The TypeErrors seem to only appear when looking at “Cluster Management > Clusters”.


@moio

Is Server-Side Pagination enabled? If so, does the problem manifest once it’s turned off(both options)?

It wasn’t enabled here. We’ve tried some of the UI Performance Settings. They didn’t change much in respect to appearance of this errors. It just takes a little longer. Now all UI Performance Settings are disabled. The Errors appear nonetheless.

No, I did not have server-side pagination enabled, but the advanced websocket worker is enabled.

The error is most probably coming from https://github.com/rancher/dashboard/blob/master/shell/models/provisioning.cattle.io.cluster.js#L248 --> https://github.com/rancher/dashboard/blob/master/shell/models/provisioning.cattle.io.cluster.js#L852-L858. Somehow the metadata.state of the provisioning.cattle.io cluster (or depending on how cluster is classified as rke2) the management.cattle.io version of the same cluster, is not defined.

If this is happening for other resources and not just provisioning and management clusters there may be an issue with how it’s calculated.

Generally the metadata.state is very important for the UI (visually and functionally).

The problems seems more severe: All work loads (which are running fine, as seen by kuebctl directly) initially show the correct status in the UI, but after a few seconds they all show “unknown” and do not show the correct infos. And a lot of the undefined ‘name’ errors pop in the browser console.