Zokahn -Personal Blog-

28Nov/130

A bit about OpenStack processes

OpenStack can be overwhelming, it's big and complex. It might be hard to find the source of a problem, in this article i want to share some ways to get extra information about the processes and their settings. OpenStack software is developed in Python. Once a process starts it will show up in the process list. It starts to log information based on their configured logfile/dir location and verbosity. But what if the process fails to start? No messages, no hints on what went wrong.

Lets take the look at a typical OpenStack process. In this example we look at Glance but almost all OpenStack components follow the same principles. In a typical setup Glance will show up a few times in the process list. Running "ps -ef | grep glance" on a controller node will uncover the processes. We are interested in the 'CMD' field, the last part of the process line:

/usr/bin/python /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf --verbose

This line gives a lot of information, in whole it gives you the complete command that the 'openstack-glance-api' init script uses to start the API process. This command invokes two config files, first glance-api-dist.conf then glance-api.conf. It also puts the process in verbose logging mode.

The config file part is good information, the glance-api-dist.conf holds the default and (most) mandatory configuration items and their values. Take a look at this file. These settings will apply if you set nothing in the glance-api.conf file. Anything set in the glance-api.conf file will override these settings, simply because the file is loaded after the dist file.

Let's say you are having problems getting a process started... You have run "service openstack-glance-api start" and nothing happens. The OS reports [OK] but glance-api is not listed in the process list. Checking the logging in /var/log/glance shows nothing. No new log entries... What would you do? You start the process by hand! Just paste this to the command line:

/usr/bin/python /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf --verbose

This will result in the following output:

2013-11-28 10:01:07.306 2147 WARNING glance.store.base [-] Failed to configure store correctly: Store s3 could not be configured correctly. Reason: Could not find s3_store_host in configuration options. Disabling add method.
2013-11-28 10:01:07.315 2147 ERROR glance.store.swift [-] Could not find swift_store_auth_address in configuration options.
2013-11-28 10:01:07.315 2147 WARNING glance.store.base [-] Failed to configure store correctly: Store swift could not be configured correctly. Reason: Could not find swift_store_auth_address in configuration options. Disabling add method.

If there is anything preventing the Glance API to start, it will be listed in your output. This method also shows the exceptions that are not handled by the log facility developed by the OpenStack team. As said before this works for Glance but it will also work with most other OpenStack services.

Happy OpenStacking!

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.