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

25 Commits

Author SHA1 Message Date
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
Justin Pettit
697e8aa22f xenserver: Don't start OVS if network.conf isn't "openvswitch"
The OVS processes would start as long as "/etc/xensource/network.conf"
didn't contain "bridge".  The other OVS scripts, however, would complain
(and not run) if it wasn't "vswitch" or "openvswitch".  This commit will
only start the OVS processes if a value of "vswitch" or "openvswitch" is
present, so some consistency is provided.

(If "/etc/xensource/network.conf" is not "bridge", "vswitch", or
"openvswitch", then XAPI will refuse to run anyway, so not much is going
to happen on the system.)
2010-06-08 10:55:07 -07:00
Ian Campbell
b33c0ddb28 xenserver: make ovs-xenserverd startup configurable and disable it for 5.6.0 onwards.
In my testing with XenServer 5.6.810 without ovs-xenserverd the
vswitch bridge external-id network-uuid field was always kept up to
date over both pool join and pool eject. I believe this is because
xapi is restarted on both pool join and pool eject and on restart all
PIFs are plugged again. This causes the vswitch field to be updated,
either via a call to interface reconfigure or via an explicit
ovs-vsctl call in the case of internal networks.

I think the only reason this daemon would still be required with
XenServer 5.5 is that the explicit call to ovs-vsctl for internl
networks is not present there.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-06-03 09:45:11 -07:00
Jesse Gross
2158888d8d patch: Remove veth driver.
Now that we have a new patch implementation, remove the veth driver
and its userspace components.  Then rename 'patchnew' to 'patch'.
The new implementation is a drop-in replacement for the old one.
2010-05-18 12:57:25 -07:00
Ben Pfaff
0313fb2e2f xenserver: Make Open vSwitch disable itself in "bridge" mode.
When /etc/xensource/network.conf contains the word "bridge", the system
is supposed to use the Linux bridge, not Open vSwitch.  This commit makes
OVS honor this setting, which until now it has mainly ignored.

Reported-by: Reid Price <reid@nicira.com>
2010-05-04 10:20:58 -07:00
Ben Pfaff
1f256c11cd xenserver: Use start_daemon for xenserverd also in /etc/init.d/openvswitch.
Reported-by: Justin Pettit <jpettit@nicira.com>
2010-04-27 09:37:06 -07:00
Ben Pfaff
b1cd4308bc xenserver: Report correct daemon names at startup in /etc/init.d/openvswitch.
Reported-by: Justin Pettit <jpettit@nicira.com>
2010-04-27 09:36:30 -07:00
Ben Pfaff
9cad684489 xenserver: Use daemon-specific dir for pidfile in /etc/init.d/openvswitch.
Reported-by: Justin Pettit <jpettit@nicira.com>
2010-04-27 09:35:45 -07:00
Ben Pfaff
e7eacf16f5 xenserver: Avoid using unset $nice variable in /etc/init.d/openvswitch.
Reported-by: Justin Pettit <jpettit@nicira.com>
2010-04-27 09:35:03 -07:00
Justin Pettit
070644563c xenserver: Fix typo in prompt 2010-04-26 16:42:05 -07:00
Ben Pfaff
55e1991904 xenserver: Factor redundancy out of /etc/init.d/openvswitch.
We probably have too many configuration variables in any case, but at least
we can use just one shell function to deal with them.
2010-04-26 16:41:35 -07:00
Ben Pfaff
2e8a4c31ab xenserver: Gracefully refresh network UUIDs on pool join or leave.
The vswitch database is supposed to maintain an up-to-date UUID for the
system's networks in the Bridge table as external-ids:network-uuids.  On
XenServer systems, /opt/xensource/libexec/interface-reconfigure updates
these fields as bridges are brought up and down.  Most of the time, that is
sufficient.  However, this is one exception: when a XenServer host enters
or leaves a pool, interface-reconfigure is not invoked, and neither is any
other script.  So this commit introduces a new, XenServer-specific daemon
that monitors the XenServer's pool membership status and refreshes the
network UUIDs (by invoking the refresh-network-uuids script) if it changes.

