2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00
Commit Graph

39 Commits

Author SHA1 Message Date
Ben Pfaff
e328faadc4 ovs-vsctl: Drop redundant {port,iface}-{set,get}-external-ids commands.
These commands can be implemented just as well, and in a more
general-purpose way, using the "set", "remove", and "get" commands.

The br-{get,set}-external-ids commands have slightly more specialized
behavior and so we can't drop them (yet).
2010-01-27 14:28:30 -08:00
Ben Pfaff
8f7501e83f ovs-vsctl: Update --help message. 2010-01-27 13:51:52 -08:00
Ben Pfaff
b7f74b6f59 ovs-vsctl: Add "destroy" command. 2010-01-27 13:51:52 -08:00
Ben Pfaff
557e37183d ovs-vsctl: Add new "create" command. 2010-01-27 13:51:52 -08:00
Ben Pfaff
71bd6358a2 ovs-vsctl: Add --force option to database commands to override safety checks. 2010-01-27 13:51:52 -08:00
Ben Pfaff
90c4bd001a ovs-vsctl: Add "remove" and "clear" commands. 2010-01-27 13:51:52 -08:00
Ben Pfaff
1bc6ff2918 ovs-vsctl: Make parsing functions return error instead of aborting.
The upcoming "remove" command for ovs-vsctl wants to try parsing an
argument two different ways.  This doesn't work if a parse error always
aborts immediately.  This commit fixes the problem, by making a parsing
failure pass up an error for higher layers to deal with instead of aborting
immediately.

This commit should have no user-visible effect.
2010-01-27 13:51:52 -08:00
Ben Pfaff
c611c9d011 ovs-vsctl: Make the "list" format more uniform. 2010-01-27 13:51:52 -08:00
Ben Pfaff
5128bd9c3c ovs-vsctl: Score perfect matches higher than ones that differ in case.
Before, both "xY_z" and "xy-z" were considered equally good matches for
"xy-z", but obviously the latter is a much better match.  This commit fixes
the problem (which was found by inspection).
2010-01-27 13:51:52 -08:00
Jesse Gross
93255bc565 ovs-vsctl: Fix uninitialized variable.
When querying a row we could return an uninitialized variable in
some cases if we can't find what we are looking for.
2010-01-27 15:46:40 -05:00
Jesse Gross
7345004715 ovs-vsctl: Add missing columns.
bond_updelay and flood_vlans were missing from the list of
configurable columns.
2010-01-26 16:09:08 -05:00
Ben Pfaff
ad83bfa658 ovs-vsctl: Add commands for low-level database manipulation.
The new "get", "list", "set", and "add" commands provide lower-level
access to the vswitch database than the other ovs-vsctl commands, but they
are more convenient than using ovsdb-client directly.

This commit deserves several enhancements, but users are clamoring for
some kind of interface, so this is a starting point.
2010-01-26 09:49:30 -08:00
Jesse Gross
84a0ee89e2 ovs-vsctl: Prevent uninitialized variable warning.
The compiler warns about next_cfg being uninitialized but in the cases
where it is unset we will never reach the point where it is used.  This
just sets next_cfg to 0 to stop the whining.
2010-01-20 14:24:22 -05:00
Justin Pettit
b4182c7f2d ovs-vsctl: Add option to create fake iface when adding a bond
Some systems, such as XenServer, expect that bonds have their own interface.
This commit adds the ability to do that with the "--fake-iface" option
in ovs-vsctl's add-bond command.  It also has XenServer's
interface-reconfigure use it.

Part of solution to Bug #2376
2010-01-15 08:28:59 -08:00
Justin Pettit
1626118f26 ovs-vsctl: Don't mask timeout argument
ovs-vsctl supports the "--timeout" option, which specifies the amount
of time that the operation is allowed to take before a SIGALRM is
raised.  The code that parsed options had a local "timeout" that masked
the global one that was supposed to be set.
2010-01-14 18:08:52 -08:00
Justin Pettit
d35a4ea82f ovs-vsctl: Print correct fail-mode
When printing the fail-mode, ovs-vsctl would always attempt to print the
top-level one--even if it didn't exist.  So, in addition to sometimes
being wrong, it could cause segfaults.

Thanks to Peter Balland for reporting the error.

Bug #2374
2010-01-11 17:07:19 -08:00
Justin Pettit
e26b5a068c ovs-vsctl: Add support for extended vlog options
The man page states that ovs-vsctl supports extended vlog options (e.g.,
--log-file), but the executable did not.  This commit adds it.
2010-01-05 00:10:17 -08:00
Justin Pettit
dd8ac6fe86 ovs-vsctl: Support configuring SSL. 2009-12-20 22:05:22 -08:00
Justin Pettit
975ac53133 ovs-vsctl: Don't allow controller configuration on fake bridges
Fake bridges can't have controller configuration separate from its
parent, so prevent this from happening.

Thanks to Ben Pfaff for pointing out the problem.
2009-12-20 22:05:18 -08:00
Justin Pettit
11aa56278b ovs-vsctl: Fix minor typo in error message 2009-12-18 14:46:02 -08:00
Ben Pfaff
175106cbf6 ovs-vsctl: Fix segfault with fake bridges.
A fake bridge has no br_cfg, so we can't dereference it.

There is a similar problem in cmd_set_controller() and
cmd_del_controller() but this commit does not fix it.
2009-12-17 15:53:43 -08:00
Justin Pettit
5aa0063548 ovs-vsctl: Add commands for modifying controller settings
Adds the ability to configure the controller and fail-mode.
2009-12-17 13:28:26 -08:00
Ben Pfaff
b54e22e91e Make ovs-vswitchd report when it is done configuring; make ovs-vsctl wait.
Until now the ovsdb-based vswitch has provided no way to know when it has
finished applying the configuration from the database.  This commit
introduces a way:

  * The client who wants to wait increments the "next_cfg" column of the
    Open_vSwitch record.

  * When ovs-vswitchd finishes reconfiguring, it sets the value of the
    "cur_cfg" column to that of the "next_cfg" column.

  * The client waits until the "cur_cfg" column is at least as great as
    the value it set into "next_cfg".

This allows us to drop the 5-second sleep in interface-reconfigure.
2009-12-16 16:26:17 -08:00
Ben Pfaff
d171b5846f ovsdb: Add "comment" feature to transactions and make ovs-vsctl use them.
The idea here is that transaction comments get copied to the ovsdb-server's
transaction log, which can then make it clear later why a particular change
was made to the database, to ease debugging.
2009-12-16 13:30:53 -08:00
Justin Pettit
a39a859a30 ovs-vsctl: Set timeout to a default value of five seconds
In general, we don't want ovs-vsctl to wait forever to connect to the
database, as ovs-vsctl is used extensively in init scripts and the
system will not boot.  Use a default value of five seconds as a
stop-gap.  Eventually, we'll switch to a model of connection attempts,
since using time-based approach is kind of a hack.
2009-12-14 14:51:17 -08:00
Ben Pfaff
342045e177 ovs-vsctl: Add -t or --timeout option to limit runtime. 2009-12-14 10:13:49 -08:00
Ben Pfaff
577aebdfec ovs-vsctl: Add --dry-run option. 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
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
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
a0a9f31ddc ovs-vsctl: Fix minor memory leak in add_port(). 2009-12-10 02:33:56 -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