2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Commit Graph

71 Commits

Author SHA1 Message Date
Gurucharan Shetty
c2301fbfc8 Revert "rhel, xenserver: Punch holes through firewall for VXLAN."
This reverts commit 5902b4ed6.

For end users that do not plan to use tunnels or use only selected
tunnels, it probably is a bad idea to punch firewall holes by default.
Opening holes like this may surprise the user.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-04-16 15:29:56 -07:00
Gurucharan Shetty
5902b4ed6d rhel, xenserver: Punch holes through firewall for VXLAN.
Bug #15518.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-04-08 10:40:05 -07:00
Gurucharan Shetty
46528f78e5 debian, rhel, xenserver: Ability to collect ovs-ctl logs.
We use ovs-ctl from startup scripts to start, stop, restart,
force-reload-kmod OVS daemons. ovs-ctl gives quite a descriptive
o/p while running the above commands. But the o/p goes to stdout.
Sometimes, this output is quite useful to debug issues.

With this patch, we store the o/p of ovs-ctl when called from
startup scripts in /var/log/openvswitch/ovs-ctl.log

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-03-15 09:16:13 -07:00
Gurucharan Shetty
aad12c5f8f xenserver, rhel, debian: Use ovs-ctl restart.
ovs-ctl has a new command called "restart" which
saves and restores the openflow flows on bridges.
Use that command from the init scripts when doing
a "restart --save-flows=yes".

Also, the debian package postinst script can
set the variable OVS_RESTART_SAVE_FLOWS to "yes"
to ask for save and restore of flows.

Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-10-24 16:43:38 -07:00
Ben Pfaff
87378a8770 xenserver, rhel: Enable extra ovs-ctl options from init scripts.
This is useful for passing wrapper script options and possibly for other
purposes.

Bug #11889.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-15 10:26:34 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ethan Jackson
a256b6e5a9 ovs-xapi-sync: Use unixctl to trigger cache flushes.
Typically Open vSwitch communicates with running processes using
unixctl.  This patch converts ovs-xapi-sync to the strategy for
consistency.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:38 -08:00
Ethan Jackson
f40af195a5 xenserver: Restart ovs-xapi-sync on kmod reload.
Some users never restart OVS, they just reload the kernel module on
each new version. Since ovs-xapi-sync is a daemon, a restart is
required to use the new code.  Therefore, without this patch, users
could unwittingly use stale versions of ovs-xapi-sync.

Bug #9919.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diagnosed-by: Ben Pfaff <blp@nicira.com>
2012-02-29 20:08:13 -08:00
Chris Wright
d422c11899 utilites: rename ovs-lib.sh to ovs-lib
Rename this helper script to simply ovs-lib, since it's primarily
a library of helper functions.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09 09:32:06 -08:00
Ethan Jackson
d652410464 xenserver: ovs-xapi-sync should create a log file. 2011-10-05 15:38:16 -07:00
Ben Pfaff
c002dde703 xenserver: Restart HA daemon after force-reload-kmod.
Otherwise its heartbeats start failing after the reload and the XenServer
reboots after a minute or so.

Thanks to Justin Pettit for figuring out that this was HA-related.

Bug #5706.
Reported-by: Henrik Amren <henrik@nicira.com>
2011-06-29 16:10:43 -07:00
Ben Pfaff
b3a375f242 Avoid inserting duplicate iptables rules when restarting vswitch.
On startup, some OVS initscripts insert an iptables rule to allow GRE
traffic (because GRE support is an important OVS feature).  I noticed that,
each time I restarted OVS, this added another GRE-related rule to the
iptables chain.  This is wasteful, because each additional rule increases
the time it takes to process a packet in the IP stack.

