Cloud Repositorio includes a backgroundDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/markitobonito/cloud_repositorio/llms.txt
Use this file to discover all available pages before exploring further.
HealthMonitor thread that periodically saves the YAML database to disk. This provides basic durability against process crashes: if the orchestrator exits unexpectedly, the most recently saved state is available on the next startup.
HealthMonitor
HealthMonitor runs as a daemon thread so it does not prevent the process from exiting. It calls db.save() on a fixed interval, then sleeps until the next cycle. Errors during save are logged but do not stop the monitor.
CLI.run() before the login prompt and stopped (via monitor.stop()) when the loop exits. The default interval is 15 seconds and can be changed by passing a different value to the interval parameter when constructing HealthMonitor.
State persistence
All mutable state is stored indatabase.yaml. The file is written atomically by db.save() on every monitor tick. It contains:
- Users — username, SHA-256 password hash, VM quota,
used_vmscount, and a list of owned slice IDs. - Slices — full topology including every VM’s interfaces, MAC addresses, VLAN assignments, QCOW2 image paths, QEMU PIDs, and statuses; link records; and the VLAN pool state.
- Workers — capacity specs (max VMs, RAM, cores, disk) and current usage counters.
- ID counters —
next_vm_idandnext_vlan_idto ensure unique IDs survive restarts.
Startup backup
When the orchestrator starts,main.py copies the current database to a backup file before loading it:
Manual recovery
To roll back to the startup snapshot, stop the orchestrator and copy the backup over the live database:Logging
All components (CLI, OrchestratorAPI, DeploymentAPI, VMLauncher, QCOWManager, HealthMonitor) use Python’s logging module. The root logger is configured in cli.py:
INFO level:
| Event | Sample message |
|---|---|
| Worker list loaded | (logged at startup by database load) |
| Slice created | Slice 1000 created for admin (VLAN pool: 100-119) |
| VM created | VM web created (VNC: 5901, Flavor: {...}, Internet: True, Data IFs: 1) |
| VLAN configuration | Configuring VLAN 100 for Link 1 |
| QEMU launch | Launching VM web on 10.0.10.1: sudo qemu-system-x86_64 ... |
| VM started | VM 1001 started with PID 12345 |
| dnsmasq / DHCP | (logged by VLANManager when configuring DHCP for a VLAN) |
| Health monitor | Health monitor started (15s interval) |
| Monitor save error | Monitor error: <exception message> |