2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
Ethan Jackson
201bf205ea ovs-xapi-sync: Convert to vlog. 2011-09-27 14:51:49 -07:00
Ethan Jackson
b153e66790 python: Upgrade daemon module to argparse.
This patch also updates it's callers.
2011-09-27 14:51:49 -07:00
Ben Pfaff
1b0fdca5fa ovs-xapi-sync: Add unit test. 2011-09-26 13:08:58 -07:00
Ethan Jackson
e75a14703b ovs-xapi-sync: Style cleanup.
Pleases pep8.
2011-09-23 23:39:23 -07:00
Ethan Jackson
7f76372156 ovs-xapi-sync: Remove dead code.
Found by pychecker.
2011-09-23 23:39:23 -07:00
Ben Pfaff
8cdf034974 python: Implement write support in Python IDL for OVSDB.
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.
2011-09-23 14:23:16 -07:00
Ben Pfaff
77b8ebcfd4 ovs-xapi-sync: Make pychecker-able.
pychecker imports the code that it checks, which means that code at top
level runs, so "ovs-xapi-sync" failed to import unless the user had write
access to /var/log/openvswitch.
2011-09-22 10:55:33 -07:00
Ben Pfaff
c1a543a8d6 vlog: Add a new log level "off".
Until now, "emer" has effectively been "off" because no messages were ever
logged at "emer" level.  Justin points out that it is useful to use "emer"
for messages that indicate a fatal error.  This commit makes that change
and adds a new "off" level to really turn off all logging to a facility.
2011-08-01 13:23:19 -07:00
Ethan Jackson
86014a2861 xenserver: Update all external_ids in tap interfaces.
Commit 400430 "xenserver: Give tap devices iface-ids." copies the
iface-id from vifs to their related tap device.  It turns out this
is not sufficient, so this commit copies all relevant external_ids
over.

Requested-by: Pankaj Thakkar <thakkar@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>

Bug #5954.
2011-06-22 16:11:36 -07:00
Ethan Jackson
32abfca082 xenserver: New iface-status external id.
The iface-status external id indicates to a controller which device
it should manage when there are multiple choices for a given vif.
Currently, it always chooses a tap device if available, but one
could imagine more sophisticated strategies in the future.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2011-06-17 12:55:56 -07:00
Ethan Jackson
4004304470 xenserver: Give tap devices iface-ids.
In some cases XenServer will give a virtual machine a tap device in
addition to its usual vif.  These tap devices need iface-ids so
that controllers can figure out which vif they are related to.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2011-06-17 12:55:56 -07:00
Ethan Jackson
766ca04358 xenserver: Fix use of undefined variable.
Found with pylint.

E:167:update_in_band_mgmt: Undefined variable 'bridge'

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2011-06-17 12:55:56 -07:00
Ben Pfaff
00c0858987 daemon: Integrate checking for an existing pidfile into daemonize_start().
Until now, it has been the responsibility of an individual daemon to call
die_if_already_running() at an appropriate time.  A long time ago, this
had to happen *before* daemonizing, because once the process daemonized
itself there was no way to report failure to the process that originally
started the daemon.  With the introduction of daemonize_start(), this is
now possible, but we haven't been taking advantage of it.

Therefore, this commit integrates the die_if_already_running() call into
daemonize_start() and deletes the calls to it from individual daemons.
2011-04-04 10:58:55 -07:00
Ben Pfaff
c6b547cd44 xenserver: Fix up iface-id after it changes or disappears too.
ovs-xapi-sync is supposed to always keep external-ids:iface-id up to date,
but in fact it would only set it when an interface initially appeared.  If
the interface quickly disappeared and reappeared, then it failed to notice
that iface-id had changed or disappeared.  This happens in practice on
Citrix XenServer, where VM "tap" devices often disappear and then reappear
almost immediately during VM boot.  This commit fixes the problem.

This also fixes the similar problem for external-ids:bridge-id in Bridge
records.  Bridges aren't ordinarily destroyed and re-created quickly, so
this problem might never have manifested in practice for bridges.

Many thanks to Reid Price <reid@nicira.com> for identifying the problem
and supplying an initial fix.

Bug #5239.
Reported-by: Henrik Amren <henrik@nicira.com>
2011-04-01 16:05:29 -07:00
Andrew Evans
da54975c9d xenserver: Add support for disabling in-band management via XAPI.
Allow users or applications to enable or disable in-band management of
individual bridges by setting the 'vswitch-disable-in-band' key in the
'other_config' attribute of the corresponding network to 'true' or
'false'.

Bug #4749.
2011-02-28 18:26:48 -08:00
Justin Pettit
a49fe70cde xenserver: Rename ovs-external-ids to ovs-xapi-sync.
With commit 5692e3 (xenserver: Set fail_mode on internal bridges.), the
responsibilities of ovs-external-ids got expanded beyond just monitoring
external-ids.  This commit renames the script to more accurately
describe its job.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2011-02-11 13:14:39 -08:00