← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1682202] [NEW] enable_connection_uri fails with constraint violation due to duplicate manager

 

Public bug reported:

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.

** Affects: neutron
     Importance: Medium
         Status: Confirmed


** Tags: ovs

** Changed in: neutron
   Importance: Undecided => High

** Changed in: neutron
   Importance: High => Medium

** Changed in: neutron
       Status: New => Confirmed

** Tags added: ovs

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1682202

Title:
  enable_connection_uri fails with constraint violation due to duplicate
  manager

Status in neutron:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1682202/+subscriptions