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 ...
随机推荐
- 掌握Spark机器学习库-07-线性回归算法概述
1)简介 自变量,因变量,线性关系,相关系数,一元线性关系,多元线性关系(平面,超平面) 2)使用线性回归算法的前提 3)应用例子 沸点与气压 浮力与表面积
- linux下安装mysql5.7.21
下载 wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz 解压 ...
- iOS-UI控件之UITableView(二)- 自定义不等高的cell
不等高的cell 给模型增加frame数据 所有子控件的frame cell的高度 @interface XMGStatus : NSObject /**** 文字\图片数据 ****/ // ... ...
- [转]c++应用程序文件的编译过程
原文地址 这里讲下C++文件的编译过程及其中模板的编译过程: 一:一般的C++应用程序的编译过程. 一般说来,C++应用程序的编译过程分为三个阶段.模板也是一样的. 在cpp文件中展开inclu ...
- 集成新版(5.17+)Activiti Modeler与Rest服务
声明: 此教程适合Activiti 5.17+版本. 本博客所涉及的内容均可在kft-activiti-demo中找到. 在线demo可以访问 http://demo.kafeitu.me:8080/ ...
- 启动myeclipse弹窗Please allow Subclipse team to receive anonymous usage statistics for this Eclipse intance
Please allow Subclipse team to receive anonymous usage statistics for this Eclipse intance(翻译:请允许Sub ...
- 怎样从SpringMVC返回json数据
Srping3中配置 maven依赖pom.xml 需要jackson库的依赖 <dependency> <groupId>org.codehaus.jackson</g ...
- docker centos7 配置和宿主机同网段IP
docker centos7 配置和宿主机同网段IP 1.安装brctl 命令 # yum -y install bridge-utils 2.编辑网卡配置文件 # vi ifcfg-eno16777 ...
- 操作iframe的方法
子页面 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&q ...
- openwrt 配置samba && ubuntu 配置samba
前言:在修改opkg update的下载目录,公司里不能连外网,尝试用samba. 配置samba很简单,修改/etc/config/samba文件,拷贝一下share项,再改一下name就可以了. ...