Age | Commit message (Collapse) | Author |
|
If the loop condition in Stream.connect() was false, which is especially
likely for TCP connections, then Stream.connect() would return None,
which violates its documented behavior. This commit fixes the problem.
Reported-by: Isaku Yamahata <yamahata@valinux.co.jp>
Tested-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
Bug #12301.
Reported-by: Mike Kruze <mkruze@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
ovs-vswitchd.conf.db.5 has autogenerated text "at least -1" in one place.
This '-' should be a minus sign, but ovsdb-doc was generating it as a
hyphen.
Found by lintian.
Reported-by: Thomas Goirand <zigo@debian.org>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
|
|
On one machine, "/etc/init.d/openvswitch-switch start" failed to start
with:
ovs-vswitchd: fork child failed to signal startup (Success)
Starting ovs-vswitchd ... failed!
"strace" revealed that the fork child was actually segfaulting, but the
message output didn't indicate that in any way. This commit fixes the
log message (but not the segfault itself).
Reported-by: Michael Hu <mhu@nicira.com>
Bug #8457.
|
|
This tool will be a replacement for the current ovs-vlan-test
utility. Besides from connectivity issues it will also be able
to detect performance related issues in Open vSwitch setups.
Currently it uses UDP and TCP protocols for stressing.
Issue #6976
|
|
When a client of the IDL tries to commit a read-modify-write transaction
but the database has changed in the meantime, the IDL tells its client to
wait for the IDL to change and then try the transaction again by returning
TXN_TRY_AGAIN. The "wait for the IDL to change" part is important because
there's no point in retrying the transaction before the IDL has received
the database updates (the transaction would fail in the same way all over
again).
However, the logic was incomplete: the database update can be received
*before* the reply to the transaction RPC (I think that in the current
ovsdb-server implementation this will always happen, in fact). When this
happens, the right thing to do is to retry the transaction immediately;
if we wait, then we're waiting for an additional change to the database
that may never come, causing an indefinite hang.
This commit therefore breaks the "try again" IDL commit status code
into two, one that means "try again immediately" and another that means
"wait for a change then try again". When an update is processed after a
transaction is committed but before the reply is received, the "try again
now" tells the IDL client not to wait for another database change before
retrying its transaction.
Bug #5980.
Reported-by: Ram Jothikumar <rjothikumar@nicira.com>
Reproduced-by: Alex Yip <alex@nicira.com>
|
|
Suggested-by: Justin Pettit <jpettit@nicira.com>
|
|
Commit 591c20651f1 "daemon.py: Don't shadow built-in 'file' variable"
changed most instances of "file" to "file_handle" but missed this one.
I'm not certain that this solves a real problem, but it still seems wrong.
Bug #7533.
|
|
The --pidfile option is supposed to work like this:
* Without --pidfile, you don't get a pidfile.
* With --pidfile, you get the default pidfile.
* With --pidfile=FILE, you get FILE as your pidfile.
However, it actually worked like this:
* Without --pidfile, you got the default pidfile.
* With --pidfile, you got no pidfile at all.
* With --pidfile=FILE, you got FILE as your pidfile.
This is because of the semantics of "default" in argparse. It is
documented as:
The default keyword argument of add_argument(), whose value defaults to
None, specifies what value should be used if the command-line argument
is not present. For optional arguments, the default value is used when
the option string was not present at the command line.
We actually want "const", which is documented under the description of
nargs="?" as:
If no command-line argument is present, the value from default will be
produced. Note that for optional arguments, there is an additional
case - the option string is present but not followed by a command-line
argument. In this case the value from const will be produced.
Bug #7533.
|
|
This patch upgrades the library code in the python/ovs directory to
the new vlog module.
|
|
This patch also updates it's callers.
|
|
This will marginally simplify a future patch.
|
|
Currently, each python daemon has to come up with it's own logging
solution. These logging strategies are not consistent across the
python code or with the C vlog module. This patch adds a new
logging module which hopes to solve the problem. This new module
generates log messages in a manner consistent with the C code.
Furthermore, it can easily be extended to support things like rate
limiters in the future.
This patch does not update any python code to use the new module.
|
|
|
|
This patch does minor style cleanups to the code in the python and
tests directory. There's other code floating around that could use
similar treatment, but updating it is not convenient at the moment.
|
|
Found by pychecker.
|
|
Until now, the Python bindings for OVSDB have not supported writing to the
database. Instead, writes had to be done with "ovs-vsctl" subprocesses.
This commit adds write support and brings the Python bindings in line with
the C bindings.
This commit deletes the Python-specific IDL tests in favor of using the
same tests as the C version of the IDL, which now pass with both
implementations.
This commit updates the two users of the Python IDL to use the new write
support. I tested this updates only by writing unit tests for them,
which appear in upcoming commits.
|
|
Until now ovs.db.types.BaseType has kept track of the name of the
referenced table but not a reference to it. This commit renames the
ref_table attribute to ref_table_name and adds a new ref_table attribute
whose value is a reference to the named table.
This will be useful in an upcoming commit where table references are
actually followed.
|
|
The JSON parser in OVS always yields unicode strings and lists, never
non-unicode strings or tuples, but it's easy to create them when building
JSON elsewhere, so accept both forms.
|
|
It seems that 'copy' is the proper name for this kind of function in
Python, based on the existence of dict.copy().
|
|
This class only caused unnecessary confusion. This commit changes all of
its methods into top-level functions.
|
|
This was overlooked in the initial implementation. Including the result
member makes logging output more useful.
|
|
This code never got tested and so didn't work.
This does not fix an actual bug because Datum.check_constraints() does not
have any existing users.
|
|
Boolean values have Boolean type, not real type.
This does not fix an actual bug because Atom.new() does not have existing
users.
|
|
This must have slipped into an old commit by accident.
|
|
|
|
Found by pychecker.
|
|
pychecker ignores parameters named "_" or prefixed with "unused_".
|
|
The ref_type attribute was initialized on some paths but not others.
Found by pychecker.
|
|
Pychecker complains about __read_pidfile() having too may returns.
I personally think the function is fine, but it's easy enough to
reduce them.
python/ovs/daemon.py:395: Function (__read_pidfile) has too many
returns (12)
|
|
Pychecker considers it bad style.
|
|
The python style guide requires two newlines between top level
definitions. This patch also removes some trailing whitespace.
|
|
|
|
Found by pychecker.
|
|
Found by pychecker.
|
|
This function has no callers. We could delete it entirely, instead.
|
|
Found by pychecker.
|
|
Found by pychecker.
|
|
This method needs to be an instance method because it refers to 'self'.
Found by pychecker.
|
|
Found by pychecker.
|
|
There's no variable table_name.
Found by pychecker.
|
|
Found by pychecker.
|
|
Found by pychecker.
|
|
Found by pychecker.
|
|
This bug was introduced by commit 4c0f62718f "ovs.db.idl: Improve error
reporting for bad <row-update>s."
Found by pychecker.
Bug #7006.
|
|
Suggested-by: Reid Price <reid@nicira.com>
|
|
Suggested-by: Reid Price <reid@nicira.com>
|
|
Suggested-by: Reid Price <reid@nicira.com>
|
|
Reported-by: Reid Price <reid@nicira.com>
|
|
Reported-by: Reid Price <reid@nicira.com>
|