2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00
Commit Graph

652 Commits

Author SHA1 Message Date
Justin Pettit
ef5e2fe54d xenserver: Suppress output when creating initial config DB 2009-12-11 17:09:08 -08:00
Ben Pfaff
093e47f487 vswitch: Set datapath_id and ofport in ovsdb.
Now ovs-vswitchd fills in the Interface ofport and Bridge datapath_id
fields when it reconfigures.

The existing Bridge datapath_id and hwaddr columns, which had surprising
meanings, have been banished to a new other_config column.
2009-12-11 17:03:35 -08:00
Ben Pfaff
e6e6bdad78 Remove redundant calls to set_nonblocking().
These set_nonblocking() calls are on a fd returned by make_unix_socket(),
which has already set the fd nonblocking.
2009-12-11 17:00:28 -08:00
Ben Pfaff
21a60ea97b socket-util: Clarify EAGAIN error code for make_unix_socket().
make_unix_socket() can return EAGAIN in rare circumstances, e.g. when the
server's socket listen queue is full.  A lot of OVS callers interpret
EAGAIN as a "try again" error code, but in this case it means that the
attempt to create the socket failed.  So munge EAGAIN into another error
code to prevent that misinterpretation.
2009-12-11 16:59:44 -08:00
Ben Pfaff
fbd8fd40a3 ovsdb-idl: Prevent segfault destroying an incomplete transaction. 2009-12-11 16:58:16 -08:00
Ben Pfaff
99b2042d3b ovsdb: Fix segfault when a column set contains an invalid column name. 2009-12-11 16:37:29 -08:00
Ben Pfaff
45a7de56bb vswitch: Generate text file documenting the vswitch schema.
Now you can read vswitchd/vswitch-idl.txt for some textual documentation
of the OVS schema.
2009-12-11 14:12:50 -08:00
Ben Pfaff
1ebeed630c ovsdb-idl: Fix deletion of modified row.
If the transaction modified a row and then deleted it, the IDL would
instead mistakenly leave the row entirely untouched.

This commit fixes this bug.  It needs a regression test, but this commit
does not add one.
2009-12-11 13:26:08 -08:00
Ben Pfaff
ee9e92d81a ovsdb: Cleanly abort delete operations. 2009-12-11 13:26:08 -08:00
Ben Pfaff
577aebdfec ovs-vsctl: Add --dry-run option. 2009-12-11 13:26:08 -08:00
Ben Pfaff
b87fde85d0 ovsdb-client: Add support for pretty-printing JSON in output. 2009-12-11 13:26:08 -08:00
Ben Pfaff
f0f54cb4dd ovsdb-idl: Fix row insertion and deletion behavior.
When the IDL was used to insert a row, but all of the new row's columns
were left at the default values, then the IDL would not insert the row at
all.

When the IDL was used to delete one or more rows, and the transaction did
not include any update or insertion operations, the transaction was dropped
entirely.

This commit fixes these two bugs.  It needs a regression test, but this
commit does not add one.
2009-12-11 13:26:08 -08:00
Ben Pfaff
524555d18b ovs-vsctl: Initialize the database automatically. 2009-12-11 13:26:05 -08:00
Justin Pettit
bd1b03cd02 xenserver: Have brctl wrapper use config DB instead of config file
This is a first cut and is likely buggy.  VLANs have not been tested.
2009-12-10 17:08:40 -08:00
Justin Pettit
96aa6a2a6d xenserver: Fix typo in dump-vif-details
dump-vif-details was calling ovs-vsctl with "bridge-set-external-id",
when it should have been "br-set-external-id".
2009-12-10 17:08:40 -08:00
Justin Pettit
91d38a2e5a xenserver: Fixes related to creating config DB in RPM spec file
Some programs require a "Open_vSwitch" table to exist in the
configuration DB.  This change adds that table when a new DB is created.

Also, don't try to create the DB unless it doesn't exist.
2009-12-10 17:08:40 -08:00
Justin Pettit
927889486a ovs-brcompatd: Remove references to locking config file
With the config DB, it is no longer necessary to lock the config file.
This removes references to the need for that.
2009-12-10 17:08:39 -08:00
Justin Pettit
f72e2b3652 xenserver: Remove references to "reload" in init script
With ovs-vswitchd using the config DB, it is no longer necessary to tell
it to reload its configuration file.  This removes references to the
need for reloading.

It also cleans up some messages placed on the console during boot up.
2009-12-10 17:08:39 -08:00
Justin Pettit
36594cd0b0 ovs-brcompatd: Change man page to reflect new config db changes 2009-12-10 17:08:39 -08:00
Ben Pfaff
83889ee716 xensource: Add kluge to make interface-reconfigure work better.
This change makes xsconsole able to reconfigure the management interface
on some XenServer hosts.  It's not clear why it is needed--apparently
xapi is creating the bridge behind our back.
2009-12-10 16:43:10 -08:00
Ben Pfaff
c88b6a2788 ovs-vsctl: Log fatal errors as well as printing them on the console.
This makes debugging errors on XenServer much simpler, since many uses of
ovs-vsctl direct stderr to /dev/null.
2009-12-10 16:05:20 -08:00
Ben Pfaff
5ef47c66cc xenserver: Make basic VM networking work.
Tested by starting and stopping a VM that has a single VIF and verifying
that the VM could get an IP address via DHCP and access the network and
that the VIF's external-ids were set to plausible values.
2009-12-10 15:56:11 -08:00
Ben Pfaff
c0eb8e3158 xenserver: Make basic interface-reconfigure calls work.
Now a XenServer can boot OK with the database at least in simple cases.