This commit avoids the problem by inserting an iptables rule when there
isn't already an appropriate rule.  It also avoids inserting an iptables
rule if the iptables policy is ACCEPT, meaning that packets are accepted
by default; in such a case, if the GRE packet would be dropped, it is
because the system administrator made that decision explicitly.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-21 16:40:44 -07:00
Ben Pfaff
5ae616d638 Fix force-reload-kmod initscript command implementations.
I screwed this up in the recent conversion.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-20 11:46:52 -07:00
Ben Pfaff
5e77fcd36b Fix typo in "--force-corefiles" and "force-reload-kmod".
Reported-by: Andrew Evans <aevans@nicira.com>
2011-06-17 13:51:51 -07:00
Ben Pfaff
43bb5f82ec Refactor initscripts into distro-independent and distro-specific pieces.
This should make it easier to add OVS support to new distributions.
2011-06-17 12:53:52 -07:00
Ben Pfaff
214301739c xenserver: Don't delete pidfile in stop_daemon.
Deleting the pidfile introduces a minor race: if some other process is
starting a daemon at the same time that the init script is stopping the
same daemon, then this could delete the new daemon's pidfile.

This is really a theoretical risk, because no one should be starting and
stopping a single daemon at the same time.
2011-06-16 12:28:07 -07:00
Ben Pfaff
18547b9ebc xenserver: Don't require confirmation to restart vswitch.
Early development versions of ovs-vswitchd didn't always restart
successfully, so we required confirmation if "restart" was invoked
interactively.  Recent versions do just fine, so drop the confirmation
prompt.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-16 12:28:06 -07:00
Ben Pfaff
1e9092831d xenserver: Use $OVS_XAPI_SYNC_PIDFILE consistently.
This variable was used in some places but not in others.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-16 12:28:06 -07:00
Ben Pfaff
b3d5b900a8 xenserver: Wait for ovs-xapi-sync to exit in "stop" command.
It seems possible that "restart" or a quick application of "stop" then
"start" could kill ovs-xapi-sync without starting it again, if
ovs-xapi-sync takes a little while to die, long enough for the next
instance of it to see that its pidfile is still open and locked.

I hope that this fixes some odd races that we've noticed in the "restart"
command.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-03-29 10:09:47 -07:00
Ben Pfaff
c5f341ab19 ovsdb: Implement garbage collection. 2011-03-10 11:24:00 -08:00
Andrew Evans
289df16d29 ovsdb: Remove 'managers' column from 'Open vSwitch' table.
We had retained but deprecated the use of the older 'managers' column in the
'Open vSwitch' table for compatibility with applications that might still use
it, but that created more problems than it solved. This commit removes the
'managers' column from the schema, and removes all references to it from the
code, init scripts, documentation, and tests.
2011-02-18 11:09:29 -08:00
Ben Pfaff
f8186f2c81 Avoid unneeded database compaction at startup, and improve backups.
Until now, Open vSwitch "start" has always converted the database to the
current database schema.  This compacts the database, which as a side
effect throws away useful information about the transactions that were
executed to bring the database into its current state.  This can make
debugging database-related problems more difficult.

This commit changes the "start" command to only convert the database if
the database schema has changed.  It also adds the database checksum to
the backup file name, to avoid overwriting backups in the case where the
checksum changed but the developer neglected to update the version number.

I tested an earlier version of the xenserver changes but not any version
of the Debian changes.
2011-02-15 12:24:29 -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
Justin Pettit
34edeccfd8 xenserver: Remove support for XenServer versions older than 5.6 FP1.
Commit 404c169247 breaks compatibility with
XenServers older than 5.6 FP1.  This commit removes the last vestiges of
support for those older XenServer versions.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2011-02-11 13:12:59 -08:00
Ben Pfaff
f7a122fc24 xenserver: Introduce "force-reload-kmod" to reload kernel module.
Running "service openvswitch force-reload-kmod" will now save the kernel
configuration state of Open vSwitch interfaces, stop the vswitch, unload
the kernel module, reload the kernel module, restart the vswitch, and
restore kernel configuration state.  It is a reasonably safe way to upgrade
or downgrade the Open vSwitch kernel module on a running system.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-02-08 16:43:40 -08:00
Justin Pettit
e20d7fc650 xenserver: Consistently use spaces instead of tabs in init script. 2011-02-07 13:43:42 -08:00
Andrew Evans
6d4408d020 xenserver: Make ovsdb-server look for remotes in manager_options column.
(ovsdb-server will still use any managers found in the managers column as
well.)
2011-02-02 16:55:12 -08:00
Ben Pfaff
d650378e74 xenserver: Use "ovs-dpctl dump-dps" instead of parsing "ovs-dpctl show".
Might as well use the dump-dps command as intended.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-01-27 09:29:35 -08:00
Justin Pettit
7f9bd4e8db xenserver: Remove "Required-" parameters from "openvswitch" init script.
Commit 72dfb3b (xenserver: Add LSB init info to scripts.) added LSB init
info to the XenServer scripts.  This was verified to work on XenServer
5.5, but newer versions of XenServer interpret these values and alter
when "openvswitch" gets called.  This causes XenServer to not come up
with its networking configuration properly.

