Disable and enable ceilometer in OpenStack

  • Stop telemetry on the overcloud controllers.

systemctl stop openstack-aodh-evaluator openstack-aodh-listener openstack-aodh-notifier openstack-ceilometer-central openstack-ceilometer-collector openstack-ceilometer-notification openstack-gnocchi-metricd openstack-gnocchi-statsd

  • Next stop the mongod service.

systemctl stop mongod

  • You should now backup MongoDB files.

tar Jcf /tmp/mongodb-backup-$HOSTNAME-$(date +%F_%H%M%S).tar.xz /var/lib/mongodb

  • Delete the content of /var/lib/mongodb folder as follows:

rm -r /var/lib/mongodb/*

  • Run mongodb on all controllers.

systemctl start mongod

  • Create MongoDB master on controller 0

mongo --host MONGOHOST --eval 'rs.initiate()'

  • Find the listener IP address of MongoDB and controllers 1 and 2.

ss -tlnp|grep mongo

  • Add IP addresses in mongo replication.

mongo --host MONGOHOST --eval 'rs.add("controler1_mongodb_IP:PORT"); rs.add("controler2_mongodb_IP:PORT"); '

  • Now monitor status as follows:

mongo --host MONGOHOST --eval 'db.isMaster()' # which node is the master. Should be only contorller0
mongo --host MONGOHOST --eval 'rs.conf()' # confirm all hosts are in the cluster
mongo --host MONGOHOST --eval 'rs.status()' # replication status check

  • Create ceilometer database in mongodb.

mongo --host MONGOHOST --eval 'db.getSiblingDB("ceilometer").addUser({user: "ceilometer", pwd: "MONGOPASSWORD", roles: [ "readWrite", "dbAdmin" ]})'

  • Start telemetry.

systemctl start openstack-aodh-evaluator openstack-aodh-listener openstack-aodh-notifier openstack-ceilometer-central openstack-ceilometer-collector openstack-ceilometer-notification openstack-gnocchi-metricd openstack-gnocchi-statsd

Leave a Reply

Your email address will not be published. Required fields are marked *