[ovs-git] Open vSwitch: ovsdb-server: Announce bound listening ports as status:bound_port. (master)

dev at openvswitch.org dev at openvswitch.org
Thu Apr 18 23:46:42 UTC 2013

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  798e1352d09bc48d1eecb6ecf1b2c21d9b1ba2a5 (commit)
       via  1e04fcc879ea09bb8c7512cda6de91f7725627f6 (commit)
       via  df451457ad9a02bcd9793126b66be445f4d5a8a7 (commit)
       via  977529e4ac7b5a5e99cc6d080347f84eb5291720 (commit)
      from  c3b3602740e8748a535b9f75ba946ba24e74131e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 798e1352d09bc48d1eecb6ecf1b2c21d9b1ba2a5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=798e1352d09bc48d1eecb6ecf1b2c21d9b1ba2a5
Author: Ben Pfaff <blp at nicira.com>
ovsdb-server: Announce bound listening ports as status:bound_port.
The administrator can request that OVSDB bind any available TCP port, but
in that case there is no easy way to find out what port it has bound.  This
commit adds that information as the "bound_port" key in the "status"

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 1e04fcc879ea09bb8c7512cda6de91f7725627f6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1e04fcc879ea09bb8c7512cda6de91f7725627f6
Author: Ben Pfaff <blp at nicira.com>
tests: Avoid race conditions, by letting the kernel choose ports to bind.
An occasionally occurring problem with "make check", especially when
parallel tests are enabled, is that multiple tests try to bind the same
TCP port and, of course, fail.  This happens because the code to select
a TCP port to bind just generates random numbers until it finds a port that
is not currently in use and uses the first one, which is of course prone
to races.

This commit changes the tests to let the kernel directly choose an
available port, which should avoid this type of failure.

Also, some of the tests that generated a random free TCP port actually
used the port number to bind a UDP socket, which of course doesn't work
well.  This commit fixes that problem too as a side effect.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit df451457ad9a02bcd9793126b66be445f4d5a8a7
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=df451457ad9a02bcd9793126b66be445f4d5a8a7
Author: Ben Pfaff <blp at nicira.com>
socket-util: Log kernel-chosen bound ports in inet_open_passive().
Usually, for passive sockets, one wishes to bind a particular well-known
port, so that clients can easily connect.  But automated tests cannot
necessarily bind a well-known port, because that would cause multiple
concurrent tests to interfere with each other or with a real instance of
the service running on the system.  They could bind to a randomly selected
port chosen by the user (the Open vSwitch automated tests currently do this)
but this leads to occasional "false negative" test failures when the port
selected happens to be in use.

The best alternative for automated tests is to let the kernel choose a
port that is not otherwise in use, which can be accomplished by specifying
port 0.  But in that case there is no easy way for other software to know
what port the kernel chose.  This commit fixes that problem one way by
logging the bound port when it is chosen by the kernel.

Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 977529e4ac7b5a5e99cc6d080347f84eb5291720
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=977529e4ac7b5a5e99cc6d080347f84eb5291720
Author: Ben Pfaff <blp at nicira.com>
tests: Make test-netflow, test-sflow accept all logging options.
An upcoming patch will start using the --log-file option with these test
programs, so they need to support it.

Signed-off-by: Ben Pfaff <blp at nicira.com>


Summary of changes:
 lib/socket-util.c       |   16 ++++++++++++----
 lib/stream-provider.h   |    4 +++-
 lib/stream-ssl.c        |    3 ++-
 lib/stream-tcp.c        |   11 ++++++++---
 lib/stream.c            |   17 ++++++++++++++++-
 lib/stream.h            |    4 +++-
 ovsdb/jsonrpc-server.c  |    4 ++++
 ovsdb/jsonrpc-server.h  |    4 +++-
 ovsdb/ovsdb-server.c    |    7 ++++++-
 tests/automake.mk       |    2 --
 tests/choose-port.pl    |   26 --------------------------
 tests/ofproto-dpif.at   |   35 +++++++++++++++++------------------
 tests/ofproto-macros.at |   17 +++++++++++++++++
 tests/ovsdb-idl.at      |    7 ++++---
 tests/ovsdb-server.at   |   26 +++++++++++++-------------
 tests/test-netflow.c    |   12 +++++-------
 tests/test-sflow.c      |   13 ++++++-------
 vswitchd/vswitch.xml    |   23 +++++++++++++++++------
 18 files changed, 136 insertions(+), 95 deletions(-)
 delete mode 100644 tests/choose-port.pl

Open vSwitch

More information about the git mailing list