Browse code

Fix ceilometer configuration

Correct the use of NOVA_CONF to find the source file
for the ceilometer configuration files.

Set up notifications and RPC to use the classes from
ceilometer.openstack.common instead of nova.openstack.common.

Run the ceilometer compute agent under "sg libvirtd"
so it has permission to talk to libvirt.

Change-Id: I75b2e563d654f4f89b182e146e54572618f25261
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>

Doug Hellmann authored on 2012/10/03 06:29:23
Showing 1 changed files
... ...
@@ -58,8 +58,11 @@ function configure_ceilometer() {
58 58
     sudo chown $USER $CEILOMETER_API_LOG_DIR
59 59
 
60 60
     # ceilometer confs are copy of /etc/nova/nova.conf which must exist first
61
-    grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_AGENT_CONF
62
-    grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_COLLECTOR_CONF
61
+    grep -v format_string $NOVA_CONF > $CEILOMETER_AGENT_CONF
62
+    iniset $CEILOMETER_AGENT_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
63
+
64
+    grep -v format_string $NOVA_CONF > $CEILOMETER_COLLECTOR_CONF
65
+    iniset $CEILOMETER_COLLECTOR_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu'
63 66
     iniset $CEILOMETER_COLLECTOR_CONF DEFAULT notification_topics 'notifications,glance_notifications'
64 67
 }
65 68
 
... ...
@@ -70,7 +73,7 @@ function install_ceilometer() {
70 70
 
71 71
 # start_ceilometer() - Start running processes, including screen
72 72
 function start_ceilometer() {
73
-    screen_it ceilometer-acompute "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF"
73
+    screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF\""
74 74
     screen_it ceilometer-acentral "export OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD OS_TENANT_NAME=$OS_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL && cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_AGENT_CONF"
75 75
     screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_COLLECTOR_CONF"
76 76
     screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR"