Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix liveness check #34

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Fix liveness check #34

merged 2 commits into from
Aug 21, 2023

Conversation

blogh
Copy link
Collaborator

@blogh blogh commented Aug 21, 2023

The liveness probe used to return something. It looks like it doesn't do it anymore and it breaks the node_is_alive check.

Issue: #31

The liveness probe used to return something. It looks like it doesn't do
it anymore and it breaks the `node_is_alive` check.

Issue: dalibo#31
@blogh
Copy link
Collaborator Author

blogh commented Aug 21, 2023

The service now returns:

(.venv) [benoit@benoit-dalibo check_patroni]$ check_patroni --config config.ini -vvv node_is_alive
DEBUG - Trying to connect to http://10.20.30.51:8008/liveness with cert: None verify: None
DEBUG - Starting new HTTP connection (1): 10.20.30.51:8008
DEBUG - http://10.20.30.51:8008 "GET /liveness HTTP/1.1" 200 None
DEBUG - api call data: <Empty>
NODEISALIVE OK - This node is alive (patroni is running).
| is_alive=1;;@0

Instead of crashing as descrbed in the issue.

@blogh blogh requested a review from dlax August 21, 2023 11:41
@blogh
Copy link
Collaborator Author

blogh commented Aug 21, 2023

@dlax can you have a quick look at this? I am not sure the fix is very "pythonic" ?

check_patroni/types.py Outdated Show resolved Hide resolved
check_patroni/types.py Show resolved Hide resolved
@blogh blogh merged commit d07a26d into dalibo:master Aug 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants