Salman,
I haven't used UI tools like Pydev and/or eclipse. I have a devstack
installation running on linux box where I use ssh for all my development.
TL;DR Version : I use pdb (aka Python Debugger) It is very easy to use if you
have used gdb - (Refer to
http://docs.python.org/library/pdb.html#debugger-commands if you are unfamiliar
with pdb)
Longer Version:
* To trace how the "allocate_for_instance" works for Quantum - put
"pdb.set_trace()" in method "def allocate_for_instance" in file
nova/network/quantum/manager.py
You also need "import pdb" somewhere at the top in the same file.
* Stop and restart nova-network process from "screen" (So that modified
nova/network/quantum/manager.py is used.)
* Try to create an instance (which eventually needs to allocate fixed
IP for the instance) Now go to "nova-network" console - as soon as RPC call is
made to the method "allocate_for_instance" , execution will stop and you are
presented with (pdb) interactive prompt - From here on you can debug using pdb
commands
-Mandar
From: openstack-bounces+mandar.vaze=nttdata....@lists.launchpad.net
[mailto:openstack-bounces+mandar.vaze=nttdata....@lists.launchpad.net] On
Behalf Of Salman Malik
Sent: Monday, June 11, 2012 10:49 PM
To: openstack@lists.launchpad.net
Subject: [Openstack] Development/Debugging
Hi All,
I have been trying to get my head around the OpenStack functionality for a
while now but unfortunately haven't been able to grasp it. I am interested on
working on Quantum (and may be creating new plugins) but I am still unable to
debug my own problems. So I thought it would be best for me to learn from how
code works. Although I have been looking at the code for quite some time but
didn't get anywhere. Now I have installed Pydev on Eclipse and am wondering how
to run the massive OpenStack code in debug mode (so as to learn the
call/control flow) ? So I thought I could get some help from OpenStack gurus
like how do you people develop/debug problems ? What environment are you using
? Any suggestions/tips are welcome.
(Please note that I have read the nova and Quantum administration guides and
also looked at the nova developer's guide)
Any help would be much appreciated.
Thanks,
Salman
______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for
the sole use of the addressee and may contain legally privileged, confidential,
and proprietary data. If you are not the intended recipient, please advise the
sender by replying promptly to this email and then delete and destroy this
email and any attachments without any further use, copying or forwarding
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp