mybinder.org-deploy
mybinder.org-deploy copied to clipboard
How is the Docker registry health check conducted?
On Friday, 02 August 2024, @arnim noticed that GESIS server was having problems with the Docker registry.
curl https://mybinder.org/health | python3 -m json.tool
{
"ok": true,
"checks": [
{
"service": "Docker registry",
"ok": false
},
{
"service": "JupyterHub API",
"ok": true
},
{
"service": "Pod quota",
"total_pods": 5,
"build_pods": 2,
"user_pods": 3,
"quota": 250,
"ok": true,
"_ignore_failure": true
}
]
}
Knowing how the docker registry health check is conducted will help me to inspect it.
Thanks for the help.
It's very basic, it just checks a connection is possible: https://github.com/jupyterhub/binderhub/blob/a8a2e197d5ebbed78f1ee5ee3a40547dc8e0f7eb/binderhub/health.py#L150-L159
We could potentially have a more complex check, though it might end up being specific to the registry implementation
We're already calling a Registry class method in the health check
- https://github.com/jupyterhub/binderhub/blob/a8a2e197d5ebbed78f1ee5ee3a40547dc8e0f7eb/binderhub/health.py#L158C24-L158C42
- https://github.com/jupyterhub/binderhub/blob/c71bd8af339c08d9d673a369fe83225cb672d7b3/binderhub/registry.py#L272
so I think it'd be fine to add a new
health_checkmethod to the registry class, which defaults to the current check but could be easily overridden.