Ask Your Question
1

How to debug Neutron using Eclipse

asked 2013-07-31 06:44:57 -0500

gurrapu-narsing gravatar image

updated 2014-12-02 09:51:10 -0500

smaffulli gravatar image

I have installed openstack grizzly version using devstack script successfully (Installed Path is /opt/stack/). Also, I have made eclipse IDE dev environment with quantum as pydev project at /root/openstack/GIT/neutron dir

Using pydev debugger I have kept a breakpoint the file /root/openstack/GIT/neutron/bin/quantum-server

import eventlet
eventlet.monkey_patch(os=False, thread=False)


import os
import sys
sys.path.insert(0, os.getcwd())  <<<<<<<<<<<<<< Break point here
from quantum.server import main as server

server()

I have started debugging, it hit the break point in the file /root/openstack/GIT/neutron/bin/quantum-server and when I am doing step by step execution, I have observed that it started referring files from the path /opt/stack/neutron directory which is not in the project work space. Can anyone please let me know what I am missing here?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-07-31 07:50:58 -0500

salvatore-orlando gravatar image

updated 2014-12-02 09:49:51 -0500

smaffulli gravatar image

I am not sure about your peculiar setup, but I think that when devstack configures openstack services it runs setup.py develop. Then when the neutron-server binary imports any package from neutron, the modules are loaded from /opt/stack/neutron

I think you might even point your eclipse workspace to /opt/stack - being careful to not add .project and .pydevproject to your git commits.

edit flag offensive delete link more

Comments

Thanks Salvatore I have now made eclipse to point to /opt/stack directory the problem is solved

gurrapu-narsing gravatar imagegurrapu-narsing ( 2013-07-31 10:04:28 -0500 )edit

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

2 followers

Stats

Asked: 2013-07-31 06:44:57 -0500

Seen: 264 times

Last updated: Dec 02 '14