Browse code

Default RABBIT_HOST to be the SERVICE_HOST.

Using localhost for RABBIT_HOST can cause problems - particularly
on systems where IPv6 is partially broken and localhost resolves
to an IPv6 address.

The service should logically be running on SERVICE_HOST unless
otherwise overridden.

Change-Id: I6efb71b8b95174770066f38403d5d428ec88c3b6

Bob Ball authored on 2014/04/02 00:28:36
Showing 1 changed files
... ...
@@ -425,7 +425,7 @@ initialize_database_backends && echo "Using $DATABASE_TYPE database backend" ||
425 425
 
426 426
 # Rabbit connection info
427 427
 if is_service_enabled rabbit; then
428
-    RABBIT_HOST=${RABBIT_HOST:-localhost}
428
+    RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
429 429
     read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
430 430
 fi
431 431