By removing the "Required-" parameters, OVS will properly come up.  This
is just a temporary fix, and a more proper one will be forthcoming.
2011-01-10 21:32:09 -08:00
Patrick Mullaney
8d2662a579 xenserver: Remove Linux bridge on startup if no bridges exist.
Otherwise, if the bridge module is loaded but no bridges exist, on all
but the most recent Linux kernels this prevents the Open vSwitch kernel
module from loading.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:30 -08:00
Patrick Mullaney
d56d35d2f4 xenserver: Add defaults for ENABLE_BRCOMPAT, ENABLE_FAKE_PROC_NET.
On non-XenServer systems there is no $PRODUCT_VERSION to test for default
behavior, so use reasonable defaults in that case.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:30 -08:00
Patrick Mullaney
77fd0ab583 xenserver: Don't require /etc/xensource/network.conf if not on XenServer.
On XenServer systems, the "network mode" (that is, whether the network
uses OpenvSwitch or the Linux bridge) is stored in
/etc/xensource/network.conf.  On other systems, we can't expect it to be
there.  This changes the init script to tolerate its absence, treating that
as meaning that Open vSwitch should be used (otherwise, why did the admin
install it?).

NETWORK_MODE can always be overridden in /etc/sysconfig/openvswitch anyway.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
[changed back to read /etc/xensource/network.conf if present]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:29 -08:00
Patrick Mullaney
5badabf575 xenserver: Only start ovs-external-ids on XenServer.
ovs-external-ids's job is to synchronize UUIDs between XAPI and OVSDB.
Non-XenServer systems don't have XAPI so they don't need ovs-external-ids.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:29 -08:00
Ben Pfaff
2ce949ba35 xenserver: Generate system UUID for non-XenServer systems.
Currently the scripts in xensever/ are intended specifically for XenServer,
but supporting other distros seems like a worthy goal, so this is a step
in the right direction.

It would be good to be able to determine a suitable system-type and
system-version, but those are less important than system-id.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
[changed not to set xs-system-uuid on non-XenServer systems]
[whitespace changes]
[changed to handle missing uuidgen, suggested by Justin Pettit]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:29 -08:00
Ben Pfaff
6f83469de7 xenserver: Be compatible with non-XenServer func libraries in init script.
XenServer has its function library in /etc/init.d/functions but other
distros have it in different places.  Currently this init script is
specifically intended for XenServer but adding compatibility with other
distros seems like a worthwhile goal.

Also, SuSE does not have the "action" function, so test whether it is
implemented and when not supply a fallback.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
[changed to only define action() if not already defined]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:29 -08:00
Ben Pfaff
72dfb3b4c9 xenserver: Add LSB init info to scripts.
XenServer itself does not use this information as part of startup, but
other distributions that may wish to derive their startup scripts from
these may need it.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
[updated some info in xenserver/etc_init.d_openvswitch-xapi-update]
[used Debian LSB info for xenserver/etc_init.d/openvswitch]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-01-07 10:31:29 -08:00
Ben Pfaff
8159b984dc Implement database schema versioning.
As the database schema evolves, it might be useful to have an identifier
for the particular version in use.  This commit adds that feature.
2010-12-27 14:26:47 -08:00
Ben Pfaff
538c6dfab4 vswitchd: Add OVS version to database, give system info its own columns.
Until now, nothing in the database has reported the Open vSwitch version
number.  This commit adds that.

