kubernetes-retired / service-catalog

Consume services in Kubernetes using the Open Service Broker API
https://svc-cat.io
Apache License 2.0
1.05k stars 387 forks source link

Can't register any broker, the webhook request times out #2871

Closed jiayihu closed 3 years ago

jiayihu commented 3 years ago

Bug Report

What happened: I've installed the catalog chart but I can't register any broker. I've tried with both a custom broker and ups-broker. This is the error no matter how I try it (both with svcat and YAML)

Error: register request failed (Internal error occurred: failed calling webhook "mutating.clusterservicebrokers.servicecatalog.k8s.io": Post "https://catalog-catalog-webhook.catalog.svc:443/mutating-clusterservicebrokers?timeout=30s": context deadline exceeded)

What you expected to happen: Being able to register the broker

How to reproduce it (as minimally and precisely as possible):

helm install catalog ./catalog-0.3.1.tgz --namespace catalog
helm install ups-broker ./ups-broker-0.3.1.tgz --namespace ups-broker
svcat register ups-broker --url http://ups-broker-ups-broker.ups-broker --scope cluster

Anything else we need to know?:

Environment:

jiayihu commented 3 years ago

I have checked the broker ups-broker is live and reachable via DNS from the catalog namespace. For instance I can k exec -ti dnsutils -n catalog -- wget --header="X-Broker-API-Version: 2.16" -O - http://ups-broker-ups-broker.ups-broker/v2/catalog

To be precise, from my custom OSB I can see that the actually no request is even reaching the broker.

The webhook and controller seem also to be live and fine. I'll attach the logs just as info.

webhook.log controller.log

jiayihu commented 3 years ago

Okay I was able to solve the issue, it was an issue in my node hosting the catalog. I noticed the node wasn't able to send back the responses to the master because it was missing the ip route to handle packets with master's IP. The flannel.1 interface was missing for the master IP.

These are the steps I've taken to debug. Your issue might be different, but I hope this helps:

In my case I noticed that the master was able to send the packet to the service but I only saw Start packets, without ACK or anything going back to the master. That's when I got suspicious and I noticed the missing network interface for the master. Re-installing the cluster and rebooting solved the issue.