network/subnet resources cannot be read and written separated

Bug #1840638 reported by zhanghao on 2019-08-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

openstack environment: 1 controller 1 compute(install mariadb)
connection = mysql+pymysql://neutron:***@controller/neutron
slave_connection = mysql+pymysql://neutron: ***@compute/neutron

create network(name=net10)、subnet(name=subnet10)、port(name=port01) in controller node.

sync controller node database to compute node.

update、、 in compute node database.

neutron port-show PORT_ID name:test_port01
neutron net-show NET_ID name:net10
neutron subnet-show SUBNET_ID name:subnet10

When slave_connection is configured in neutron.conf, executing the 'neutron port-show' command will read the port information from the slave database nodes, but the network/subnet will not be able to read the information from the slave database nodes.

Fix proposed to branch: master

Changed in neutron:
assignee: nobody → zhanghao (zhanghao2)
status: New → In Progress

The Bug description is not detailed enough, or may be I am not understanding it completely.
What do you mean slave_connection in neutron.conf.
How to reproduce this issue?

Changed in neutron:
importance: Undecided → Medium
zhanghao (zhanghao2) wrote :

I add the bug description and how to reproduce it.

description: updated

Hello Zhanghao:

You are talking about having problems to connect to the slave DB connection, but the reproduction method does not use an slave DB, actually is the same as the primary one.


zhanghao (zhanghao2) wrote :

Hi Rodolfo:
you are right,The reason is that writer context should be replaced with reader context when showing network or subnet detail, if we want to use slave DB.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers