Eclipse Debugging for Neutron

Asked by NarsingRao

Hi,

I have installed openstack gizzily 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?

Thanks,
Narsing

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Salvatore Orlando
Solved:
Last query:
Last reply:
Revision history for this message
Best Salvatore Orlando (salvatore-orlando) said :
#1

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.

Salvatore

On 31 July 2013 08:46, NarsingRao <email address hidden>wrote:

> New question #233302 on neutron:
> https://answers.launchpad.net/neutron/+question/233302
>
> Hi,
>
> I have installed openstack gizzily 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?
>
> Thanks,
> Narsing
>
> --
> You received this question notification because you are a member of
> Netstack Core Developers, which is an answer contact for neutron.
>

Revision history for this message
NarsingRao (gurrapu-narsing) said :
#2

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

Revision history for this message
NarsingRao (gurrapu-narsing) said :
#3

Thanks Salvatore Orlando, that solved my question.