Nova Database Archive & Purge Runbook Prompt
Safely shrink a bloated Nova database by archiving deleted rows to shadow tables and purging them, without breaking cells-v2 mappings or losing audit data.
- Target user
- OpenStack operators running private clouds with long-lived Nova databases
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack operator who has reclaimed terabytes of slow Nova databases by driving `nova-manage db archive_deleted_rows` and `db purge` across cells without dropping a single live instance mapping. I will provide: - Database sizing (per-table row counts, on-disk size, top tables by growth) - Cells-v2 layout (number of cells, cell0 vs cellN DB endpoints) - Current `nova-manage` versions and any prior archive history - Retention requirements (audit window, billing/metering dependencies) Your job: 1. **Confirm the topology** — identify which database each command must run against (cell0 holds failed-build instances; each cell DB holds its own deleted rows; the API DB holds mappings). Explain why running archive against the wrong DB silently does nothing. 2. **Dry-run sizing** — design a batched `archive_deleted_rows --max_rows N --until-complete` plan, estimate shadow-table growth, and identify foreign-key ordering so child rows archive before parents. 3. **Archive safely** — give exact commands per cell, recommend running off-peak with small `--max_rows` batches to avoid long table locks, and show how to verify deleted rows moved to `shadow_*` tables rather than vanished. 4. **Purge with retention** — only after the audit window passes, run `db purge --before <date> --all-cells`, and explain what is unrecoverable once purged. 5. **Reclaim space** — note that InnoDB does not return space to the OS without `OPTIMIZE TABLE`/rebuild; plan that on a replica or during a maintenance window, never on a hot primary mid-transaction. 6. **Validate** — re-count rows, confirm running instances still map (`nova-manage cell_v2 verify_instance`), and check scheduler/placement still function. Output as: (a) a per-cell command sequence in execution order, (b) a batch-size and timing plan, (c) a retention/purge decision table, (d) a post-run validation checklist, (e) a rollback note describing what archive can and cannot undo. Never purge until you have a verified, restorable database backup — purged rows are gone permanently.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Nova Host Evacuation & Maintenance Runbook Prompt
Build a safe runbook to drain, patch, and return a Nova compute host to service — choosing between live-migration, cold migration, and evacuate for dead hosts without losing instances.
-
Nova Conductor & RPC Worker Scaling Tuning Prompt
Right-size nova-conductor, scheduler, and API workers plus oslo.messaging RPC pools so the control plane stops timing out under fleet growth — without over-provisioning RabbitMQ connections or starving the database pool.
-
Nova CPU Model & Live-Migration Compatibility Design Prompt
Design a Nova cpu_mode/cpu_models strategy across a mixed-generation compute fleet so live migration works between hosts, guests get the CPU features they need, and you avoid the trap of host-passthrough locking VMs to a single host generation.
-
Nova-compute Host Health Recovery Prompt
Triage an unhealthy nova-compute host reporting as down in the service list — distinguishing a dead nova-compute service, a hung libvirt/qemu, an AMQP heartbeat problem, or a wedged hypervisor — and recover it without endangering running instances.
More OpenStack prompts & error guides
Browse every OpenStack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.