diff --git a/bot_bottle/backend/firecracker/infra_vm.py b/bot_bottle/backend/firecracker/infra_vm.py index ee957d2..e236eef 100644 --- a/bot_bottle/backend/firecracker/infra_vm.py +++ b/bot_bottle/backend/firecracker/infra_vm.py @@ -411,6 +411,7 @@ BOT_BOTTLE_ROOT=/var/lib/bot-bottle python3 -m bot_bottle.orchestrator \\ # entrypoint the consolidated model doesn't use) is left out. BOT_BOTTLE_GATEWAY_DAEMONS=egress,git-http,supervise \\ BOT_BOTTLE_ORCHESTRATOR_URL=http://127.0.0.1:{CONTROL_PLANE_PORT} \\ +SUPERVISE_DB_PATH=/var/lib/bot-bottle/db/bot-bottle.db \\ python3 /app/gateway_init.py & # Reap as PID 1; children are backgrounded, so `wait` blocks. diff --git a/bot_bottle/orchestrator/__main__.py b/bot_bottle/orchestrator/__main__.py index 26c6f40..1606e12 100644 --- a/bot_bottle/orchestrator/__main__.py +++ b/bot_bottle/orchestrator/__main__.py @@ -16,6 +16,7 @@ import secrets from pathlib import Path from .. import log +from ..store_manager import StoreManager from .broker import LaunchBroker, StubBroker from .control_plane import make_server from .docker_broker import DockerBroker @@ -45,6 +46,11 @@ def main(argv: list[str] | None = None) -> int: registry = RegistryStore(args.db) registry.migrate() + # One DB per host: the supervise queue + audit tables live in the SAME + # SQLite file the registry owns, so the control plane is the single + # source of truth. The in-VM supervise daemon writes here; the host + # operator reaches it over HTTP (never a second, disconnected DB). + StoreManager(registry.db_path).migrate() # An ephemeral signing secret ties the orchestrator (signer) to its # broker (verifier). 'stub' records launches instead of starting