From 53a5f42e780535e05c24c75801e122b72339201c Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 2 Oct 2012 17:29:23 -0400 Subject: [PATCH] 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 --- lib/ceilometer | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ceilometer b/lib/ceilometer index bea68ed08d..10ceb4571e 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -58,8 +58,11 @@ function configure_ceilometer() { sudo chown $USER $CEILOMETER_API_LOG_DIR # ceilometer confs are copy of /etc/nova/nova.conf which must exist first - grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_AGENT_CONF - grep -v format_string $NOVA_CONF_DIR/$NOVA_CONF > $CEILOMETER_COLLECTOR_CONF + grep -v format_string $NOVA_CONF > $CEILOMETER_AGENT_CONF + iniset $CEILOMETER_AGENT_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu' + + grep -v format_string $NOVA_CONF > $CEILOMETER_COLLECTOR_CONF + iniset $CEILOMETER_COLLECTOR_CONF DEFAULT rpc_backend 'ceilometer.openstack.common.rpc.impl_kombu' iniset $CEILOMETER_COLLECTOR_CONF DEFAULT notification_topics 'notifications,glance_notifications' } @@ -70,7 +73,7 @@ function install_ceilometer() { # start_ceilometer() - Start running processes, including screen function start_ceilometer() { - screen_it ceilometer-acompute "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF" + screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_AGENT_CONF\"" 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" screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_COLLECTOR_CONF" screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR"