RabbitMQ Feature Flags Upgrade Enablement Plan Prompt
Plan the safe enablement of RabbitMQ feature flags before and after a version upgrade, so all cluster nodes agree on the schema, required flags are on before you upgrade past their version, and no node is left on an incompatible state.
- Target user
- Platform and SRE engineers upgrading RabbitMQ clusters
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior RabbitMQ engineer who has run rolling cluster upgrades across major versions and manages feature flags as a first-class part of the plan. Help me sequence feature-flag enablement around my upgrade so no node ends up incompatible or unable to rejoin. I will provide: - Current and target versions: RabbitMQ and Erlang/OTP versions, and whether this crosses one or more major versions [DESCRIBE] - Current flag state: output of `rabbitmqctl list_feature_flags name state stability` [PASTE OUTPUT] - Cluster shape: node count, queue types in use (classic/quorum/streams), and deployment method (packages, Docker, Kubernetes Operator) [DESCRIBE] - Constraints: maintenance window length, whether publishers can tolerate brief per-node unavailability, and rollback expectations [DESCRIBE] Your job: 1. **Explain the model** — that feature flags gate schema/behavior changes so mixed-version clusters stay compatible during rolling upgrades; that a flag has a stability (`stable`/`experimental`) and a state (`enabled`/`disabled`/`unavailable`); and critically that enabling a flag is a one-way migration with no supported disable. 2. **Read my current state** — from the `list_feature_flags` output, identify which stable flags are still `disabled`, which are `unavailable` (meaning some node is too old to support them), and flag anything experimental that should be left alone. 3. **Establish the pre-upgrade gate** — the rule that every `stable` flag must be enabled on the current, fully-clustered version *before* upgrading, because the target version may make some flags mandatory and a node upgraded past that point can't rejoin a cluster where the flag is still off. Give the exact ordering: verify cluster health, back up definitions, enable stable flags, confirm, then upgrade. 4. **Sequence the enablement** — the `rabbitmq-diagnostics check_if_cluster_has_disconnected_nodes` / health checks to run first, `enable_feature_flag <name>` (or `enable_all` where appropriate) one flag at a time with verification between, and how to confirm each reached `enabled` on all nodes. 5. **Handle the upgrade window** — why you don't enable flags mid-rolling-upgrade, how `unavailable` flags become available once every node is on the new version, and the post-upgrade step to enable any newly-available stable flags once the cluster is fully upgraded. 6. **Plan rollback realistically** — since flags can't be disabled, rollback means restoring nodes/data from backup, not toggling flags back; make the irreversibility explicit so the maintenance plan accounts for it. Output as: (a) the current flag state interpreted (what's disabled/unavailable and why it matters), (b) the exact pre-upgrade enablement sequence with commands and verification, (c) the upgrade + post-upgrade flag steps, and (d) the rollback reality and what backup you need first. Call out any flag whose enablement rewrites on-disk data. Treat every `enable_feature_flag` as irreversible and back-up-gated. Never suggest enabling experimental flags in production for an upgrade, and never suggest enabling flags during the rolling upgrade itself instead of before it.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Why this prompt works
Feature flags are the part of a RabbitMQ upgrade that quietly breaks clusters, because the failure mode is delayed: everything looks fine until an upgraded node tries to rejoin a cluster where a now-mandatory flag was never enabled, and it simply can’t. This prompt makes the non-obvious rule the centerpiece — enable every stable flag on the fully-clustered old version first, then upgrade — instead of leaving it as a footnote discovered after a node is stuck.
It reads the actual list_feature_flags output rather than reasoning in the abstract, which matters because the three states carry different risk: disabled stable flags are the ones you must turn on before upgrading, unavailable flags tell you a node is too old to support them, and experimental flags are a trap to leave alone in production. Interpreting the real state turns a generic checklist into a plan specific to the cluster in front of you.
Most importantly, it refuses to pretend the operation is reversible. Enabling a flag is a one-way migration that can rewrite on-disk schema, so the prompt gates every enablement on a verified backup and reframes “rollback” as restore-from-backup, not toggle-the-flag-off. Combined with the ordering discipline and per-flag verification, it produces an upgrade runbook that accounts for the irreversibility up front rather than discovering it during the incident.
Related prompts
-
RabbitMQ Blue-Green Cluster Migration Plan Prompt
Plan a blue-green migration to a brand-new RabbitMQ cluster using Shovel to drain in-flight messages, cut clients over vhost-by-vhost, and keep a clean rollback path.
-
RabbitMQ Classic Queue v2 (CQv2) Storage Migration Design Prompt
Plan a safe migration of classic queues to the CQv2 message store to cut memory use and improve consistency, validating version support, feature flags, and per-queue conversion.
-
RabbitMQ Client Connection & Channel Pooling Design Prompt
Design correct client-side connection and channel pooling for RabbitMQ so an app reuses long-lived connections, isolates publishing from consuming, and never leaks channels under load.
-
RabbitMQ Delayed Message Exchange Scheduling Design Prompt
Design scheduled/delayed delivery in RabbitMQ using the delayed-message-exchange plugin, comparing it to TTL+DLX, and sizing it so pending delays don't overwhelm the broker.
More RabbitMQ prompts & error guides
Browse every RabbitMQ 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.