Repository navigation
Closed
Labels
priority: highHigh prioritystatus: blockedSomething prevents progresstype: featureNew feature or requestworkload: hoursLikely takes hours to resolve
Milestone
Description
Problem
Cloud Registry should run with 2 replicas, so that it stays available on node drains, crashes and rolling upgrades. The chart can't set this: FOCA's library chart foca-common 0.2.0 renders the app's Deployment with a fixed replicas: 1, and a Deployment scaled by hand is reset by the next helm upgrade.
Multi-replica safety
The app is correct with several replicas; it already runs as several instances (one per Gunicorn worker, and two pods during rolling updates):
- Access control: rules granted or revoked via the API (service roles, permissions API, invitations, renames) are recorded by FOCA's adapter, and every instance applies recorded changes before its next enforced request (FOCA docs, access control, "Scaling"); the namespace migration calls
mark_changed(). - Startup tasks (
add_service_keys(),resume_renames(),add_service_creators(),reconcile_service_counts(),add_service_types(),sync_pending_services()) are documented and written as idempotent and safe to run concurrently; invitations, locks, counters and types are in MongoDB. - Caveats to document: a registration or deletion while a pod starts may make a user's service counter differ by one until the next start (
reconcile_service_counts(), already the case with rolling updates); lock staleness (1 minute) compares pod clocks, so node clocks must be synchronized; the bundled MongoDB has one pod, so the app is still unavailable while MongoDB's pod is replaced; upgrades that need the app stopped scale it to 0 and back tocloudRegistry.replicas.
Proposal
Once foca-common 0.3.0 is released (elixir-cloud-aai/foca#584):
- pin foca-common 0.3.0 (
Chart.yaml,Chart.lock,charts.sha256, link of the library docs); - expose
cloudRegistry.replicasandcloudRegistry.podDisruptionBudgetinvalues.yamlandvalues.schema.json, and add the templatepoddisruptionbudget.yaml; - document them in
deployment/README.md(alsodocs/deployment.md), with the caveats above, and replace the hard-coded--replicas=1in the upgrade steps; - chart tests.
The default stays 1 replica; the ELIXIR On-Cloud deployment sets 2.
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritystatus: blockedSomething prevents progresstype: featureNew feature or requestworkload: hoursLikely takes hours to resolve
Activity