You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#262 registers resume_renames_periodically() (cloud_registry/ga4gh/registry/rename.py) as a before_request hook of the whole app (cloud_registry/app.py). At most every 10 seconds per worker, it queries the service_locks collection, without catching database errors. So the probe path (/ga4gh/registry/v1/ui/, also the image's HEALTHCHECK), the spec and GET /service-info now depend on MongoDB:
While MongoDB is unreachable (e.g., the bundled pod restarts during helm upgrade, or a failover), the first request in a worker after the interval waits for pymongo's server selection timeout (30 seconds) and then returns 500.
Probes time out after 5 seconds (the HEALTHCHECK after 4), so they may fail and the pod may be restarted. Before feat: let admins change a service's ID #262, the UI and /service-info kept working.
The chart README (Probes) says the probe path "needs neither authentication nor the database", which is no longer true.
Proposal
Resume interrupted renames only before requests to the registry's own operations, not before the Swagger UI, the spec, /service-info or FOCA's admin API.
Catch database errors (PyMongoError) in the hook: log them and continue the request; the next interval tries again.
Check for stale locks with a short timeout, so that API requests don't wait 30 seconds for the check.
Keep the probe text in deployment/README.md accurate.
Regression tests: the hook failing with ServerSelectionTimeoutError still lets /ui/, the spec and /service-info return 200; API requests still resume renames.
Activity