rancher: [BUG] Error when upgrading Docker-hosted Rancher 2.10.3 -> 2.11.0
Rancher Server Setup
- Rancher version: v.2.10.3 – upgrading to --> v2.11.0
- Installation option (Docker install/Helm Chart): Docker
- Proxy/Cert Details: none
Information about the Cluster
- Kubernetes version: v1.31.7+k3s1
- Cluster Type (Local/Downstream):
- Local<!–
- Custom = Running a docker command on a node
- Imported = Running kubectl apply onto an existing k8s cluster
- Hosted = self-host
- Infrastructure Provider = n/a –>
User Information
- What is the role of the user logged in?
- Admin
Describe the bug When starting container with rancher v2.11.0, container falls into restart loop, with:
2025/04/05 11:49:57 [INFO] Applying CRD machines.cluster.x-k8s.io
2025/04/05 11:49:57 [INFO] Applying CRD machinesets.cluster.x-k8s.io
2025/04/05 11:49:57 [ERROR] RDPClient: error reading connect secret: secrets "api-extension" not found, will attempt to create new one...
2025/04/05 11:49:57 [ERROR] RDPClient: error creating connect secret: Internal error occurred: failed calling webhook "rancher.cattle.io.secrets": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/mutation/secrets?timeout=15s": no endpoints available for service "rancher-webhook"
2025/04/05 11:49:57 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.secrets": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/mutation/secrets?timeout=15s": no endpoints available for service "rancher-webhook"
To Reproduce
docker stop container_running_v2.10.3
docker create --volumes-from container_running_v2.10.3 --name rancher-data-05-Apr-2025_v2.10.3 rancher/rancher:v2.10.3
docker run --volumes-from rancher-data-05-Apr-2025_v2.10.3 -v "$PWD:/backup" --rm busybox tar zcvf /backup/rancher-data-backup-v2.10.3_05_Apr_2025.tar.gz /var/lib/rancher
docker pull rancher/rancher:v2.11.0
docker run -d --volumes-from rancher-data-05-Apr-2025_v2.10.3 --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.11.0
Result
2025/04/05 11:49:57 [ERROR] RDPClient: error reading connect secret: secrets "api-extension" not found, will attempt to create new one...
2025/04/05 11:49:57 [ERROR] RDPClient: error creating connect secret: Internal error occurred: failed calling webhook "rancher.cattle.io.secrets": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/mutation/secrets?timeout=15s": no endpoints available for service "rancher-webhook"
2025/04/05 11:49:57 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.secrets": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/mutation/secrets?timeout=15s": no endpoints available for service "rancher-webhook"
When falling back to start container using older v2.10.3 version, it is working OK
Expected Result Have a running rancher instance based on v2.11.0
Screenshots
Additional context
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 7
- Comments: 26 (8 by maintainers)
I can replicate this across several of my Rancher containers, all of them running in the same k8s cluster (sort of in docker mode).
@pratikjagrut mentioned he is unable to reproduce this one. Any further updates @pratikjagrut ?
@CaptainRedHat / @ppomes when this happened, did you see what state rancher-webhook was? eg:
kubectl get pods -n cattle-systemQuick analysis:
When starting Rancher with docker or as a binary, before starting the remotedialer-proxy client we create the Secret
api-extension. If the creation of the secret fails (for any reason) we eventually stop Rancher with an error message.Concurrently (afaik) we deploy or upgrade the remotedialer-proxy server and rancher-webhook.
It appears here the webhook was configured but somehow the webhook itself wasn’t ready to receive requests. I’d expect even during an upgrade to have at least one webhook pod to be available (we need to check that assumption 🤔 ).
There should be at least a retry mechanism added to prevent Rancher from exiting due to one error for this particular Secret creation. We should check to see if we can move the start of remotedialer-proxy client in another goroutine.