yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65570
[Bug 1702048] [NEW] neutron update network with no-qos-policy, but it not take effort at ovs-agent
Public bug reported:
My test environment is ocata. When I detached a network with qos-policy,
I found that the qos ratelimit rule still exist at ovs. I have analysed
the code of update_network in ml2 and found that neutron-server would
notify ovs-agent when need_network_update_notify is true. The value of
need_network_update_notify depends on the attribute of qos_policy_id in
updated_network variable. The attribute value in "updated_network" is
based on the qos_policy_binding of network model.
The update_network function would call "process_update_network" function
to detach relationship between qos-policy and network, then call
"get_network" to create a new dict of network info. But I found the
"qos_policy_binding" still exist in network model. That means the detach
operation didn't execute completely before the creation of
"updated_network".
I know the bug is difficult to recur, but it is real.....
How can I resolve it ?
Here is the code:
neutron/plugins/ml2/plugin.py
def update_network(self, context, id, network):
net_data = network[attributes.NETWORK]
provider._raise_if_updates_provider_attributes(net_data)
session = context.session
with session.begin(subtransactions=True):
original_network = super(Ml2Plugin, self).get_network(context, id)
updated_network = super(Ml2Plugin,self).update_network(context,id,
network)
# detach relationship between qos-policy and network
self.extension_manager.process_update_network(context, net_data,
updated_network)
self._process_l3_update(context, updated_network, net_data)
self.type_manager.extend_network_dict_provider(context,
updated_network)
# get_network will check qos_policy_binding in network model
updated_network = self.get_network(context, id)
need_network_update_notify = (
qos_consts.QOS_POLICY_ID in net_data and
original_network[qos_consts.QOS_POLICY_ID] !=
updated_network[qos_consts.QOS_POLICY_ID])
** Affects: neutron
Importance: Undecided
Status: New
** Description changed:
My test environment is ocata. When I detached a network with qos-policy,
I found that the qos ratelimit rule still exist at ovs. I have analysed
the code of update_network in ml2 and found that neutron-server would
notify ovs-agent when need_network_update_notify is true. The value of
need_network_update_notify depends on the attribute of qos_policy_id in
updated_network variable. The attribute value in "updated_network" is
based on the qos_policy_binding of network model.
The update_network function would call "process_update_network" function
to detach relationship between qos-policy and network, then call
"get_network" to create a new dict of network info. But I found the
"qos_policy_binding" still exist in network model. That means the detach
operation didn't execute completely before the creation of
"updated_network".
I know the bug is difficult to recur, but it is real.....
How can I resolve it ?
Here is the code:
- # neutron/plugins/ml2/plugin.py
- def update_network(self, context, id, network):
- net_data = network[attributes.NETWORK]
- provider._raise_if_updates_provider_attributes(net_data)
-
- session = context.session
- with session.begin(subtransactions=True):
- original_network = super(Ml2Plugin, self).get_network(context, id)
- updated_network = super(Ml2Plugin, self).update_network(context,
- id,
- network)
- # detach relationship between qos-policy and network
- self.extension_manager.process_update_network(context, net_data,
- updated_network)
- self._process_l3_update(context, updated_network, net_data)
- self.type_manager.extend_network_dict_provider(context,
- updated_network)
- # get_network will check qos_policy_binding in network model
- updated_network = self.get_network(context, id)
-
- need_network_update_notify = (
- qos_consts.QOS_POLICY_ID in net_data and
- original_network[qos_consts.QOS_POLICY_ID] !=
- updated_network[qos_consts.QOS_POLICY_ID])
+ neutron/plugins/ml2/plugin.py
+ def update_network(self, context, id, network):
+ net_data = network[attributes.NETWORK]
+ provider._raise_if_updates_provider_attributes(net_data)
+ session = context.session
+ with session.begin(subtransactions=True):
+ original_network = super(Ml2Plugin, self).get_network(context, id)
+ updated_network = super(Ml2Plugin,self).update_network(context,id,
+ network)
+ # detach relationship between qos-policy and network
+ self.extension_manager.process_update_network(context, net_data,
+ updated_network)
+ self._process_l3_update(context, updated_network, net_data)
+ self.type_manager.extend_network_dict_provider(context,
+ updated_network)
+ # get_network will check qos_policy_binding in network model
+ updated_network = self.get_network(context, id)
+ need_network_update_notify = (
+ qos_consts.QOS_POLICY_ID in net_data and
+ original_network[qos_consts.QOS_POLICY_ID] !=
+ updated_network[qos_consts.QOS_POLICY_ID])
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1702048
Title:
neutron update network with no-qos-policy, but it not take effort at
ovs-agent
Status in neutron:
New
Bug description:
My test environment is ocata. When I detached a network with qos-
policy, I found that the qos ratelimit rule still exist at ovs. I have
analysed the code of update_network in ml2 and found that neutron-
server would notify ovs-agent when need_network_update_notify is true.
The value of need_network_update_notify depends on the attribute of
qos_policy_id in updated_network variable. The attribute value in
"updated_network" is based on the qos_policy_binding of network
model.
The update_network function would call "process_update_network"
function to detach relationship between qos-policy and network, then
call "get_network" to create a new dict of network info. But I found
the "qos_policy_binding" still exist in network model. That means the
detach operation didn't execute completely before the creation of
"updated_network".
I know the bug is difficult to recur, but it is real.....
How can I resolve it ?
Here is the code:
neutron/plugins/ml2/plugin.py
def update_network(self, context, id, network):
net_data = network[attributes.NETWORK]
provider._raise_if_updates_provider_attributes(net_data)
session = context.session
with session.begin(subtransactions=True):
original_network = super(Ml2Plugin, self).get_network(context, id)
updated_network = super(Ml2Plugin,self).update_network(context,id,
network)
# detach relationship between qos-policy and network
self.extension_manager.process_update_network(context, net_data,
updated_network)
self._process_l3_update(context, updated_network, net_data)
self.type_manager.extend_network_dict_provider(context,
updated_network)
# get_network will check qos_policy_binding in network model
updated_network = self.get_network(context, id)
need_network_update_notify = (
qos_consts.QOS_POLICY_ID in net_data and
original_network[qos_consts.QOS_POLICY_ID] !=
updated_network[qos_consts.QOS_POLICY_ID])
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1702048/+subscriptions
Follow ups