dotnet / dotnet/yarp

crash when BackgroundHostedService can not reach kubernetes API server

Open
#1,932 0 comments 0 reactions 0 assignees View on GitHub
Kubernetes Ingress Controller Type: Bug
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

### Describe the bug
application crash when BackgroundHostedService can not reach kubernetes API server.

### To Reproduce

What steps can we follow to reproduce the issue?

when use a unreachable kubernetes API server, the application will stop when connection timeout.

Got Exceptions? Include both the message and the stack trace

```
在 System.Net.Http.HttpConnectionPool.d__99.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Net.Http.HttpConnectionPool.d__98.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Net.Http.HttpConnectionPool.d__78.MoveNext()
在 System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.d__1.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.d__5.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Net.Http.HttpConnectionPool.d__84.MoveNext()
在 System.Net.Http.DiagnosticsHandler.d__10.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Net.Http.RedirectHandler.d__4.MoveNext()
在 System.Net.Http.HttpClient.<g__Core|83_0>d.MoveNext()
在 k8s.Kubernetes.d__39.MoveNext()
在 k8s.AbstractKubernetes.d__210.MoveNext()
在 Yarp.Kubernetes.Controller.Client.ResourceInformer`2.d__22.MoveNext()
在 Yarp.Kubernetes.Controller.Client.ResourceInformer`2.d__19.MoveNext()
在 Yarp.Kubernetes.Controller.Hosting.BackgroundHostedService.<g__CallRunAsync|11_0>d.MoveNext()
在 Yarp.Kubernetes.Controller.Hosting.BackgroundHostedService.d__12.MoveNext()
在 Microsoft.Extensions.Hosting.Internal.Host.d__14.MoveNext()
```

### Further technical details

- Include the version of the packages you are using
- The platform (Linux/macOS/Windows)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.