CentOS7 desktop openstack queens devstack neutron 远程调试

  • 引用

neutron通过pycharm调试
Pycharm 下远程调试 Neutron 简介

  • 远程代码同步
CentOS7 desktop openstack queens devstack neutron 远程调试_第1张图片

CentOS7 desktop openstack queens devstack neutron 远程调试_第2张图片

CentOS7 desktop openstack queens devstack neutron 远程调试_第3张图片

CentOS7 desktop openstack queens devstack neutron 远程调试_第4张图片

CentOS7 desktop openstack queens devstack neutron 远程调试_第5张图片

CentOS7 desktop openstack queens devstack neutron 远程调试_第6张图片
  • 远程调试
CentOS7 desktop openstack queens devstack neutron 远程调试_第7张图片
image.png
  • 禁止猴子补丁

neutron.common.eventlet_utils.monkey_patch方法改成以下

def monkey_patch():
   return
  • devstack上安装pydevd

pip install pydevd

  • 启动调试,并打断点

CentOS7 desktop openstack queens devstack neutron 远程调试_第8张图片

neutron.plugins.ml2.plugin.Ml2Plugin#get_network方法第一行增加以下

import pydevd
pydevd.settrace('192.168.0.249', port=12345, stdoutToServer=True, stderrToServer=True)
  • 重启服务,并进入调试

vi admin-openrc

export OS_USERNAME=admin
export OS_PASSWORD=123456
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://192.168.122.131/identity
export OS_IDENTITY_API_VERSION=3

chmod +x admin-openrc
systemctl restart devstack@q*.service
. admin-openrc
neutron net-show public

CentOS7 desktop openstack queens devstack neutron 远程调试_第9张图片

你可能感兴趣的:(CentOS7 desktop openstack queens devstack neutron 远程调试)