summaryrefslogtreecommitdiff
path: root/xenserver
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Integrate checking for an existing pidfile into daemonize_start().Ben Pfaff2011-04-041-2/+0
| | | | | | | | | | | | Until now, it has been the responsibility of an individual daemon to call die_if_already_running() at an appropriate time. A long time ago, this had to happen *before* daemonizing, because once the process daemonized itself there was no way to report failure to the process that originally started the daemon. With the introduction of daemonize_start(), this is now possible, but we haven't been taking advantage of it. Therefore, this commit integrates the die_if_already_running() call into daemonize_start() and deletes the calls to it from individual daemons.
* xenserver: Fix up iface-id after it changes or disappears too.Ben Pfaff2011-04-011-2/+8
| | | | | | | | | | | | | | | | | | | ovs-xapi-sync is supposed to always keep external-ids:iface-id up to date, but in fact it would only set it when an interface initially appeared. If the interface quickly disappeared and reappeared, then it failed to notice that iface-id had changed or disappeared. This happens in practice on Citrix XenServer, where VM "tap" devices often disappear and then reappear almost immediately during VM boot. This commit fixes the problem. This also fixes the similar problem for external-ids:bridge-id in Bridge records. Bridges aren't ordinarily destroyed and re-created quickly, so this problem might never have manifested in practice for bridges. Many thanks to Reid Price <reid@nicira.com> for identifying the problem and supplying an initial fix. Bug #5239. Reported-by: Henrik Amren <henrik@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>
* xenserver: Collect /proc/slabinfo in a Server Status ReportSajjad Lateef2011-03-224-0/+33
| | | | | | /proc/slabinfo gives information about memory usage as slab level and can be used to diagnose memory issues on memory-limited systems
* xenserver: Don't require other-config:disable-in-band to exist.Ben Pfaff2011-03-211-1/+2
| | | | | | | | | other-config:disable-in-band is optional but the ovs-vsctl "get" command by default requires its target to exist. Adding --if-exists allows it to be missing. Reported-by: Henrik Amren <henrik@nicira.com> Bug #5056.
* ofproto: Remove controller discovery support.Ben Pfaff2011-03-161-2/+0
| | | | | | I've never heard of anyone actually using controller discovery. It adds a great deal of code to the source tree, and a little bit of complication to ofproto, so this commit removes it.
* Support vlan_group workaround implemented in XenServer kernels.Ben Pfaff2011-03-163-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Linux network drivers support a feature called "VLAN acceleration", associated with a data structure called a "vlan_group". A vlan_group is, abstractly, a dictionary that maps from a VLAN ID (in the range 0...4095) to a VLAN device, that is, a Linux network device associated with a particular VLAN, e.g. "eth0.9" for VLAN 9 on eth0. Some drivers that support VLAN acceleration have bugs that fall roughly into the following categories: * Some NICs strip VLAN tags on receive if no vlan_group is registered, so that the tag is completely lost. * Some drivers size their receive buffers based on whether a vlan_group is enabled, meaning that a maximum size packet with a VLAN tag will not fit if a vlan_group is not configured. * On transmit some drivers expect that VLAN acceleration will be used if it is available (which can only be done if a vlan_group is configured). In these cases, the driver may fail to parse the packet and correctly setup checksum offloading and/or TSO. The correct long term solution is to fix these driver bugs. To cope until then, we have prepared a patch to the Linux kernel network stack that works around these problems. This commit adds support for the workaround implemented by that patch. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* xenserver: dbcache should always exist so don't bother checking.Ben Pfaff2011-03-141-23/+0
| | | | | | | | | | | Open vSwitch introduced the on-disk database cache a long time ago. Since then, Citrix has integrated it upstream into XenServer's interface-reconfigure and even into their installer. OVS no longer supports XenServer before 5.6.100, so it is no longer necessary to check for and create the database cache if it isn't there. Signed-off-by: Ben Pfaff <blp@nicira.com> Bug #3388.
* xenserver: Don't touch /etc/xensource/network.conf on upgrade.Andrew Evans2011-03-101-3/+3
| | | | | | | | | | The post-install script for the openvswitch userspace package always sets the bridge type to 'vswitch'. If someone reconfigures XenServer to use the Linux bridge instead, then upgrades Open vSwitch, their system will revert to using Open vSwitch as the bridge. Reported-by: Michael Mao <mmao@nicira.com> Bug #4825.
* ovsdb: Implement garbage collection.Ben Pfaff2011-03-101-1/+12
|
* xenserver: Delete Bridge when creating vlan.Ethan Jackson2011-03-101-0/+4
| | | | | | | | | Commit 34edeccfd8d4273844d12c85fe38ec47002c47cd removed a workaround which still applies to XenServer versions older than 5.5. This could causes creation of vlans to fail in some cases. CC: "David Tsai" <dtsai@nicira.com> Bug #4877.
* xenserver: Remove other_config option for setting controller.Justin Pettit2011-03-091-9/+1
| | | | | | | | | Since XenServer 5.6, "vswitch_controller" has been a first-class key for setting the Open vSwitch controller. Prior to that, we stored it in "other_config". Since we no longer support such old versions, we can remove references to the "other_config" option. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* xenserver: Add support for disabling in-band management via XAPI.Andrew Evans2011-02-284-1/+65
| | | | | | | | | Allow users or applications to enable or disable in-band management of individual bridges by setting the 'vswitch-disable-in-band' key in the 'other_config' attribute of the corresponding network to 'true' or 'false'. Bug #4749.
* ovs-kill: Remove.Ben Pfaff2011-02-231-2/+0
| | | | | | | This utility isn't used anywhere (except INSTALL.Linux), so remove it. Signed-off-by: Ben Pfaff <blp@nicira.com> Coverity #10708.
* xenserver: Split kernel/userspace into separate RPMs for supplemental packs.Andrew Evans2011-02-181-11/+33
| | | | | | | | | | | | | | | | | | | XenServer has the concept of a "supplemental pack", which is just a collection of RPMs rolled into an ISO image for installation as a unit, either during XenServer installation or later as an update. The script used to build supplemental packs requires that a single RPM not mix kernel and userspace components. It also enforces a particular naming scheme for kernel module RPMs. This commit modifies the OVS RPM spec file to create separate RPMs in accordance with these conventions. In an attempt to ensure that the userspace and kernel module packages are both present and compatible, the kernel package provides a fictitious capability, openvswitch_mod.ko.0, and the userspace package requires that capability. If a future change breaks backward compatibility between userspace and kernel, we'll increment the numeric suffix, preventing mismatched installs. Reviewed by Ben Pfaff.
* xenserver: Revert only the XenServer scripts no longer replaced by OVS.Andrew Evans2011-02-181-29/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Commit d66880ee (xenserver: Clean up /usr/sbin/brctl dangling symlink.) attempted to revert the original XenServer-shipped versions of scripts replaced by OVS during an RPM upgrade, but the logic was incorrect. It assumed that %postun of the package being replaced was run before the %post of the new version replacing it. The reverse is actually true. Make upgrade and erase cases both work correctly by simply checking whether any of the files ever replaced in any OVS version are dangling symlinks, and if so, attempt to copy the saved XenServer original back to its rightful place. In the upgrade case, if the newly-installed version of OVS lacks any of the scripts in the previous version, those will be reverted. In the erase case, none of the OVS replacements will exist, so they will all be dangling symlinks and will all be reverted. Furthermore, replace any dangling symlink from /usr/sbin/xen-bugtool to the now-nonexistent OVS replacement (caused by commit 92dbd5c9 (xenserver: Replace customized xen-bugtool with plugin to collect qdisc info.)). Lastly, prevent accidental reversion of files replaced by OVS during rpm -U (also caused by commit 92dbd5c9). Bug #4696.
* ovsdb: Remove 'managers' column from 'Open vSwitch' table.Andrew Evans2011-02-182-2/+2
| | | | | | | | 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: Replace customized xen-bugtool with plugin to collect qdisc info.Andrew Evans2011-02-156-1684/+70
| | | | | | | | | | | | | | | | XenServer RPMs have installed a modified /usr/sbin/xen-bugtool that is identical to upstream except for an additional command to collect tc qdisc class configuration for each network interface. Since xen-bugtool has an extension mechanism, use that instead of maintaining a parallel patched xen-bugtool. This does change the content of the bug report slightly. Instead of one file per network interface, qdisc class info for all interfaces is written to one file. This is an artifact of the xen-bugtool extension mechanism: a single extension command's output must go to one file, and it is impractical to create individual <command> tags for each interface dynamically. Reviewed by Ben Pfaff.
* xenserver: Clean up /usr/sbin/brctl dangling symlink.Andrew Evans2011-02-141-31/+38
| | | | | | | | | | | | | | | Commit 54f16a10 removed Open vSwitch's /usr/sbin/brctl replacement for XenServer, but because the RPM doesn't restore the original files on upgrade, an upgrade leaves /usr/sbin/brctl a broken symlink to the removed /usr/share/openvswitch/scripts/brctl. This commit adds a one-time cleanup to restore the original XenServer-supplied /usr/sbin/brctl. It also changes the RPM to restore all the replaced files with their XenServer originals at post-uninstall time during an upgrade transaction, just as uninstall has done up to now. This should prevent the same problem in the future. Bug #4667.
* xenserver: Remove usr_share_openvswitch_scripts_refresh-xs-network-uuids.Ben Pfaff2011-02-111-9/+0
| | | | | | | | | | | This file is not distributed, which breaks the build with the message: The distribution is missing the following files: xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids Removing it from the repository fixes the problem. Signed-off-by: Ben Pfaff <blp@nicira.com>
* xenserver: Don't create XAPI cache at install.Bob Ball2011-02-111-16/+19
| | | | | | | | | | | | | | | | There are two mechanisms of installing a supplemental pack – one is after installation (using the xe-install-supplemental-pack command) and one is during installation by either creating a new install ISO with the supplemental pack bundled or creating an HTTP directory which serves the install files and the new supplemental pack contents. The RPM should support both methods, but currently attempts to backup data that doesn't exist yet. With this commit, the XAPI cache is not created at install. Signed-off-by: Bob Ball <bob.ball@citrix.com> [removed sourcing /etc/xensource-inventory since it is no longer needed] Signed-off-by: Justin Pettit <jpettit@nicira.com>
* xenserver: Rename ovs-external-ids to ovs-xapi-sync.Justin Pettit2011-02-115-17/+23
| | | | | | | | | 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-1112-302/+21
| | | | | | | | 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: Remove brctl wrapper script.Justin Pettit2011-02-114-149/+2
| | | | | | | | | The OVS "brctl" wrapper script was added to aid Citrix's QA and help XenCenter display link status and statistics of bridges. Since the Citrix integrated OVS ships without this wrapper script, it's clearly no longer needed in the versions of XenServer we now support. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* xenserver: Merge upstream changes and drop pre-5.6.100 support.Andrew Evans2011-02-117-121/+126
| | | | | | | | | | | | | | | Citrix have made modifications to the various interface configuration scripts that OVS replaces, so at present those modifications are lost when OVS is installed on e.g. XenServer 5.6.100. This commit applies those changes while preserving OVS-specific modifications that have been made in the interim. One major change introduced by these updates is the removal of support for XenServer releases prior to 5.6.100. This commit also updates the OVS-supplied xen-bugtool in similar fashion. We will soon remove xen-bugtool from OVS altogether and move the added OVS functionality to an XML extension as described in the Supplemental Pack DDK guide.
* xenserver: Set fail_mode on internal bridges.Ethan Jackson2011-02-091-11/+42
| | | | | | | | | The fail_mode was not getting set on internal bridges. This commit forces ovs-external-ids to automatically set fail_mode on all new bridges. Signed-off-by: Ethan Jackson <ethan@nicira.com> Bug #4494.
* xenserver: Introduce "force-reload-kmod" to reload kernel module.Ben Pfaff2011-02-082-1/+52
| | | | | | | | | | 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: Make openvswitch-cfg-update reset 'manager_options' column.Andrew Evans2011-02-081-6/+4
|
* xenserver: Display managers referenced by 'manager_options' in xsconsole.Andrew Evans2011-02-081-2/+1
|
* xenserver: Consistently use spaces instead of tabs in init script.Justin Pettit2011-02-071-11/+11
|
* xenserver: Allow LACP configuration from xapi.Ethan Jackson2011-02-033-6/+26
| | | | | | | | | Makes required changes to interface reconfigure to allow LACP configuration from xapi. Conforms to XenServer style bonding configuration which is slightly different from OVS. Signed-off-by: Ethan Jackson <ethan@nicira.com> Bug #4213.
* xenserver: Make ovsdb-server look for remotes in manager_options column.Andrew Evans2011-02-022-2/+2
| | | | | (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: Support fail_mode override at network level.Ethan Jackson2011-01-263-13/+48
| | | | | | | This patch allows the Pool object's vswitch-controller-fail-mode setting to be overridden on by Network object. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* xenserver: Change all bridge's fail_mode when updating.Ethan Jackson2011-01-241-9/+2
| | | | | | | | | The ovs plugin's update command was only setting fail_mode for bridges attached to pifs. This patch applies the fail_mode setting to all bridges on the XenServer system. Reported-by: David Tsai <dtsai@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com>
* xenserver: Fix interface reconfigure crash when setting fail_mode.Ethan Jackson2011-01-191-1/+1
| | | | | Interface reconfigure can crash when setting fail_mode if an expected other_config setting is not set.
* xenserver: Allow NULL pool in configuration cache.Ethan Jackson2011-01-192-2/+7
| | | | | | | | | InterfaceReconfigure assumes the pool is in the configuration cache. This is always true except when upgrading from an older version of openvswitch which does record the pool. This can cause upgrades to lock up. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* xenserver: Allow fail_mode to be set from xapi.Ethan Jackson2011-01-183-3/+73
| | | | | | | | This commit allows xapi to set the fail mode through the vswitch-controller-fail-mode other-config setting in the Pool object. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* xenserver: Allow unknown other-config attributes.Ethan Jackson2011-01-181-3/+4
| | | | | | | | | | When saving the database cache, InterfaceReconfigure can crash if unexpected attributes are in an object's other-config column. This commit causes it to skip that attribute and log a warning. Signed-off-by: Ethan Jackson <ethan@nicira.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Dominic Curran <Dominic.Curran@citrix.com>
* xenserver: Add miimon configuration support for xenserver.Ethan Jackson2011-01-121-0/+16
| | | | | | | | This commit makes necessary changes to Interface Reconfigure to allow miimon bond-detect-mode and bond-miimon-interval to be changed using xapi. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* xenserver: Allow bond_mode configuration in xen.Ethan Jackson2011-01-111-0/+6
| | | | | | | This commit adds bond_mode configuration to Interface Reconfigure so that it may be changed using standard XenServer commands. Signed-off-by: Ethan Jackson <ethan@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-072-1/+19
| | | | | | | | | | | 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>