Add locks for methods which sets nat rules in router
Router_info class and port_forwarding L3 extensions are using same
instance of the iptables manager class and it could happend that
method which sets address scope rules and method which sets
port forwarding nat rules where run in almost same time and
one of them was adding rules which wasn't expected to be added.
Because of that port forwarding rules wasn't configured properly.
This patch fixed that by adding lock for methods which are changing
rules in iptables_manager's nat table in both router_info and
port_forwarding extension.
Reviewed: https:/ /review. opendev. org/756107 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=2325ad19504 12d3eef0cde848c 56bb94fbbb7495
Committed: https:/
Submitter: Zuul
Branch: master
commit 2325ad1950412d3 eef0cde848c56bb 94fbbb7495
Author: Slawek Kaplonski <email address hidden>
Date: Mon Oct 5 17:07:43 2020 +0200
Add locks for methods which sets nat rules in router
Router_info class and port_forwarding L3 extensions are using same
instance of the iptables manager class and it could happend that
method which sets address scope rules and method which sets
port forwarding nat rules where run in almost same time and
one of them was adding rules which wasn't expected to be added.
Because of that port forwarding rules wasn't configured properly.
This patch fixed that by adding lock for methods which are changing
rules in iptables_manager's nat table in both router_info and
port_forwarding extension.
Change-Id: Ic1d5f893a81b7b 841745da82f38b7 583e47e468d
Closes-Bug: #1896735