In addition, this commits moves the system type and version from
external-ids to individual columns, because we decided that these were
important enough not to relegate them to a grab-bag field.
2010-12-27 10:18:14 -08:00
Ethan Jackson
998bb652ec xenserver: monitor-external-ids should run with --monitor
The init script starts monitor-external-ids with --monitor when
configured to do so.  Also made changes to guarantee that --monitor
actually restarts ovs-external-ids.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2010-09-22 20:06:40 -07:00
Ethan Jackson
69c675a072 xenserver: Rename monitor-external-ids -> ovs-external-ids
Renamed the monitor-external-ids script ovs-external-ids.
Hopefully this will make it clearer who owns it when someone does
ps xa.

Also removed trailing whitespace from ovs-external-ids.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2010-09-22 18:05:29 -07:00
Ethan Jackson
97685b902d xenserver: reload sends SIGHUP to monitor-external-ids
When the init script's reload function is called it will send a
SIGHUP to monitor-external-ids.  This will cause
monitor-external-ids to re-generate everything.

Feature #3668.
2010-09-21 13:37:03 -07:00
Ben Pfaff
6b7b9d34c0 ovs-vsctl: Remove default timeout.
On overloaded XenServers the current default timeout of 5 seconds can
occasionally be reached, which causes VM startup to fail.  This commit
fixes the problem by removing the default timeout and changing each
invocation of ovs-vsctl within the tree to specify its own timeout,
if appropriate.

Bug #3573.
2010-09-17 14:37:51 -07:00
Justin Pettit
b14c5fe9bd xenserver: Don't delete pidfile when stopping monitor-external-ids
It's not necessary to explicitly delete the pidfile when stopping
monitor-external-ids through the init script, since the daemon will take
care of that.
2010-09-10 14:32:41 -07:00
Ben Pfaff
3a46ca6e46 xenserver: Finish renaming system-level external_ids.
vswitch.xml was updated to describe system-id and xs-system-uuid but the
implementation of this update was incomplete.

CC: Justin Pettit <jpettit@nicira.com>
CC: Jeremy Stribling <strib@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 13:57:11 -07:00
Justin Pettit
df09921db5 xenserver: Add monitor-external-ids daemon
The monitor-external-ids daemon monitors the external_ids columns of the
Bridge and Interface OVSDB tables.  Its primary responsibility is to
set the "bridge-id" and "iface-id" keys in the Bridge and Interface
tables, respectively.  It also looks for the use of "network-uuids" in
the Bridge table and duplicates its value to the preferred
"xs-network-uuids".

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2010-08-25 16:48:21 -07:00
Justin Pettit
bfe62d7a60 xenserver: Report the system type and version as external ids
The configuration schema defines the system-type and system-version
external-ids for the Open_vSwitch table.  This commit adds support for
reporting them on XenServer.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2010-08-25 16:48:16 -07:00
Ben Pfaff
2cc906419f Wait for daemons to die in init.d script "stop" commands.
Sometimes it takes a moment for the OVS daemons to die.  When that happens,
the "start" half of "openvswitch restart" can fail when ovsdb-tool
runs, because ovsdb-server will still have the lock on the database if it
has not exited yet.  So this commit just makes the "stop" half wait for
the daemons to really die.

Bug #3369.
2010-08-12 11:15:20 -07:00
Ben Pfaff
210374eb3d xenserver: Add "reload" and "force-reload" support to init script.
I can't easily find anything that documents what commands Fedora init
scripts should support, but many of them support "reload" and
"force-reload". This commit adds support for them to the XenServer init
scripts.  (The Debian init scripts already had support.)

Debian does document that reload and force-reload should be supported:
http://www.debian.org/doc/debian-policy/ch-opersys.html#s-writing-init

Reported-by: Reid Price <reid@nicira.com>
Bug #3266.
2010-08-02 15:21:27 -07:00
Ben Pfaff
5535f0bdf7 xenserver: Remove some ovs-xenserverd support that I missed.
Oops.  Must have been too giddy to look carefully the first time.

This time I'll test it before I push.
2010-06-09 10:16:39 -07:00
Justin Pettit
c6f196a050 xenserver: Don't complain for "bridge" network.conf value
Just silently don't start OVS daemons if /etc/xensource/network.conf
contains a value of "bridge".  This allows the init script to be called
regardless of whether OVS or bridge is configured.
2010-06-08 12:53:46 -07:00