You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ This plugin provides a production-ready solution for migrating mirrored classic
77
77
### Prerequisites (BEFORE Migration)
78
78
79
79
1.**Cluster Health**: All cluster nodes must be running
80
-
2.**Plugin Enabled**: `rabbitmq_queue_migration` and `rabbitmq_shovel`plugins loaded
80
+
2.**Plugins Enabled**: `rabbitmq_queue_migration` and `rabbitmq_shovel`must be loaded; the `rabbitmq_queue_migration` plugin must additionally have completed its async initialization on every running node (validation chain step `plugin_ready_on_all_nodes`)
81
81
3.**Queue Eligibility**: Only mirrored classic queues with HA policies
82
82
4.**Khepri Disabled**: Classic Mnesia required (Khepri not compatible)
83
83
5.**AWS Configuration**: For EBS snapshots, AWS credentials and region must be configured
@@ -233,10 +233,10 @@ GET /api/queue-migration/status/:id # Specific migration details
233
233
234
234
### Progress Tracking
235
235
236
-
-**Update Frequency**: Configurable via `progress_update_frequency` (default: 10)
237
-
-**Calculation**: Messages processed ÷ 4 for progress count
238
-
-**Real-time Updates**: Database updated during message migration
-**Update Frequency**: Configurable via `progress_update_frequency` (default: 10 messages between status writes)
237
+
-**Verification on completion**: After the shovel reports completion, `rqm:verify_and_update_progress/5` reads the source and destination message counts and writes the actual delivered count via `rqm_db:update_queue_status_progress/3`
238
+
-**Real-time Updates**: Database updated as queues complete each phase
**Note:** The setting `quorum_queue.property_equivalence.relaxed_checks_on_redeclaration = true` must be enabled **before** migration (validated during pre-migration checks). This allows applications to redeclare queues with classic arguments after migration without errors.
242
242
@@ -288,11 +288,13 @@ GET /api/queue-migration/status/:id # Specific migration details
-`check_disk_space/1` - Disk space estimation and validation based on worker pool concurrency
384
+
-`check_disk_space/2` - Disk space estimation and validation (signature: `(VHost, UnsuitableQueues)`); required free = total queue data x peak multiplier + min disk space buffer
379
385
-`check_active_alarms/0` - Check for active RabbitMQ alarms
380
386
-`check_memory_usage/0` - Validate memory usage is within limits
381
387
-`check_snapshot_not_in_progress/0` - Verify no concurrent EBS snapshots (delegates to `rqm_snapshot`)
388
+
-`check_plugin_ready_on_all_nodes/0` - Verify the queue migration plugin is `ready` on every running cluster node
382
389
-`check_cluster_partitions/0` - Verify no cluster partitions and all nodes up
383
390
-`check_system_migration_readiness/1` - Overall system readiness
384
391
@@ -393,9 +400,6 @@ GET /api/queue-migration/status/:id # Specific migration details
393
400
-`format_migration_readiness_response/1` - Format readiness check response
394
401
-`format_system_checks_for_ui/1` - Format system checks for web UI
395
402
-`format_queue_checks_for_ui/1` - Format queue checks for web UI
-`check_disk_space/1` - Disk space estimation and validation
398
-
-`check_system_migration_readiness/1` - Overall system readiness
399
403
400
404
## Configuration Parameters
401
405
@@ -674,7 +678,7 @@ Performance varies significantly based on:
674
678
### AWS Configuration Requirements
675
679
-**Credentials**: AWS credentials via environment variables, config files, or EC2 instance roles
676
680
-**Region**: AWS region configuration (defaults to us-east-1, should match peer discovery)
677
-
-**Permissions**: EC2 permissions for `CreateSnapshot`, `DescribeVolumes`, `DescribeSnapshots`, and `DescribeInstances`
681
+
-**Permissions**: EC2 permissions for `ec2:DescribeVolumes`, `ec2:CreateSnapshot`, `ec2:DescribeSnapshots`, and `ec2:DeleteSnapshot`. The plugin does not call `ec2:CreateTags` or `ec2:DescribeInstances`.
678
682
-**Volume Setup**: RabbitMQ data directory must be on EBS volume at configured device path
679
683
680
684
### Snapshot Timing
@@ -693,7 +697,7 @@ Performance varies significantly based on:
693
697
694
698
### Skip Unsuitable Queues Feature
695
699
-**Skip Mode**: `skip_unsuitable_queues` parameter allows migration to proceed by skipping problematic queues
-**Skip Reasons**: Tracks why queues were skipped. Validation produces five reasons via `#unsuitable_queue{reason = ...}` (`unsynchronized`, `too_many_queues`, `unsuitable_overflow`, `queue_expires`, `message_ttl`); a sixth `interrupted` status is recorded for queues from a previously interrupted migration
697
701
-**Integration Tests**: SkipUnsuitableTest validates feature works correctly
--description "Test snapshot for RabbitMQ queue migration"
237
233
```
238
234
239
235
If successful, you'll receive a snapshot ID. Clean up the test snapshot:
@@ -307,9 +303,10 @@ The `rabbitmq_queue_migration` plugin performs the following operations during m
307
303
308
304
1.**Query Volumes**: Calls `ec2:DescribeVolumes` to find EBS volumes attached to the instance
309
305
2.**Create Snapshots**: Calls `ec2:CreateSnapshot` to create crash-consistent snapshots before migration
310
-
3.**Tag Snapshots**: Calls `ec2:CreateTags` to label snapshots with migration metadata
311
-
4.**Monitor Progress**: Calls `ec2:DescribeSnapshots` to check snapshot completion status
312
-
5.**Cleanup Snapshots**: Calls `ec2:DeleteSnapshot` to remove snapshots after successful migration (when `cleanup_snapshots_on_success` is enabled)
306
+
3.**Monitor Progress**: Calls `ec2:DescribeSnapshots` to check snapshot completion status
307
+
4.**Cleanup Snapshots**: Calls `ec2:DeleteSnapshot` to remove snapshots after successful migration (when `cleanup_snapshots_on_success` is enabled)
308
+
309
+
Snapshots are created with a `Description` of the form `RabbitMQ migration snapshot <timestamp> on <node>`, but the plugin does not attach EC2 tags to them (`ec2:CreateTags` is not required).
313
310
314
311
The plugin uses the AWS SDK's default credential provider chain, which automatically:
315
312
- Queries the EC2 instance metadata service at `http://169.254.169.254/latest/meta-data/iam/security-credentials/`
0 commit comments