Bug #2097.
2010-04-26 16:41:35 -07:00
Ben Pfaff
d799ae067f xenserver: Fix sense of -d test in /etc/init.d/openvswitch.
It doesn't make sense to create a directory if it already exists.
2010-04-26 13:12:35 -07:00
Jesse Gross
6f643e4946 tunneling: Remove old GRE implementation.
The new GRE implementation provides a complete drop in replacement
for the old Linux based implementation.  Therefore, remove the
old implementation and rename "grenew" to "gre".
2010-04-19 09:11:58 -04:00
Justin Pettit
50b2ad57cb xenserver: Fix name of veth module so it can be loaded on startup 2010-04-15 07:39:02 -07:00
Justin Pettit
4dcf0d73c2 xenserver: Load veth driver on 2.6.18 systems
In a future commit, the "patch" netdev type will be introduced.  The
initial implementation will be based on veth, for which we have a kernel
module on 2.6.18.  A more general solution will be used in the future,
at which time, this loading of the veth module can be removed.
2010-04-14 20:53:16 -07:00
Justin Pettit
9888b1b43b xenserver: Fix ip_gre_mod modprobe issue in init script
The OVS kernel modules were moved to kernel/extra/openvswitch, but the
init script wasn't updated to look for the ip_gre_mod kernel module
there.  This commit fixes that.

CC: Paul Ingram <paul@nicira.com>
2010-04-12 13:12:34 -07:00
Ian Campbell
e40a9944f7 xenserver: Fix init script typos that prevented turning brcompatd back on.
Commit 723a8c3ca "xenserver: Disable brcompatd" turned off brcompatd by
default but allowed it to be enabled using an option, but the option
didn't work.  This commit fixes that problem.
2010-03-26 14:42:55 -07:00
Ian Campbell
06e41baf2a xenserver: Disable brcompatd except on XenServer 5.5.0
The compat layer is now unused in the vswitch branch of XenServer.

Based on change originally by Ian Campbell, cherry-picked from
"xs5.7" branch.  The original change was not conditional on the
XenServer version.
2010-03-26 14:42:55 -07:00
Ian Campbell
a1864c5f89 Ensure "service vswitch status" returns appropriate error code
This command was returning success when vswitchd was not running.
Our automated test relies on this command to decide if the host uses
vswitch or not.

If vswitchd is not OK then brcompatd is not checked at all. Since the
return codes apparently have specific meanings I couldn't see a sensible
way to combine multiple failure results.

(Cherry-picked from xs5.7 branch by Ben Pfaff but merge conflicts meant
that the whole thing had to be redone.)
2010-03-26 14:42:33 -07:00
Ian Campbell
7c632268f2 xenserver: Correct "service vswitch status" when brcompatd is disabled
I don't think it makes sense to report brcompatd's status when it is
explicitly disabled. Doing so causes service status to return an error
when brcompatd is deliberately disabled.

Also fix up a tab vs. spaces whitespace snafu.
2010-03-26 14:42:33 -07:00
Justin Pettit
bc39196036 Cleanup default file locations and XenServer packaging
This commit cleans up the locations of a number of files and directories
used.  These include:

    - Config file lives in /etc/openvswitch/conf.db
    - Logs go into /var/log/openvswitch
    - ovsdb-server socket is /var/run/openvswitch/db.sock
    - Schema goes into /usr/share/openvswitch/vswitch.ovsschema
    - PID files go in /var/run/openvswitch

For XenServer, these additional changes are made:

    - Cores go in /var/xen/openvswitch
    - OVS binaries run in /var/xen/openvswitch

In addition, it attempts to cleanup the XenServer packaging.  This
includes referring to the project as "openvswitch" as opposed to the
somewhat presumptuous "vswitch".

Note: Changes to the Debian packaging will be forthcoming.
2010-03-26 14:40:31 -07:00