Tag Archives: Ini parser

Troubleshooting OpenStack the cool way: ini_comparer.py

If OpenStack is already complex enough, troubleshooting OpenStack issues can be a nightmare! If you agree, you might be interested on the ini_comparer script.

The source of most of the issues with OpenStack is usually on the configuration files, which have the “ini” format. This format is not particularly easy to handle by old school “sed” people like me and in addition, the standard configuration files are meant to be self-documented, which means tons of lines of comments and commented options.

Putting this together, we get huge configuration files, with very similar lines and it is a pain in the lower back to check word by word, character by character every single keyword in the file.

So, provided that we have another configuration file that works fine, we can use the ini_comparer python script to do that for us. It can work with a combination of local or remote files. For example, a file on the local machine and another one in a remote one, both files are in the local machine, or both are in remote machines. Continue reading

Parsing OpenStack config files with susti

In this post I introduce my¬†“susti” python script for easily parsing options in the “.ini” config files of OpenStack in an easy and elegant way.

Since I started working with OpenStack about one year ago, I found that the configuration files of all components have that terrible Windows-like syntax called “ini”, which I personally strongly dislike.

“ini” files contain “sections” which contain keywords, but those keywords may be repeated in several sections, providing completely independent functions. For example, if you grep the keyword “admin_password” in a nova.conf file you will get at least 3 matches, in the sections “keystone_authtoken”, “neutron” and “ironic”.

Continue reading