rancher: [BUG] upgrade docker install from 2.8.3 -> 2.8.4 fails
Rancher Server Setup
- Rancher version: 2.8.3 to 2.8.4
- Installation option: docker (v26)
Describe the bug ran
docker stop rancher
docker rm rancher
docker pull rancher/rancher:stable
docker run -d --restart=unless-stopped --name rancher -p 80:80 -p 443:443 -v /opt/rancher:/var/lib/rancher --privileged rancher/rancher:stable --acme-domain *****
Docker logs after running. Stops at the last line and then restarts the docker.
2024/06/17 09:34:54 [INFO] Rancher version v2.8.4 (29572e61e) is starting
2024/06/17 09:34:54 [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: ClusterRegistry:}
2024/06/17 09:34:54 [INFO] Listening on /tmp/log.sock
2024/06/17 09:34:54 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:34:56 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:34:58 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:00 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:02 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:04 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:06 [INFO] Running in single server mode, will not peer connections
2024/06/17 09:35:07 [INFO] Applying CRD features.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD clusterroletemplatebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD globalroles.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD globalrolebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD projects.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD projectroletemplatebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD roletemplates.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD navlinks.ui.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD podsecurityadmissionconfigurationtemplates.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD clusters.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD apiservices.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD settings.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD preferences.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD features.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD operations.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD apps.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD managedcharts.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkeclusters.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkebootstraps.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkebootstraptemplates.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD custommachines.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD etcdsnapshots.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD clusters.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinedeployments.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinehealthchecks.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machines.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinesets.cluster.x-k8s.io
2024/06/17 09:35:44 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 11
- Comments: 33 (3 by maintainers)
Commits related to this issue
- downgrade to rancher 2.8.4 due to: https://github.com/rancher/rancher/issues/45841 — committed to skynnit/k8slibrary by johanot 2 years ago
- downgrade to rancher 2.8.3 due to: https://github.com/rancher/rancher/issues/45841 — committed to skynnit/k8slibrary by johanot 2 years ago
- [v0.5] Set FailurePolicy to Ignore for settings validator (#446) * Set FailurePolicy to Ignore for settings validator * Add unit and integration tests Ref: https://github.com/rancher/rancher/issu... — committed to rancher/webhook by pmatseykanets 2 years ago
Finally got it, guys
In case you are already down, ssh to your Rancher node
and then renistall rancher-webhook from Apps menu to have validating webhook again properly setup.
The same for 2.8.4 -> 2.8.5
Our 2.8.4 also has webhook errors, but in that version it does not stop the container and just works. After upgrading to 2.8.5 it stops just like the first post.
It may be related to https://github.com/rancher/rancher/issues/45418
Aaaaand in my case as well. Trying to upgrade 2.8.5 --> 2.9.0, standalone, dockerized app fails the same way as mentioned above
same here, trying to update docker install from 2.8.3 to 2.9.0
Same issue upgrading from 2.8.3 -> 2.8.5. Upgrade process stuck in endless loop. @daleckystepan suggestion worked for me. I do agree with the sentiment that rancher upgrades are a permanent source of stress. It’s the sole reason I have not introduced rancher at work. When asking around, my experiences are not unique, and some of my friends/colleagues even simply stopped using rancher alltogether solely for their permanently broken upgrades.
Edit:
This doesn’t work for me:docker exec -t rancher${new_rancher} bash -c "while true; do kubectl delete validatingwebhookconfigurations rancher.cattle.io; \
Man, each rancher update is really a pain in the ass.
Edit2: Ok it seems that the upgrade continued and the GUI is available again. But yeah, really, every update is a pain and nothing works out of the box. I always have to patch something, restart something, clean something.
I was able to reproduce this issue using the provided steps, though without the acme-specific bits. Starting with a fresh v2.8.3 Rancher install, these commands reliably crash the webhook after the 2.8.5 upgrade:
Note that our documented upgrade procedure handles data persistence differently, but I was still able to reproduce the issue using both methods.
Verified on v2.9-head ID:
db67b4e✅Fresh Install ✅ Docker upgrade from v2.9.0 -> v2.9-head ✅ Docker upgrade from v2.8.6 -> v2.9-head ✅ Docker upgrade from v2.8.5 -> v2.9-head ✅ Docker upgrade from v2.8.4 -> v2.8.5 -> v2.9-head ✅
HA upgrade from v2.9.0 -> v2.9-head ✅ HA upgrade from v2.8.6 -> v2.9-head ✅ HA upgrade from v2.8.5 -> v2.9-head ✅ HA upgrade from v2.8.4 -> v2.8.5 -> v2.9-head ✅
2.8 Backport Tracking: https://github.com/rancher/rancher/issues/46541
Update to 2.9.0 also not as good.
No luck yet
Hey folks 👋 — just a heads up for anyone stuck upgrading Rancher (e.g., from v2.8.3 to 2.11.0) because of rancher-webhook issues: I got around it by spinning up the older Rancher version, uninstalling the webhook from cluster local (k3s)
helm uninstall rancher-webhook -n cattle-systemstopping the container, updating to the new version in Docker Compose, and then manually reinstalling the webhook with:helm repo add rancher-charts https://charts.rancher.iohelm repo updatehelm install rancher-webhook rancher-charts/rancher-webhook -n cattle-system --create-namespaceThis got everything working smoothly again on the upgrade. 🙌Heya, this issue scared the s@#! outta me. Reverting the persistent containers storage and going back to 2.8.4 is good, but yeah, moving from a minor version to another minor version shouldnt be breaking…
After doing this, I was able to access Rancher from the browser. However, there was an error with the RKE2 cluster downstream, while another cluster downstream on RKE1 was not affected.
Has anyone successfully reinstalled/upgraded the rancher-webhook after running the above
docker execcommand?2.9.0 and 2.9.1 both start after deleting validatingwebhookconfigurations as suggested by @daleckystepan, but could not find such an App to restore deleted object on any of these versions. My attempts to update repos failed with errors like “could not connect”.
but 2.9-head works for me, did not have to delete validatingwebhookconfigurations
I still am unable to proceed with following…:
Docker upgrade from v2.8.5 -> v2.9-head ✅Sameproxy error from 127.0.0.1:6443 while dialing 10.42.0.46:9443, code 502: 502 Bad Gatewayas beforeHello here, I had some success through an entrypoint modification of the container (docker inspect, engine stop, etc … ) In short rancher launches k3s but exits pretty quickly if rancher-webhook is not quickly ready. Manually launching k3s server and troubleshooting rancher-webhook was the key part.
I am sorry about the pretty low level of information but some other colleague was working on it at the same time so I do not have a reproductible documentation.
It works on newly created clusters without this issues unfortunately it does not work on old clusters that were already updated multiple times.