Ask Your Question
0

How to study Cinder code?

asked 2013-05-29 11:10:17 -0500

shrirangphadke gravatar image

Hi,

I am a newbie to Python and Openstack. I want to study the Cinder code by adding some print statements and DEBUG messages. For that I git cloned the Cinder code, modified it with print statements and build the Cinder code as follows: 1. python setup.py build 2. python setup.py install

The above commands build and install Cinder components. But after that I cannot run Cinder due to some failed dependency or configuration problems.

I followed following online documents in order to build the cinder: http://rconradharris.com/2013/01/14/getting-cinder-up-and-running.html (http://rconradharris.com/2013/01/14/g...)

Also I followed the followed Cinder Developer guide with no luck: http://docs.openstack.org/developer/cinder/devref/index.html (http://docs.openstack.org/developer/c...)

Please provide a online resource or any help which will help me in building and deploying modified Cinder code and enable me to debug the code in someway.

Regards, Shrirang

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-09-28 09:36:09 -0500

Hi Shrirang,

  1. You can try out as Jay said to debug the flow of cinder by importing pdb module of python.
  2. And also after pdb is attached you can also use traceback module which prints the stack trace(all the previous call till the point where pdb is attached)

    import traceback traceback.print_stack()

Thanks, Pratt

edit flag offensive delete link more
0

answered 2013-06-08 13:04:59 -0500

jay-lau-513 gravatar image

1) Install openstack with devstack 2) Once installed finished and cinder was running, if you want to debug, just kill the related cinder process and add pdb.set_trace() to related code, start up the service manually, the process will stop at your break point, you can debug cinder using this way very easily.

Thanks, Jay

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-05-29 11:10:17 -0500

Seen: 383 times

Last updated: Sep 28 '13