Reputation: 13095
I launched a fresh new Ubuntu EC2 instance (with a single EBS volume in it which is also the root volume of the EC2).
In the ubuntu machine, I installed nothing but rabbitmq in it. After installing rabbitmq, it had only guest
user in it. Then i created 3 new users. So now my fresh new ubuntu instance with RabbitMQ in it has 4 users: alice
, bob
, carl
, guest
.
I created a AMI of this instance. Then i relaunched a new instance from this AMI. In this newly relaunched instance, i am expecting to see all 4 RabbitMQ users as they were created before creating the AMI. But to my surprise, i am finding only the default guest
user in it.
Upvotes: 0
Views: 385
Reputation: 21
This answer is fairly late but perhaps help someone out there.
The configuration for RabbitMQ is based on nodename and is stored in the following directory:
/var/lib/rabbitmq/mnesia
When you snapshot an image and then re-provision, it switches its hostname therefore essentially re-creating the configuration and throwing all your users away.
The workaround for this is to set a static nodename using ENV configuration as per the RabbitMQ documentation.
/etc/rabbitmq/rabbitmq-env.conf
With contents such as the follows:
NODENAME=rabbit@localhost
Upvotes: 1