How to remote debug neutron
First of all, I will assume that you know how to use pydevd to remote debug normal python program. If you do not know that, you can read the corresponding docs on Pycharm official website.
If you know very well how to remote debug normal python programs and you are trying to remote debug neutron, you can continue.
To remote debug neutron, only three additional things need to be done:
1. Change the worker numbers of neutron api server.
You need to edit /etc/neutron/neutron.conf to set api_worker = -1. Because by default, neutron will start multi-workers.
2. Config your IDE (my case it is PyCharm).
In Pycharm you need to set
File->Build, Extension, Debugger->Python Debuger->Gevent Compatible
3. In neutron code, You need to edit neutron/common/eventlet_utils.py
On the server, the absolute path will be the neutron install location. Like /usr/lib/python2.7/site-packages/neutron/common/eventlet_utils.py
Change the
eventlet.monkey_patch
to
eventlet.monkey_patch(os=False, thread=False)
The reason to do this is very well explained in the code comment
import os
import eventlet
def monkey_patch():
if os.name == 'nt':
# eventlet monkey patching the os and thread modules causes
# subprocess.Popen to fail on Windows when using pipes due
# to missing non-blocking IO support.
#
# bug report on eventlet:
# https://bitbucket.org/eventlet/eventlet/issue/132/
# eventletmonkey_patch-breaks
eventlet.monkey_patch(os=False, thread=False)
else:
eventlet.monkey_patch(os=False, thread=False)
OK now. You can remote debug as you did.
How to remote debug neutron的更多相关文章
- iOS web remote debug 正确的姿势
在使用iOS Remote debug需要做以下准备 1. iOS devices 开启java script and web inspector 开启方式如下: 2. mac OS 自带的Safar ...
- Java:Remote Debug
Java Remote Debug -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,add ...
- [Reomting Debug] 巧用VS 的remote debug 功能远程调试程序 经验分享.
前言: 有时候我们Dev(开发人员)需要debug tester(测试人员)或者customer(客户)的环境,可tester的机器上没有Code,是不是有点着急? 而且是多版本应用且tester 发 ...
- paip. java resin 远程 调试 java resin remote debug
paip. java resin 远程 调试 java resin remote debug 作者Attilax 艾龙, EMAIL:1466519819@qq.com 来源:attilax的专栏 ...
- How to use VS2012 remote debug Windows Azure Cloud Services
Background: Windows Azure Cloud Services 可以在本地调试,使用Visual Studio 2012 + 模拟器 Emulator.但是模拟器的工作状态和环境和真 ...
- VS 开发工具中的Remote Debug 功能远程调试程序经验分享
前言: 有时候我们Dev(开发人员)需要debug tester(测试人员)或者customer(客户)的环境,可tester的机器上没有Code,是不是有点着急? 而且是多版本应用且tester 发 ...
- Tomcat Remote Debug操作和原理
操作篇 这部分主要讲,如何开启tomcat远程调试,并佐以实例.本文方式适用于windows和linux. 假设有两台机器,A是tomcat服务器所在机器,B是IDE安装机器.A和B可以是同一台机器, ...
- vscode local attach 和 remote debug
VSCode是MS推出的一款免费的开源并跨平台的轻量级代码编辑器,内置Git和Debug等常用功能,强大的插件扩展功能以及简单的配置几乎可以打造成任意编程语言的IDE.本文简单聊一下其本地attach ...
- QT Creator 环境使用 remote debug 调试 arm 程序
这里使用的 4.8.5 QTE 环境,之前尝试过远程使用 GDB 来调试板子上的 QT 程序,但是没成功.没有调试手段比较痛苦,今天又花了点时间,居然搞定了.粗做记录. 工具版本: 1. QtCrea ...
随机推荐
- springmvc 的配置 annotation-config/annotation-drive/ component-scan 区别
1. <context:annotation-config /> 作用隐式的配置注解的加载类,默认的加载了AutowiredAnnotationBeanPostProcessor(auto ...
- Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser]
严重: Exception sending context initialized event to listener instance of class org.springframework.we ...
- iOS-UI控件之UITableView(三)- 自定义不等高的cell
Storyboard_不等高 对比自定义等高cell,需要几个额外的步骤(iOS8开始才支持) 添加子控件和contentView之间的间距约束 设置tableViewCell的真实行高和估算行高 / ...
- VUE 入坑系列 一 事件
html代码 <div id="app"> <button v-on:click="counter += 1">加1</butto ...
- Android Studio 打包APK时,出现3个或多个APK
Android Studio 打包APK时,原来只会出现一个apk,结果现在出现3个apk,仔细检查了一下项目文件发现: Android Studio 的 buid.gradle文件里有个配置项被更改 ...
- Maven之——使用本地jar包并打包进war包里面的方法
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/52594602 很显然,这种方法是很不可取的,因为Maven是用来团队合作,以及发布 ...
- Android(java)学习笔记201:JNI之helloword案例(利用NDK工具)
1. 逻辑思路过程图: 2.下面通过一个HelloWorld案例来说明一下JNI利用NDK开发过程(步骤) 分析:我们在Win7系统下编译的C语言代码,我们知道C语言依赖操作系统,不能跨平台,所以我们 ...
- Relational Algebra 关系代数
Relational Algebra Relational Algebra is the mathematical basis for the query language SQL Introduct ...
- pavenet资源
网络结构:http://www.cnblogs.com/fariver/p/7449563.html 源码:https://github.com/sanghoon/pva-faster-rcnn 训练 ...
- 无法完成安装:'Cannot access storage file '/
今天自己编译了spice-protocol spice-gtk spice qemu,然后想用virsh去创建一个虚机: # virsh define demo.xml 定义域 demo(从 ...