[L3 HA] Stacktrace during HA router creation when running rally test

Bug #1528201 reported by Eugene Nikanorov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
MOS Neutron
neutron
Fix Released
High
Kevin Benton
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Rally test create_and_list_routers fails in some cases.

Failure is caused by L3_HA_NAT_db_mixin._set_vr_id/_allocate_vr_id trying to reuse db session after it has been rolled back by DBDuplicateError exception.

summary: - Stacktrace during HA router creation when running rally test
+ [L3 HA] Stacktrace during HA router creation when running rally test
tags: added: l3-ha
Changed in mos:
assignee: nobody → MOS Neutron (mos-neutron)
milestone: none → 8.0
tags: added: scale
Changed in mos:
status: New → Confirmed
Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
status: New → Confirmed
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/261227

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/261227
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=18e2117e3df3c119f843aed669d0c6bae9243053
Submitter: Jenkins
Branch: master

commit 18e2117e3df3c119f843aed669d0c6bae9243053
Author: Kevin Benton <email address hidden>
Date: Thu Dec 24 00:54:06 2015 -0800

    Call _allocate_vr_id outside of transaction

    _allocate_vr_id is called from _set_vr_id, which was starting a
    transaction before calling it. This caused an error when the retry
    logic was triggered inside of _allocate_vr_id since it would
    encounter a DB exception and put the transaction into a bad state
    that couldn't be used on the retry.

    This patch just stops _set_vr_id from starting a transaction because
    it didn't serve a purpose. It also stops _allocate_vr_id from allowing
    subtransactions when it starts a transaction, since it's retry logic
    isn't compatible with them.

    Co-Authored-By: Ann Kamyshnikova <email address hidden>
    Closes-Bug: #1528201
    Change-Id: If7bcae39098f40f5ee9db78d3190bf9fdaf6438b

Changed in neutron:
status: In Progress → Fix Released
Assaf Muller (amuller)
tags: added: liberty-backport-potential
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/266357

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/266358

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/266357
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=99d1c0d94b82784ed29c60450fe0fb382e6ae310
Submitter: Jenkins
Branch: stable/liberty

commit 99d1c0d94b82784ed29c60450fe0fb382e6ae310
Author: Kevin Benton <email address hidden>
Date: Thu Dec 24 00:54:06 2015 -0800

    Call _allocate_vr_id outside of transaction

    _allocate_vr_id is called from _set_vr_id, which was starting a
    transaction before calling it. This caused an error when the retry
    logic was triggered inside of _allocate_vr_id since it would
    encounter a DB exception and put the transaction into a bad state
    that couldn't be used on the retry.

    This patch just stops _set_vr_id from starting a transaction because
    it didn't serve a purpose. It also stops _allocate_vr_id from allowing
    subtransactions when it starts a transaction, since it's retry logic
    isn't compatible with them.

    Co-Authored-By: Ann Kamyshnikova <email address hidden>
    Closes-Bug: #1528201
    Change-Id: If7bcae39098f40f5ee9db78d3190bf9fdaf6438b
    (cherry picked from commit 18e2117e3df3c119f843aed669d0c6bae9243053)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/266358
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=608b54137fb67512c07099089ea7e074176e12df
Submitter: Jenkins
Branch: stable/kilo

commit 608b54137fb67512c07099089ea7e074176e12df
Author: Kevin Benton <email address hidden>
Date: Thu Dec 24 00:54:06 2015 -0800

    Call _allocate_vr_id outside of transaction

    _allocate_vr_id is called from _set_vr_id, which was starting a
    transaction before calling it. This caused an error when the retry
    logic was triggered inside of _allocate_vr_id since it would
    encounter a DB exception and put the transaction into a bad state
    that couldn't be used on the retry.

    This patch just stops _set_vr_id from starting a transaction because
    it didn't serve a purpose. It also stops _allocate_vr_id from allowing
    subtransactions when it starts a transaction, since it's retry logic
    isn't compatible with them.

    Co-Authored-By: Ann Kamyshnikova <email address hidden>
    Closes-Bug: #1528201
    Change-Id: If7bcae39098f40f5ee9db78d3190bf9fdaf6438b
    (cherry picked from commit 18e2117e3df3c119f843aed669d0c6bae9243053)

tags: added: in-stable-kilo
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b2

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.2

This issue was fixed in the openstack/neutron 7.0.2 release.

