Open cpinjani opened 1 year ago
As mentioned in rancher-sandbox/rancher-turtles#207, this may be solved by replacing --set features=embedded-cluster-api=false
with --set CATTLE_FEATURES=embedded-cluster-api=false
. Hopefully this fixes the issue.
Still hitting this issue on Rancher version 2.7.8 when below installation commands are used: Docker:
docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 -e CATTLE_BOOTSTRAP_PASSWORD="rancherpassword" rancher/rancher:v2.7.8 --features=embedded-cluster-api=false
Helm:
helm install rancher rancher-stable/rancher --namespace cattle-system --create-namespace --set bootstrapPassword=rancheradmin --set replicas=1 --set hostname=<hostname> --set 'extraEnv[0].name=CATTLE_FEATURES' --set 'extraEnv[0].value=embedded-cluster-api=false' --set global.cattle.psp.enabled=false --version v2.7.8
Workaround is to install CAPI cluster with the docker provider before Rancher installation as per https://github.com/rancher/rancher/issues/39924#issuecomment-1568661964
This will fail unless Rancher Turtles (or directly CAPI) is installed first.
This is strange because I've seen it failing multiple times but this E2E scenario worked for me and is following the same order of installation: Rancher first with CAPI disabled, then Rancher Turtles, after moving to using this syntax.
Issue is reproducible on v2.8.2 by using below install command:
helm install rancher rancher-latest/rancher --version 2.8.2 --namespace cattle-system --set hostname=<hostname> --set 'extraEnv[0].name=CATTLE_FEATURES' --set 'extraEnv[0].value=embedded-cluster-api=false' --set replicas=1 --set global.cattle.psp.enabled=false --set bootstrapPassword=rancherpassword --set rancherImageTag=v2.8.2 --wait
Logs:
kubectl logs -n cattle-system rancher-7659f497db-ddmst -f2024/03/27 07:13:45 [INFO] Rancher version v2.8.2 (2f7113dc3) is starting
2024/03/27 07:13:45 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:false AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features:embedded-cluster-api=false ClusterRegistry:}
2024/03/27 07:13:45 [INFO] Listening on /tmp/log.sock
2024/03/27 07:13:45 [INFO] Running in clustered mode with ID 10.42.0.13, monitoring endpoint cattle-system/rancher
2024/03/27 07:13:45 [INFO] Applying CRD features.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD clusterroletemplatebindings.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD globalroles.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD globalrolebindings.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD projects.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD projectroletemplatebindings.management.cattle.io
2024/03/27 07:13:45 [INFO] Updating embedded CRD roletemplates.management.cattle.io
2024/03/27 07:13:45 [INFO] Applying CRD navlinks.ui.cattle.io
2024/03/27 07:13:45 [INFO] Applying CRD podsecurityadmissionconfigurationtemplates.management.cattle.io
2024/03/27 07:13:45 [INFO] Applying CRD clusters.management.cattle.io
2024/03/27 07:13:45 [INFO] Applying CRD apiservices.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD settings.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD preferences.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD features.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD operations.catalog.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD apps.catalog.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD managedcharts.management.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD rkeclusters.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD rkebootstraps.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD rkebootstraptemplates.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD custommachines.rke.cattle.io
2024/03/27 07:13:46 [INFO] Applying CRD etcdsnapshots.rke.cattle.io
W0327 07:13:52.064694 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:13:52.064743 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:13:53.547738 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:13:53.547775 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:13:56.678475 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:13:56.678508 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:14:02.836781 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:14:02.836810 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:14:12.433680 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:14:12.433716 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:14:36.325709 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:14:36.325749 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W0327 07:15:13.225011 33 reflector.go:533] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E0327 07:15:13.225041 33 reflector.go:148] pkg/mod/github.com/rancher/client-go@v1.27.4-rancher1/tools/cache/reflector.go:231: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=ProjectCatalog controller
2024/03/27 07:15:44 [INFO] Starting project.cattle.io/v3, Kind=App controller
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=Node controller
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=PodSecurityPolicyTemplateProjectBinding controller
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=Node workers
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=ClusterTemplateRevision controller
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=PodSecurityPolicyTemplateProjectBinding workers
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=Group controller
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=RoleTemplate controller
2024/03/27 07:15:44 [INFO] Shutting down project.cattle.io/v3, Kind=App workers
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=Group workers
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=ClusterTemplateRevision workers
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=ProjectCatalog workers
2024/03/27 07:15:44 [INFO] Starting provisioning.cattle.io/v1, Kind=Cluster controller
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=NodePool controller
2024/03/27 07:15:44 [INFO] Shutting down provisioning.cattle.io/v1, Kind=Cluster workers
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=User controller
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=NodePool workers
2024/03/27 07:15:44 [INFO] Starting apiregistration.k8s.io/v1, Kind=APIService controller
2024/03/27 07:15:44 [INFO] Starting management.cattle.io/v3, Kind=GlobalRoleBinding controller
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=User workers
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=RoleTemplate workers
2024/03/27 07:15:44 [INFO] Shutting down apiregistration.k8s.io/v1, Kind=APIService workers
2024/03/27 07:15:44 [INFO] Shutting down management.cattle.io/v3, Kind=GlobalRoleBinding workers
2024/03/27 07:15:44 [FATAL] failed to wait for caches to sync
I think initially we will require Rancher to be started without that flag set. But long term we need to find a solution to this.
On Rancher v2.9.3, tried helm install with flags:
--set CATTLE_FEATURES=embedded-cluster-api=false
. This does not disables embedded-cluster-api feature, rancher-capi app is still present.$ kubectl get app -n cattle-provisioning-capi-system
NAME CHART VERSION RELEASE NAME RELEASE VERSION STATUS
rancher-provisioning-capi rancher-provisioning-capi 104.0.0+up0.3.0 rancher-provisioning-capi 1 deployed
--set 'extraEnv[0].name=CATTLE_FEATURES' --set 'extraEnv[0].value=embedded-cluster-api=false'
, usage is documented here. Rancher fails to start.Logs
2024/11/14 08:03:48 [INFO] Rancher version v2.9.3 (261bb3c70eeba7b6367a9924c9c2d0a3433f27c2) is starting
2024/11/14 08:03:48 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:false AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features:embedded-cluster-api=false ClusterRegistry:}
2024/11/14 08:03:48 [INFO] Listening on /tmp/log.sock
2024/11/14 08:03:48 [INFO] Running in clustered mode with ID 10.42.0.13, monitoring endpoint cattle-system/rancher
2024/11/14 08:03:49 [INFO] Applying CRD features.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD clusterroletemplatebindings.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD globalroles.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD globalrolebindings.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD projects.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD projectroletemplatebindings.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD roletemplates.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD clusterproxyconfigs.management.cattle.io
2024/11/14 08:03:49 [INFO] Updating embedded CRD uiplugins.catalog.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD navlinks.ui.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD podsecurityadmissionconfigurationtemplates.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD clusters.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD apiservices.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD settings.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD preferences.management.cattle.io
2024/11/14 08:03:49 [INFO] Applying CRD features.management.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD operations.catalog.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD apps.catalog.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD managedcharts.management.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD rkeclusters.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD rkebootstraps.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD rkebootstraptemplates.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD custommachines.rke.cattle.io
2024/11/14 08:03:50 [INFO] Applying CRD etcdsnapshots.rke.cattle.io
W1114 08:03:56.991419 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:03:56.991469 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W1114 08:03:58.061156 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:03:58.061190 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W1114 08:04:01.015687 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:04:01.015720 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W1114 08:04:06.350859 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:04:06.350891 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W1114 08:04:15.088479 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:04:15.088512 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
W1114 08:04:30.593750 39 reflector.go:547] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
E1114 08:04:30.593778 39 reflector.go:150] pkg/mod/k8s.io/client-go@v0.30.1/tools/cache/reflector.go:232: Failed to watch *v1beta1.Machine: failed to list *v1beta1.Machine: the server could not find the requested resource (get machines.meta.k8s.io)
Rancher Server Setup
Describe the bug
Rancher fails to start with Feature-flag set to
embedded-cluster-api=false
To Reproduce
docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:v2.7.3 --features=embedded-cluster-api=false
Expected Result
Rancher should start with Feature-flag set to
embedded-cluster-api=false
Additional context
It is working on 2.6.9
Logs