summaryrefslogtreecommitdiff
path: root/xenserver/etc_init.d_openvswitch
Commit message (Collapse)AuthorAgeFilesLines
* trivial: Don't mix tabs and spaces in ovs-simStephen Finucane2016-11-301-9/+9
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* Revert "rhel, xenserver: Punch holes through firewall for VXLAN."Gurucharan Shetty2013-04-161-1/+0
| | | | | | | | | | 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>
* rhel, xenserver: Punch holes through firewall for VXLAN.Gurucharan Shetty2013-04-081-0/+1
| | | | | Bug #15518. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* debian, rhel, xenserver: Ability to collect ovs-ctl logs.Gurucharan Shetty2013-03-151-6/+5
| | | | | | | | | | | | 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>
* xenserver, rhel, debian: Use ovs-ctl restart.Gurucharan Shetty2012-10-241-2/+12
| | | | | | | | | | | | | | 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>
* xenserver, rhel: Enable extra ovs-ctl options from init scripts.Ben Pfaff2012-06-151-0/+1
| | | | | | | | This is useful for passing wrapper script options and possibly for other purposes. Bug #11889. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | 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>
* ovs-xapi-sync: Use unixctl to trigger cache flushes.Ethan Jackson2012-03-091-4/+3
| | | | | | | | 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>
* xenserver: Restart ovs-xapi-sync on kmod reload.Ethan Jackson2012-02-291-7/+14
| | | | | | | | | | | 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>
* utilites: rename ovs-lib.sh to ovs-libChris Wright2011-12-091-1/+1
| | | | | | | | 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>
* xenserver: ovs-xapi-sync should create a log file.Ethan Jackson2011-10-051-1/+1
|
* xenserver: Restart HA daemon after force-reload-kmod.Ben Pfaff2011-06-291-1/+13
| | | | | | | | | | 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>
* Avoid inserting duplicate iptables rules when restarting vswitch.Ben Pfaff2011-06-211-2/+1
| | | | | | | | | | | | | | | | 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>
* Fix force-reload-kmod initscript command implementations.Ben Pfaff2011-06-201-2/+2
| | | | | | I screwed this up in the recent conversion. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Fix typo in "--force-corefiles" and "force-reload-kmod".Ben Pfaff2011-06-171-2/+2
| | | | Reported-by: Andrew Evans <aevans@nicira.com>
* Refactor initscripts into distro-independent and distro-specific pieces.Ben Pfaff2011-06-171-365/+43
| | | | This should make it easier to add OVS support to new distributions.
* xenserver: Don't delete pidfile in stop_daemon.Ben Pfaff2011-06-161-1/+0
| | | | | | | | | 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.
* xenserver: Don't require confirmation to restart vswitch.Ben Pfaff2011-06-161-33/+2
| | | | | | | | | 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>
* xenserver: Use $OVS_XAPI_SYNC_PIDFILE consistently.Ben Pfaff2011-06-161-2/+2
| | | | | | This variable was used in some places but not in others. Signed-off-by: Ben Pfaff <blp@nicira.com>
* xenserver: Wait for ovs-xapi-sync to exit in "stop" command.Ben Pfaff2011-03-291-3/+3
| | | | | | | | | | | | 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>
* ovsdb: Implement garbage collection.Ben Pfaff2011-03-101-1/+12
|
* ovsdb: Remove 'managers' column from 'Open vSwitch' table.Andrew Evans2011-02-181-1/+1
| | | | | | | | 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.
* Avoid unneeded database compaction at startup, and improve backups.Ben Pfaff2011-02-151-8/+5
| | | | | | | | | | | | | | | | 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.
* xenserver: Rename ovs-external-ids to ovs-xapi-sync.Justin Pettit2011-02-111-6/+6
| | | | | | | | | 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>
* xenserver: Remove support for XenServer versions older than 5.6 FP1.Justin Pettit2011-02-111-67/+2
| | | | | | | | Commit 404c169247b1c3ac2ebad887f0421478a6cef924 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>
* xenserver: Introduce "force-reload-kmod" to reload kernel module.Ben Pfaff2011-02-081-0/+48
| | | | | | | | | | 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>
* xenserver: Consistently use spaces instead of tabs in init script.Justin Pettit2011-02-071-11/+11
|
* xenserver: Make ovsdb-server look for remotes in manager_options column.Andrew Evans2011-02-021-1/+1
| | | | | (ovsdb-server will still use any managers found in the managers column as well.)
* xenserver: Use "ovs-dpctl dump-dps" instead of parsing "ovs-dpctl show".Ben Pfaff2011-01-271-5/+1
| | | | | | | 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>
* xenserver: Remove "Required-" parameters from "openvswitch" init script.Justin Pettit2011-01-101-2/+2
| | | | | | | | | | | 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.
* xenserver: Remove Linux bridge on startup if no bridges exist.Patrick Mullaney2011-01-071-0/+8
| | | | | | | | 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>
* xenserver: Add defaults for ENABLE_BRCOMPAT, ENABLE_FAKE_PROC_NET.Patrick Mullaney2011-01-071-6/+11
| | | | | | | | 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>
* xenserver: Don't require /etc/xensource/network.conf if not on XenServer.Patrick Mullaney2011-01-071-3/+5
| | | | | | | | | | | | | | | 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>
* xenserver: Only start ovs-external-ids on XenServer.Patrick Mullaney2011-01-071-4/+6
| | | | | | | | 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>
* xenserver: Generate system UUID for non-XenServer systems.Ben Pfaff2011-01-071-1/+11
| | | | | | | | | | | | | | | 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>
* xenserver: Be compatible with non-XenServer func libraries in init script.Ben Pfaff2011-01-071-1/+28
| | | | | | | | | | | | | | 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>
* xenserver: Add LSB init info to scripts.Ben Pfaff2011-01-071-1/+10
| | | | | | | | | | | 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>
* Implement database schema versioning.Ben Pfaff2010-12-271-1/+10
| | | | | As the database schema evolves, it might be useful to have an identifier for the particular version in use. This commit adds that feature.
* vswitchd: Add OVS version to database, give system info its own columns.Ben Pfaff2010-12-271-2/+4
| | | | | | | | | 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.
* xenserver: monitor-external-ids should run with --monitorEthan Jackson2010-09-221-1/+1
| | | | | | | | 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>
* xenserver: Rename monitor-external-ids -> ovs-external-idsEthan Jackson2010-09-221-6/+6
| | | | | | | | | | 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>
* xenserver: reload sends SIGHUP to monitor-external-idsEthan Jackson2010-09-211-2/+10
| | | | | | | | 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.
* ovs-vsctl: Remove default timeout.Ben Pfaff2010-09-171-3/+3
| | | | | | | | | | 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.
* xenserver: Don't delete pidfile when stopping monitor-external-idsJustin Pettit2010-09-101-1/+0
| | | | | | 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.
* xenserver: Finish renaming system-level external_ids.Ben Pfaff2010-08-261-1/+2
| | | | | | | | | 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>
* xenserver: Add monitor-external-ids daemonJustin Pettit2010-08-251-0/+10
| | | | | | | | | | | 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>
* xenserver: Report the system type and version as external idsJustin Pettit2010-08-251-6/+9
| | | | | | | | 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>
* Wait for daemons to die in init.d script "stop" commands.Ben Pfaff2010-08-121-0/+7
| | | | | | | | | | 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.
* xenserver: Add "reload" and "force-reload" support to init script.Ben Pfaff2010-08-021-1/+5
| | | | | | | | | | | | | 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.
* xenserver: Remove some ovs-xenserverd support that I missed.Ben Pfaff2010-06-091-28/+1
| | | | | | Oops. Must have been too giddy to look carefully the first time. This time I'll test it before I push.