| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
/proc/slabinfo gives information about memory usage
as slab level and can be used to diagnose memory issues
on memory-limited systems
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This utility isn't used anywhere (except INSTALL.Linux), so remove it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Coverity #10708.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
(ovsdb-server will still use any managers found in the managers column as
well.)
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Interface reconfigure can crash when setting fail_mode if an
expected other_config setting is not set.
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 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>
|