define readinessProbe on statefulSet#1825
Merged
Merged
Conversation
Member
|
👍 |
1 similar comment
Member
Author
|
👍 |
This was referenced Apr 4, 2022
Closed
beneso
reviewed
May 31, 2022
| Handler: v1.Handler{ | ||
| HTTPGet: &v1.HTTPGetAction{ | ||
| Path: "/readiness", | ||
| Port: intstr.IntOrString{IntVal: patroni.ApiPort}, |
There was a problem hiding this comment.
Hi, thanks for the commit!
I have a question: are you sure of the port? Container is never ready with this probe, HTTP 503. While if we try the same path with port 8080, we get HTTP 200.
root@acid-grafana-postgres-0:/home/postgres# curl -vvvv $POD_IP:8008/readiness
* Trying 10.0.2.66...
* TCP_NODELAY set
* Connected to 10.0.2.66 (10.0.2.66) port 8008 (#0)
> GET /readiness HTTP/1.1
> Host: 10.0.2.66:8008
> User-Agent: curl/7.58.0
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 503 Service Unavailable
< Server: BaseHTTP/0.6 Python/3.6.7
< Date: Tue, 31 May 2022 15:43:49 GMT
< Content-Type: application/json
<
* Closing connection 0
<json>
vs port 8080:
root@acid-grafana-postgres-0:/home/postgres# curl -vvvv $POD_IP:8080/readiness
* Trying 10.0.2.66...
* TCP_NODELAY set
* Connected to 10.0.2.66 (10.0.2.66) port 8080 (#0)
> GET /readiness HTTP/1.1
> Host: 10.0.2.66:8080
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Tue, 31 May 2022 15:43:44 GMT
< Content-Length: 3375
<json>
Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With #1760 merged, we should add a readinessProbe to the statefultSet because the ConfigMaps option defines a selector on the master service. Label selectors incl. readiness probes. We will add it either way.
#1760 also introduced a new suffix for deleting Patroni cluster objects which will result in an error for the new "leader" suffix if endpoints are used. Instead, the operator should just l log a warning and try to delete as much as it can. Another bug was introduced by not deleting all services if endpoints are used.
Other changes: