Failed to install ceilometer on Ubuntu, when mongodb is not running

Bug #1182809 reported by YangLei
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Low
Unassigned

Bug Description

mongo ceilometer --eval "db.dropDatabase();"
MongoDB shell version: 2.0.4
connecting to: ceilometer
Wed May 22 16:56:17 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
exception: connect failed

------
devstack/lib/ceilometer

function configure_ceilometer() {
    setup_develop $CEILOMETER_DIR

    [ ! -d $CEILOMETER_CONF_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
    sudo chown $USER $CEILOMETER_CONF_DIR

    [ ! -d $CEILOMETER_API_LOG_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
    sudo chown $USER $CEILOMETER_API_LOG_DIR

    iniset_rpc_backend ceilometer $CEILOMETER_CONF DEFAULT

    iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications'
    iniset $CEILOMETER_CONF DEFAULT verbose True

    # Install the policy file for the API server
    cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR
    cp $CEILOMETER_DIR/etc/ceilometer/pipeline.yaml $CEILOMETER_CONF_DIR
    iniset $CEILOMETER_CONF DEFAULT policy_file $CEILOMETER_CONF_DIR/policy.json

    # the compute and central agents need these credentials in order to
    # call out to the public nova and glance APIs
    iniset $CEILOMETER_CONF DEFAULT os_username ceilometer
    iniset $CEILOMETER_CONF DEFAULT os_password $SERVICE_PASSWORD
    iniset $CEILOMETER_CONF DEFAULT os_tenant_name $SERVICE_TENANT_NAME
    iniset $CEILOMETER_CONF DEFAULT os_auth_url $OS_AUTH_URL

    iniset $CEILOMETER_CONF keystone_authtoken auth_protocol http
    iniset $CEILOMETER_CONF keystone_authtoken admin_user ceilometer
    iniset $CEILOMETER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
    iniset $CEILOMETER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
    iniset $CEILOMETER_CONF keystone_authtoken signing_dir $CEILOMETER_AUTH_CACHE_DIR

    configure_mongodb

    cleanup_ceilometer
}

# cleanup_ceilometer() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_ceilometer() {
    mongo ceilometer --eval "db.dropDatabase();"
}

Revision history for this message
YangLei (yanglyy) wrote :

Can devstack do some check for the mongo service, before devstack install/config the ceilometer?

Dean Troyer (dtroyer)
Changed in devstack:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Dean Troyer (dtroyer) wrote :

https://review.openstack.org/43851 completed the change to mysql as the default backend

Changed in devstack:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.