Changed in mos:
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/neutron (openstack-ci/fuel-8.0/liberty)

Fix proposed to branch: openstack-ci/fuel-8.0/liberty
Change author: Oleg Bondarev <email address hidden>
Review: https://review.fuel-infra.org/16602

tags: added: hit-hcf
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/neutron (openstack-ci/fuel-8.0/liberty)
Download full text (3.2 KiB)

Reviewed: https://review.fuel-infra.org/16602
Submitter: Pkgs Jenkins <email address hidden>
Branch: openstack-ci/fuel-8.0/liberty

Commit: f82049048bb2eb959000f531ad8bd91dd2c3ed24
Author: Oleg Bondarev <email address hidden>
Date: Tue Feb 2 07:55:16 2016

Merge the tip of origin/stable/liberty into origin/openstack-ci/fuel-8.0/liberty

Note: commit ed7ad25 Revert "Revert "Revert "Remove TEMPEST_CONFIG_DIR in the api tox env"""
sets min tox version to 2.3.1 while we currently use 1.9.2.
This patch sets it back to 1.9.2 in order for tests to pass.
Will be reverted back to 2.3.1 once https://bugs.launchpad.net/fuel/+bug/1540516
is fixed.

8476f6f Add relationship between port and floating ip
0bd401c DVR: optimize check_ports_exist_on_l3_agent()
9246cff Change check_ports_exist_on_l3agent to pass the subnet_ids
a133de3 Keep reading stdout/stderr until after kill
ed7ad25 Revert "Revert "Revert "Remove TEMPEST_CONFIG_DIR in the api tox env"""
05f8099 Ensure that tunnels are fully reset on ovs restart
b908c55 Update HA router state if agent is not active
aebd27f Resync L3, DHCP and OVS/LB agents upon revival
8e685c8 Fix floatingip status for an HA router
80c9e84 DVR:Fix _notify_l3_agent_new_port for proper arp update
c12bf81 Fix L3 HA with IPv6
2298566 Make object creation methods in l3_hamode_db atomic
0cc889f Cache the ARP entries in L3 Agent for DVR
8bde9c4 Cleanup veth-pairs in default netns for functional tests
2b96f42 Do not prohibit VXLAN over IPv6
1ab1e58 Fix get_subnet_for_dvr() to return correct gateway mac
3b42dee Imported Translations from Zanata
ca193d0 Revert "Change function call order in ovs_neutron_agent."
96d4ab3 Remove check on dhcp enabled subnets while scheduling dvr
f5299d3 Check gateway ip when update subnet
0d5d7c7 Add tests that constrain db query count
8fb3f9d Don't call add_ha_port inside a transaction
a370fa3 Log INFO message when setting admin state up flag to False for OVS port
bf92dbb DVR: notify specific agent when deleting floating ip
99d1c0d Call _allocate_vr_id outside of transaction
2468b3d Move notifications before DB retry decorator
1b609d2 DVR: handle dvr serviceable port's host change
ad75ccc Imported Translations from Zanata
2e6e135 Run functional gate jobs in a constrained environment
6902c87 DVR: notify specific agent when creating floating ip
00b800d Tox: Remove fullstack env, keep only dsvm-fullstack
d11e9cb Force L3 agent to resync router it could not configure
42f4332 Support migrating of legacy routers to HA and back
4d85fa1 Updated from global requirements
f175cd7 ML2: Add tests to validate quota usage tracking
79d4a08 test_migrations: Avoid returning a filter object for python3
745b546 Do not autoreschedule routers if l3 agent is back online
430892a Avoid full_sync in l3_agent for router updates
fa9fba2 In port_dead, handle case when port already deleted
1d8aff3 Add compatibility with iproute2 >= 4.0

Conflicts:
 neutron/db/l3_dvr_db.py
 neutron/db/l3_hamode_db.py
 neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py
 neutron/tests/unit/agent/l3/test_agent.py

Closes-Bug: #1496341
Closes-Bug: #1531244
Closes-Bug: #1527581
Closes-Bug: #1528201
Closes-Bug: #1528207
Closes...

Read more...

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Fix merged ^

Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Ivan Lozgachev (ilozgachev) wrote :

Verified on ENV-10 Build 482 and ENV-14 Build 496

Changed in mos:
status: Fix Committed → Fix Released
tags: removed: kilo-backport-potential liberty-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.