On Tue, Jul 01, 2014 at 01:14:16PM +0100, Joni Lee wrote: > We seem to face a concurrent issue between 2 processes: "add-br" and "find > Interface" as follows > > 1. A "l3 agent" process added a port q-router to a bridge (br-int) by calling > "ovs-vsctl?add-port"?and the command returned successfully: > > Jun 30 07:30:13 neutron1 ovs-vsctl: 00001|vsctl|INFO|Called as > /usr/bin/ovs-vsctl -- --may-exist add-port br-int qr-3cc2ad9c-a3 -- set > Interface qr-3cc2ad9c-a3 type=internal -- set Interface qr-3cc2ad9c-a3 > external-ids:iface-id=3cc2ad9c-a3a5-4bd0-b5d9-bbb12ea8a4b0 -- set Interface > qr-3cc2ad9c-a3 external-ids:iface-status=active -- set Interface > qr-3cc2ad9c-a3 external-ids:attached-mac=fa:16:3e:47:24:0c > > 2. On the other hand, after 2 secs, another "ovs agent" process finds the > interface, but ofport is empty: > > $ ovs-vsctl -- --columns=external_ids,name,ofport find Interface > external_ids:iface-id=3cc2ad9c-a3a5-4bd0-b5d9-bbb12ea8a4b0 > external_ids ? ? ? ?: {attached-mac="fa:16:3e:47:24:0c", > iface-id="3cc2ad9c-a3a5-4bd0-b5d9-bbb12ea8a4b0", iface-status=active} > name ? ? ? ? ? ? ? ? ?: "qr-3cc2ad9c-a3" > ofport ? ? ? ? ? ? ? ? :?[] ? ?<<<<<< empty set > > ofport?the empty set?means that the interface hasn't been created yet,?even > the command "add-br" returned successfully??? > > 3. After some more seconds,?We checked and see that "ofport" is available. > > Any ideas which causes the latency of "add-br" and how to improve it?
ovs-vsctl, without the --no-wait option, should only exit after the reconfiguration is complete, so the behavior that you report under point 2 is unexpected. I would start by looking in the ovs-vswitchd log to see if it's reporting some problem that quickly resolves. If not, then I would look in the ovsdb log (with "ovsdb-tool -mm show-log") to check out the sequence of database transactions. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss