In this post I’ll show you how to debug devstack (neutron) with pycharm.
-
Install Pycharm .
-
Create a new project : openstack
-
Add a new remote host : Tools -> Deployment -> Configuration
NOTE : add /data and /logs to excluded paths
-
Sync remote with local and download all files from remote VM to your local . In Remote host panel -> download from here.
-
Configure remote interpreter : Settings (
Ctrl+Alt+S
) -> Project Interpreter -> add remote
-
Enable
Gevent compatible debugging
: Settings (Ctrl+Alt+S
) -> Python debugger -> check Gevent compatible debugging - Start
./stack.sh
on devstack VM- go to screen mode , `screen -x
- go to neutron screen
q-svc
. - kill service
Ctrl+A
K
.
- Create a new debug configuration on pycharm : Run -> EditConfiguration -> Python . Set following values
- Script : \usr\local\bin\neutron-server (you can check the exact location from
/opt/stack/logs/stack.sh.log
file). - Script Parameters : –config-file /etc/neutron/neutron.conf –config-file /etc/neutron/plugins/ml2/ml2_conf.ini
- Python interpreter: remote interpreter created in above step.
- Script : \usr\local\bin\neutron-server (you can check the exact location from
We can debug using remote debugger as well . I’ll check it out and update the post
###Happy Debugging .