git-gate per-bottle state does not survive a gateway restart — running bottles 404 on fetch/push #512
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Restarting/rebuilding the gateway drops every already-running bottle's git-gate state, so its agent gets
HTTP 404from the git-gate smart-HTTP server (port 9420) oninfo/refs— fetch and push both fail.Same class of bug as #510 (the CA): per-bottle git-gate state lives only in the gateway's ephemeral rootfs and is provisioned once, at bottle launch.
Evidence (observed, firecracker)
After a gateway rebuild, the live gateway VM held exactly ONE bottle's repo —
/git/<id>/bot-bottle.git, created at gateway boot — the bottle that was relaunched together with the gateway. Bottles that predated the restart had no/git/<id>and no/git-gate/creds/<id>, so their agents 404'd.mountshowed only/dev/vda(rootfs); nothing persistent.Root cause
consolidated_launchstep 3 →provision_gateway/git_gate/render), under/git/<bottle_id>and/git-gate/creds/<bottle_id>./gitor/git-gate/creds. Either way a gateway restart wipes them.orchestrator/reprovision.pyrestores only egress tokens (reprovision_from_secret), not git-gate declarations, and the registry does not store the git upstreams/keys.Fix
Persist git-gate state (
/git+/git-gate/creds) across gateway restarts, mirroring the #510 CA-persistence approach, on BOTH backends:/gitand/git-gate/creds.host_gateway_ca_dir).Teardown already
rm -rfs/git/<id>+ creds (deprovision_git_gate), so the persistent store self-cleans over the normal lifecycle.Stacked on #510/#511 (shares the gateway persistent-volume mechanism).