Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with Pycharm

2014-06-14 Thread Collins, Sean
I think we need to pick either one or the other. We currently have two places 
where debugging is documented, the OpenStack wiki and in the Neutron tree

http://git.openstack.org/cgit/openstack/neutron/tree/TESTING.rst#n143

Sean M. Collins

From: Gal Sagie [gsa...@vmware.com]
Sent: Wednesday, June 11, 2014 8:36 AM
To: ges...@cisco.com
Cc: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with Pycharm

Thanks a lot, this works, i will update the wiki.

Gal.

From: Henry Gessau ges...@cisco.com
To: openstack-dev@lists.openstack.org
Sent: Wednesday, June 11, 2014 2:41:47 PM
Subject: Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with
Pycharm

Gal Sagie wrote:
I am trying to debug devstack Neutron with Pycharm, i have found here 
(https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29)
That i need to change the neutron server code to this=eventlet.monkey_patch() 
To: eventlet.monkey_patch(os=False, thread=False)
I don't need to do this. But I do need to go into the PyCharm settings under 
Python Debugger and enable Gevent compatible debugging.

I have done so, debug seems to run, but when i am trying to initiate commands 
from the CLI i get this:

gal@ubuntu:~/devstack$ neutron net-list
Connection to neutron failed: Maximum attempts reached

Are you sure you have sourced openrc correctly for the credentials?

(the server seems to run ok...)

Any help is appreciated as i am trying to learn and understand main flows by 
debugging the code locally.

First I start devstack in offline mode.
OFFLINE=True ./stack.sh

Once it is running I go to the neutron window in screen.
There I stop neutron-server with ctrl-C, and press up-arrow to view the start 
command.

To run neutron-server in the PyCharm debugger edit the Run/Debug configuration 
with the following settings:

Script: /usr/local/bin/neutron-server
Script params: --config-file /etc/neutron/neutron.conf --config-file 
/etc/neutron/plugins/ml2/ml2_conf.ini
# I got this from the screen window where I stopped neutron
Working directory: /opt/stack/neutron

Now restart neutron from PyCharm instead of screen.


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with Pycharm

2014-06-11 Thread Gal Sagie
No one that is using PyCharm/Eclipse and able to debug the code? :( 

- Original Message -

From: Gal Sagie gsa...@vmware.com 
To: openstack-dev@lists.openstack.org 
Sent: Monday, June 9, 2014 1:59:05 PM 
Subject: [openstack-dev][Neutron] Debugging Devstack Neutron with Pycharm 

Hello all, 

I am trying to debug devstack Neutron with Pycharm, i have found here ( 
https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29
 ) 
That i need to change the neutron server code to this= eventlet.monkey_patch() 
To: eventlet.monkey_patch(os=False, thread=False) 

I have done so, debug seems to run, but when i am trying to initiate commands 
from the CLI i get this: 


gal@ubuntu:~/devstack$ neutron net-list 
Connection to neutron failed: Maximum attempts reached 

(the server seems to run ok...) 

Any help is appreciated as i am trying to learn and understand main flows by 
debugging the code locally. 

Thanks 

Gal. 


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Neutron] Debugging Devstack Neutron with Pycharm

2014-06-11 Thread Henry Gessau
Gal Sagie wrote:
 I am trying to debug devstack Neutron with Pycharm, i have found here
 (https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29)

 That i need to change the neutron server code to
 this=*eventlet.monkey_patch()* To: *eventlet.monkey_patch(os=False,
 thread=False)*
I don't need to do this. But I do need to go into the PyCharm settings under
Python Debugger and enable Gevent compatible debugging.

 I have done so, debug seems to run, but when i am trying to initiate
 commands from the CLI i get this:

 gal@ubuntu:~/devstack$ neutron net-list
 Connection to neutron failed: Maximum attempts reached

Are you sure you have sourced openrc correctly for the credentials?

 (the server seems to run ok...)

 Any help is appreciated as i am trying to learn and understand main flows by
 debugging the code locally.


First I start devstack in offline mode.
OFFLINE=True ./stack.sh

Once it is running I go to the neutron window in screen.
There I stop neutron-server with ctrl-C, and press up-arrow to view the start
command.

To run neutron-server in the PyCharm debugger edit the Run/Debug configuration
with the following settings:

Script: /usr/local/bin/neutron-server
Script params: --config-file /etc/neutron/neutron.conf --config-file
/etc/neutron/plugins/ml2/ml2_conf.ini
# I got this from the screen window where I stopped neutron
Working directory: /opt/stack/neutron

Now restart neutron from PyCharm instead of screen.

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Neutron] Debugging Devstack Neutron with Pycharm

2014-06-09 Thread Gal Sagie
Hello all, 

I am trying to debug devstack Neutron with Pycharm, i have found here ( 
https://wiki.openstack.org/wiki/NeutronDevelopment#How_to_debug_Neutron_.28and_other_OpenStack_projects_probably_.29
 ) 
That i need to change the neutron server code to this= eventlet.monkey_patch() 
To: eventlet.monkey_patch(os=False, thread=False) 

I have done so, debug seems to run, but when i am trying to initiate commands 
from the CLI i get this: 


gal@ubuntu:~/devstack$ neutron net-list 
Connection to neutron failed: Maximum attempts reached 

(the server seems to run ok...) 

Any help is appreciated as i am trying to learn and understand main flows by 
debugging the code locally. 

Thanks 

Gal. 

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev