Skip to content

Instantly share code, notes, and snippets.

@terriyu
Created August 12, 2013 05:17
Show Gist options
  • Select an option

  • Save terriyu/6208394 to your computer and use it in GitHub Desktop.

Select an option

Save terriyu/6208394 to your computer and use it in GitHub Desktop.
Journal for OpenStack Ceilometer work -- 6 Aug 2013

6 Aug 2013

Logging in OpenStack

Discussion with vkmc

I asked vkmc about logging in OpenStack since she wrote a nice post about it: http://vmartinezdelacruz.com/logging-and-debugging-in-openstack/

It's a good question... logs are often used when things go wrong

For instance, I worked on Horizon, and it was useful to me to check the Horizon screen logs when I got HTTP or Django errors

Usually the error you get in the browser lacks of details needed for you to locate where the problem is

So, complementing it with the screen log (which is simply the output you get when you run the component from the console), you can get an idea of what is happening and try to fix it

It's also useful to check the interaction between components

For example, I launch an instance in Horizon, and I can see how Horizon makes a call to Nova and it creates the new instance

If something goes wrong in that chain, you can obtain the precise information from the logs

The Ceilometer logs are saved in /var/log/ceilometer-api/. In that directory, there is a file /var/log/ceilometer-api/ceilomter-api.log. It appears to contain configuration details about the Ceilometer server started at a certain time. The last line tells you where the Ceilometer server is located on the network.

Here's an example: https://gist.github.com/terriyu/6208350

In this case, the Ceilometer server is

serving on 0.0.0.0:8777, view at http://127.0.0.1:8777

vkmc noted that Horizon used Mox for testing and now they are moving to use Mock (which is similar to Mox and easier/more intuitive according to vkmc). I noted that Ceilometer and Nova use testr.

jpich later told me that the reason to move to testr is that it takes too much time to run the tests right now (especially for Nova). testr allows you to run tests in parallel, which will save a lot of time.

jd's comments

jd dropped in on the discussion and told me to check /etc/ceilometer/ceilometer.conf for configuration options including logging

He said he doesn't use logging much, only when he's running the application in a real deployment. Most of the time, he runs unit tests for which logging isn't useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment