yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65185
[Bug 1699500] [NEW] network fetched from DB has deleted subnets in it during db-retry of subnet_create
Public bug reported:
Only seen in Newton
Possibly related bug: https://bugs.launchpad.net/neutron/+bug/1596075
When a retriable database error occurs in a mechanism driver's
subnet_create_postcommit, you get the error saying subnet overlaps with
another subnet.
What's happening is:
1) mech driver's DB error is caught. Subnet that is created previously gets deleted in ml2plugin.
2) retry wrapper retries the create_subnet method
3) in db_base_plugin_v2#_create_subnet(self, context, subnet, subnetpool_id) method the network is fetched:
network = self._get_network(context, s["network_id"])
4) This network contains the subnet that was deleted in step 1.
It is related to the backref present in Newton:
https://github.com/openstack/neutron/blob/stable/newton/neutron/db/models_v2.py#L245
which is not present in Ocata onwards. And more specifically, the
lazy='subquery' is causing it'. Leaving the lazy parameter out avoids
this issue as well.
As it currently is, the DB-retry can't work when DB errors happen in
postcommit.
** Affects: neutron
Importance: Undecided
Status: New
** Tags: newton
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1699500
Title:
network fetched from DB has deleted subnets in it during db-retry of
subnet_create
Status in neutron:
New
Bug description:
Only seen in Newton
Possibly related bug: https://bugs.launchpad.net/neutron/+bug/1596075
When a retriable database error occurs in a mechanism driver's
subnet_create_postcommit, you get the error saying subnet overlaps
with another subnet.
What's happening is:
1) mech driver's DB error is caught. Subnet that is created previously gets deleted in ml2plugin.
2) retry wrapper retries the create_subnet method
3) in db_base_plugin_v2#_create_subnet(self, context, subnet, subnetpool_id) method the network is fetched:
network = self._get_network(context, s["network_id"])
4) This network contains the subnet that was deleted in step 1.
It is related to the backref present in Newton:
https://github.com/openstack/neutron/blob/stable/newton/neutron/db/models_v2.py#L245
which is not present in Ocata onwards. And more specifically, the
lazy='subquery' is causing it'. Leaving the lazy parameter out avoids
this issue as well.
As it currently is, the DB-retry can't work when DB errors happen in
postcommit.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1699500/+subscriptions