interface-reconfigure is slow because there is a 5-second sleep in place of
a proper way to wait for vswitchd reconfiguration to complete.
2009-12-10 15:37:59 -08:00
Ben Pfaff
70feacd532 xenserver: Check ovsdb-server version and status also. 2009-12-10 15:36:02 -08:00
Ben Pfaff
e404c41fea xenserver: Implement clearing database at boot. 2009-12-10 15:35:29 -08:00
Ben Pfaff
0c3dd1e1a1 ovs-vsctl: Accept documented --no-wait option. 2009-12-10 15:32:50 -08:00
Ben Pfaff
460aad8048 ovs-vsctl: Add --if-exists options to del-br, del-port commands.
These options make it easier to reimplement interface-reconfigure using
ovs-vsctl.
2009-12-10 14:07:54 -08:00
Ben Pfaff
01845ce8ca ovs-vsctl: Make functions to find entities more flexible.
This will be used in upcoming commits.
2009-12-10 14:07:54 -08:00
Ben Pfaff
5d9cb63c91 ovs-vsctl: Add options parsing infrastructure.
This paves the way for adding options to commands but should have no
user-visible change.
2009-12-10 14:07:54 -08:00
Ben Pfaff
68be4616d6 ovs-vsctl: Add --help output for external-id commands. 2009-12-10 10:12:02 -08:00
Justin Pettit
9852694f9e ovs-brcompatd: First cut at integration with new config db
This is an extremely lightly tested attempt at switching ovs-brcompatd
from using the config file to the new config db.  There are a lot of
shortcomings in this cut, but we need to make progress on the XenServer
integration, so it's going in now.  Expect changes in the near future.
2009-12-10 02:33:57 -08:00
Justin Pettit
a0a9f31ddc ovs-vsctl: Fix minor memory leak in add_port(). 2009-12-10 02:33:56 -08:00
Justin Pettit
7a44236e27 Update .gitignore files 2009-12-10 02:33:56 -08:00
Justin Pettit
fea28b07bb xenserver: Modify init scripts to use new configuration database 2009-12-10 02:33:51 -08:00
Justin Pettit
5c8ef29c2e xenserver: Remove ip_gre kernel module when other modules are removed 2009-12-10 00:14:10 -08:00
Ben Pfaff
457e1eb040 ovs-vsctl: New commands for working with external IDs.
This aids XenServer integration and should make it easier to integrate
with other environments in the future as well.
2009-12-09 17:06:49 -08:00
Ben Pfaff
586bb84a49 ovs-vsctl: Fix performance problem. 2009-12-09 13:29:02 -08:00
Ben Pfaff
dfbe07ba61 ovs-vsctl: Fix bugs.
The full ovs-vsctl test suite now passes.
2009-12-09 13:28:48 -08:00
Ben Pfaff
c75d15113c vsctl: Start making it work with ovsdb.
This passes at least one test (the one named "add-br a").  It probably
doesn't pass any more than that.

This is *way* not up to my quality standards, but we are in a super hurry
so I'm pushing it anyhow.
2009-12-08 17:18:12 -08:00
Ben Pfaff
02630ff2dc ovsdb-idlc: Add "const" to "set" function arguments that should have it. 2009-12-08 17:15:46 -08:00
Ben Pfaff
76c91af91e ovsdb-idl: New function to obtain the current transaction from any row. 2009-12-08 17:14:56 -08:00
Ben Pfaff
72c6edc5d5 ovsdb-idl: Bug fixes. 2009-12-08 17:14:36 -08:00
Ben Pfaff
da50fb9cd8 vswitch: Add "external_ids" and "ofport" columns to Interface table. 2009-12-08 13:41:06 -08:00
Ben Pfaff
1264cb08bf ovsdb-idlc: Fix parsing of "ephemeral" member of "column". 2009-12-08 13:41:06 -08:00
Ben Pfaff
8bc915de7a ovsdb-idl: Update IDL data when "set" functions are called.
Until now, the "set" functions generated by the IDL updated the data in the
database (during commit) but not the data exposed by the IDL in its data
structures.  This was just an oversight, so this commit causes the data
exposed by IDL to be updated also.
2009-12-08 10:59:46 -08:00
Ben Pfaff
475281c01b ovsdb-idl: Make it possible to write data through the IDL.
Until now the IDL has been exclusively a read-only interface.  This commit
introduces a general-purpose interface for writing to ovsdb via the IDL.
2009-12-07 17:10:28 -08:00
Ben Pfaff
2d2d6d4a71 ovsdb: Implement new "declare" operation. 2009-12-07 17:10:28 -08:00
Ben Pfaff
f6f8c3ba77 json: New convenience function json_array_create_1(). 2009-12-07 17:10:27 -08:00
Ben Pfaff
7cc48aed45 bitmap: New function bitmap_scan() and macro BITMAP_FOR_EACH_1.
bitmap_scan() can be optimized significantly for the case of a sparse
bitmap but it doesn't seem worth the additional overhead of writing a test
unless and until we show that it's a useful optimization in practice.
2009-12-07 17:10:27 -08:00
Ben Pfaff
1e68c0730d hmap: Add function to mark an hmap_node as "null" and check for the mark.
This is useful in cases where one might want to know whether an hmap_node
is actually part of an hmap, without using a separate variable to indicate
it.
2009-12-07 17:07:15 -08:00