diff --git a/hooks/rabbitmq-relations b/hooks/rabbitmq-relations index 4ab53e86..504930a3 100755 --- a/hooks/rabbitmq-relations +++ b/hooks/rabbitmq-relations @@ -51,6 +51,10 @@ function install_hook() { } function amqp_changed() { + # Connecting clients should request a username. + # In reponse, we generate a password for new users, + # grant the user access on the default vhost "/", + # and tell it where to reach us. RABBIT_USER=`relation-get username` [[ -z $RABBIT_USER ]] && exit 0 PASSWD_FILE="/var/run/ensemble/$RABBIT_USER.passwd"