enable_connection_uri fails with constraint violation due to duplicate manager

Bug #1682202 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Medium
Unassigned

Bug Description

When multiple agents interact with the same local ovsdb (which is a reasonable use case, f.e. when there is both ovs and dhcp agents), then we get the following error in one of agent logs:

2017-03-16 16:06:22.790 14431 ERROR neutron.agent.ovsdb.impl_vsctl [req-1d2c2121-ef13-45a6-81ec-9cfeda8221a7 - - - - -] Unable to execute ['ovs-vsctl', '--timeout=10', '--oneline', '--format=json', '--', '--id=@manager', 'create', 'Manager', 'target="ptcp:6640:127.0.0.1"', '--', 'add', 'Open_vSwitch', '.', 'manager_options', '@manager']. Exception: Exit code: 1; Stdin: ; Stdout: ; Stderr: ovs-vsctl: transaction error: {"details":"Transaction causes multiple rows in \"Manager\" table to have identical values (\"ptcp:6640:127.0.0.1\") for index on column \"target\". First row, with UUID 60a3bbc6-2904-4e1f-8f92-387a315e1142, existed in the database before this transaction and was not modified by the transaction. Second row, with UUID c7bc4f11-5fbc-42e1-b8ec-44324439cace, was inserted by this transaction.","error":"constraint violation"}

Apparently, two agents clash on manager creation. They should atomically append instead.

An example of failure at:

http://logs.openstack.org/98/446598/1/check/gate-neutron-dsvm-fullstack-ubuntu-xenial/2e0f93e/logs/dsvm-fullstack-logs/TestOvsConnectivitySameNetworkOnOvsBridgeControllerStop.test_controller_timeout_does_not_break_connectivity_sigkill_GRE-and-l2pop,openflow-native_ovsdb-cli_/neutron-openvswitch-agent--2017-03-16--16-06-05-730632.txt.gz?#_2017-03-16_16_06_22_790

It's not clear whether it results in any user visible problem.

Tags: ovs
Changed in neutron:
importance: Undecided → High
importance: High → Medium
status: New → Confirmed
tags: added: ovs
Revision history for this message
Trevor McCasland (twm2016) wrote :

I believe this has already been reported here https://bugs.launchpad.net/neutron/+bug/1681945

Revision history for this message
Baojun Jia (nail.jia) wrote :

Hi,Have you solved this bug?

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.