rancher: Resolved - [BUG] All pools unavailable on RKE2/K3s provisioned clusters on Rancher 2.8.0-2.8.2
Update 3/27/2024
The issue should no longer be reproducible, see https://github.com/rancher/rancher/issues/44929#issuecomment-2022983956 for more information.
Rancher Server Setup
- Rancher version: 2.8.1 and also 2.8.2
- Installation option (Docker install/Helm Chart): Docker
- If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): v1.27.11+rke2r1
- Proxy/Cert Details: No proxy, self-signed certs and also Let’s Encrypt
Information about the Cluster
- Kubernetes version: v1.27.11+rke2r1
- Cluster Type (Local/Downstream): v1.27.11+rke2r1, vSphere node provider
- If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider):
User Information
- What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom)
- If custom, define the set of permissions: Admin
Describe the bug All pools are unexpectedly unavailable on more than 30 clusters in different configuration, DCs, different VMware versions etc. On the most clusters all pods inside local cluster have been restarted during today’s night.
A lot of similar errors in local cluster capi-controller-manager-bf5847f5b-n8t89
2024-03-26T13:49:09.985633257Z E0326 13:49:09.984995 1 machineset_controller.go:883] "Unable to retrieve Node status" err="failed to create cluster accessor: error fetching REST client config for remote cluster \"fleet-default/app\": failed to retrieve kubeconfig secret for Cluster fleet-default/app: Secret \"app-kubeconfig\" not found" controller="machineset" controllerGroup="cluster.x-k8s.io" controllerKind="MachineSet" MachineSet="fleet-default/app-worker-dev-764b7759f8x5dkwx" namespace="fleet-default" name="app-worker-dev-764b7759f8x5dkwx" reconcileID=d40f0d80-9fe6-43b4-aa67-9bd9ec9c5756 MachineDeployment="fleet-default/app-worker-dev" Cluster="fleet-default/app" Machine="fleet-default/app-worker-dev-764b7759f8x5dkwx-n8wx7" node=""
I checked app-kubeconfig secret and it is present and seems to have valid content.
To Reproduce I don’t know
Result All pools unavailable, cluster maintenance not possible.
Expected Result All pools available
Screenshots
Additional context
Thank you for support
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 34 (4 by maintainers)
Commits related to this issue
- Force use of bundled charts for Rancher deployment This is to avoid the issue seen in rancher/rancher#44929. Signed-off-by: Loic Devulder <ldevulder@suse.com> — committed to ldevulder/ele-testhelpers by ldevulder 3 years ago
- Force use of bundled charts for Rancher deployment This is to avoid the issue seen in rancher/rancher#44929. Signed-off-by: Loic Devulder <ldevulder@suse.com> — committed to rancher-sandbox/ele-testhelpers by ldevulder 3 years ago
QA validations were completed and https://github.com/rancher/charts/pull/3700 has just been merged meaning
rancher-provisioning-capiversion103.2.0+up0.0.1is now released and all default-configured non-airgap v2.8.0-v2.8.2 Rancher deployments will automatically update to this fixed version of chart and the issue should be fixed.Any users that applied the workaround to downgrade the chart to
103.0.0+up0.0.1(e.g. by following instructions in https://github.com/rancher/rancher/issues/44929#issuecomment-2020649836) should now be free to rollback the workaround.Important Note: Rancher automatically refreshes chart data every 6 hours. To force immediate refresh, please follow these steps:
localclusterRancherfrom the list of displayed reposrancher-provisioning-capiwill upgrade to version103.2.0+up0.0.1shortlyKeeping the issue open for some time to ensure the fix works for all affected users.
We had the same issue. Suddenly, out of nowhere, across all our rancher clusters and “downstream” clusters, we saw the same issue.
After a long investigation, we came to the same conclusion (i.e., the capi upgrade from 1.4.4 to 1.5.5 is the cause).
We weren’t (and aren’t) sure what is the easiest way to pin it to 1.4.4. Every time we downgraded, it auto-upgraded itself back to the broken 1.5.5 version. What we ended up doing in the interest of speed was:
rancher-provisioning-capi. ( from 103.1.0+up0.1.0 to 103.0.0+up0.0.1 )Maybe that will help someone as well to workaround this until a proper fix has been found.
If someone knows how to pin it to 1.4.4 in a better way, please let us know 😃
Setting the
capi-controller-managerto version 1.4.4 (was 1.5.5), lets me deploy new clusters with correct health status. Deploying new clusters was not possible anymore since roughly 10 hours.Can confirm this is working with provisioning AWS EC2 instances using 103.2.0+up0.0.1
same here
Your screenshot shows that your cluster is waiting for a worker node to be registered (and on top of that, your cluster does not have a worker listed in your machine list.
My list of installed apps is always empty, don’t know why. So only first two steps of workaround worked for me, after that I had to open rancher local console ( through browser ) and:
helm -n cattle-provisioning-capi-system rollback rancher-provisioning-capi 1which rolled back it to 103.0.0+up0.0.1@kingnarmer , please use the workaround from https://github.com/rancher/rancher/issues/44929#issuecomment-2020649836 as it pins the charts repo to commit before this problematic updated chart was released.
As an overall update, we’re working on releasing new version of chart that essentially rolls back CAPI version upgrade which should address the issue. This is currently undergoing QA process and https://github.com/rancher/charts/pull/3700 is the PR to release this fixed chart.
Workaround deploy rancher with useBundledSystemChart=true, maybe always the recommended way if you don’t want that every merge/push to release-v2.8 git branch will update your cluster.
Configure Rancher server to use the packaged copy of Helm system charts. The system charts repository contains all the catalog items required for features such as monitoring, logging, alerting and global DNS. These Helm charts are located in GitHub, but since you are in an air gapped environment, using the charts that are bundled within Rancher is much easier than setting up a Git mirror.
After that:
rancher-provisioning-capi. ( from 103.1.0+up0.1.0 to 103.0.0+up0.0.1 )I can confirm that the above fix worked for existing clusters and provisioning new clusters.
Additionally, an alternative fix would be to redeploy
rancherwithuseBundledSystemChart: true, which will redeploy thecapi-controller-managerand any other related resources. I haven’t tried manually labeling the cluster, but others stated earlier that it worked as well.Can confirm this is working for new cluster provisioning with AWS EC2
Thanks @nickvth & @daleckystepan . The lack of labels appears to be the issue. Just to let you know we are looking at how to resolve this.
@richardcase no labels at all on secret
app-kubeconfig