Browse code

Fix multi-host deployments using RabbitMQ

Currently the rabbit password and rabbit_host are no longer
written into nova.conf. This is due to this change:
https://review.openstack.org/#/c/6501/

My solution is to write the values if:
- they are set
- and you are not using the alternative queue system

Change-Id: I8de7b57125d1fdf50044fc2b3ae4683ac15d5a61

John Garbutt authored on 2012/05/24 23:56:06
Showing 1 changed files
... ...
@@ -1672,11 +1672,11 @@ add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS"
1672 1672
 add_nova_opt "api_paste_config=$NOVA_CONF_DIR/api-paste.ini"
1673 1673
 add_nova_opt "image_service=nova.image.glance.GlanceImageService"
1674 1674
 add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST"
1675
-if is_service_enabled rabbit ; then
1675
+if is_service_enabled qpid ; then
1676
+    add_nova_opt "rpc_backend=nova.rpc.impl_qpid"
1677
+elif [ -n "$RABBIT_HOST" ] &&  [ -n "$RABBIT_PASSWORD" ]; then
1676 1678
     add_nova_opt "rabbit_host=$RABBIT_HOST"
1677 1679
     add_nova_opt "rabbit_password=$RABBIT_PASSWORD"
1678
-elif is_service_enabled qpid ; then
1679
-    add_nova_opt "rpc_backend=nova.rpc.impl_qpid"
1680 1680
 fi
1681 1681
 add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT"
1682 1682
 add_nova_opt "force_dhcp_release=True"