aboutsummaryrefslogtreecommitdiff
path: root/xenserver
AgeCommit message (Collapse)Author
2010-01-25xenserver: Update interface-reconfigure and vif integration scripts.Ian Campbell
This patch updates the versions of the host integration scripts to what is present in the recent XCP update and the next release of XenServer (5.6). I think it probably works on 5.5 as well but I haven't verified that. These new versions support runtime selection of the Linux bridging vs vswitch through the toolstack. The patch includes the necessary reconfiguration (rewriting /etc/xensource/network.conf) to enable vswitch in the RPM %post stage. The RPM spec file integration is only lightly tested, seems to work for me. This commit is as provided by Ian Campbell, with a few minor tweaks: - Updated xenserver/automake.mk to distribute the added files. - Updated RPM spec file not to complain if the added files do not already exist (since they do not exist on XenServer 5.5.0). - Change location of dbcache back to /var/lib/openvswitch/dbcache so that this can coexist with our other internal builds. (Undoubtedly we will have to adopt the new location chosen by Ian eventually, however.)
2010-01-04xenserver: Fix small typo in vswitch-xapi-updateJustin Pettit
2009-12-17initscript: pass complete path to pidfile to status commandBen Pfaff
Older versions of RHEL/CentOS used pifof in preference to the pidfile and hence we got away with passing just the basename instead of including the full path. Using pidof first doesn't make much sense and this was fixed in RHEL 5 update 4 (see https://bugzilla.redhat.com/show_bug.cgi?id=440658) This means that on RHEL 5.4 "service vswitch status" always returned "ovs-vswitchd is stopped" even if it was running. Fix this issue by passing in the correct pidfile name. Cross-port of Ian Campbell's commit d1c8c9e4 on xs5.7 branch.
2009-11-18Merge citrix branch into master.Ben Pfaff
2009-11-13xenserver: interface-reconfigure and vif hotplug relicensing.Ian Campbell
As part of the Open Sourcing of xapi (the XenServer toolstack) via the XenCloud project (announcement in [0]). The upstream versions of interface-reconfigure and the vif hotplug script have been re-licensed under an LGPL v2.1 + exception license. The exception applies to other files in the upstream repository and doesn't particularly make sense for these scripts but it is included to maintain the uniformity of the license for the upstream repository. This patch synchronises the licenses headers on those scripts with the upstream version. Since those headers refer to a file called LICENSE in the upstream repository I have included a copy here, slightly modified to indicate precisely which files it applies to. Git shows[1] that only myself and Nicira employees have made modifications to these scripts in the openvswitch repository. The licensing change has been okayed by Keith Amidon on behalf of Nicira. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> [0] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00117.html
2009-11-11mirroring: Preserve key for disabling learning.Jesse Gross
Don't delete the key for disabling MAC learning on a given VLAN after a reboot. Also logs when learning is disabled.
2009-11-10Merge citrix branch into master.Jesse Gross
2009-11-09Make ovs-appctl easier to use and synchronize its interface with ovs-vsctl.Ben Pfaff
It is inconvenient to type the whole path to the Unix daemon socket when using ovs-appctl. Allow the name of the daemon to be used instead when a pidfile exists in the default location, and contact ovs-vswitchd by default. Also, the various options for manipulating vlog were invented before the general-purpose command mechanism existed. Get rid of all of the action options in favor of just specifying the command to be executed as non-option arguments. Finally, there simply wasn't much value in allowing multiple targets or options to be specified; these variations were never used in practice. So simplify the interface by making it one target, one action per invocation. Also, make ovs-vsctl use the same syntax for its --target option. Based on work by Justin Pettit.
2009-11-03xenserver: Fix issue with deleting network UUID on VLAN destructionJustin Pettit
In XenServer, a VLAN is considered an additional network with its own UUID. The interface-reconfigure script properly adds this network UUID to the configuration script, but commit 774428 removed the code that would remove this information on VLAN destruction. Ian Campbell was the author of that commit and felt that reverting this part was safe. Bug #1973
2009-10-30dump-vif-details: Safeguard 'finally' codeReid Price
This makes several minor streamlining changes to dump-vif-details, and moves the try statement in dump_vif_info to exclude session initialization, so that finally will not obscure the original exception with a new exception related to the session variable when logins fail.
2009-10-28xenserver: Print program name on error in dump-vif-detailsJustin Pettit
2009-10-22Merge "citrix" into "master".Ben Pfaff
This merge took a little bit of care due to two issues: - Crossport of "interface-reconfigure" fixes from master back to citrix that had happened and needed to be canceled out of the merge. - New script "refresh-xs-network-uuids" added on citrix branch that needed to be moved from /root/vswitch/scripts to /usr/share/vswitch/scripts.
2009-10-19xen: Restore state files for VIF VLANsJesse Gross
A change on master to use ovs-vsctl instead of state files for VLANs was ported to the citrix branch, which does not have ovs-vsctl. The interface reconfigure portion, which does not store the state files was ported but the vif-hotput script portion was not. This restores interface reconfigure to again save the state files. Bug #2187
2009-10-19xen: Correctly write VLAN key in config file.Jesse Gross
When adding the VLAN key the name of the vif was from a variable in use on only the xs5.7 branch. This uses the correct variable name for the master branch
2009-10-08xenserver: Crossport "master" interface-reconfigure to "citrix".Ben Pfaff
This commit copies the interface-reconfigure script from "master" into "citrix" and fixes up a few incompatibilities: the location of ovs-cfg-mod, which in master is in /usr/bin and in citrix is in /root/vswitch/bin, and the RPM spec file fragments needed to initialize the database cache. The purpose of this commit is to obtain the bug fixes that have been applied (mainly by Ian Campbell) to "master" but which are not in "citrix". It's difficult to understand the changes from this commit alone. It is more meaningful to compare the resulting files against those currently on the master branch.
2009-10-07xenserver: Fix ovs-vsctl in built RPM by defining /etc as sysconfdir.Ben Pfaff
By default, the "configure" script picks a sysconfdir of $prefix/etc, which works out to /usr/etc in our case. That's wrong, of course--it should be /etc--but we didn't notice until now because sysconfdir was only used in ovs-vsctl, which in turn wasn't used at all on a XenServer system until recently. This bug is present on all branches, but it is only potentially visible on "master" and "xs5.7", since only those have ovs-vsctl. It is only actually visible on "xs5.7", since that is the only branch where the system uses ovs-vsctl itself (from /etc/xensource/scripts/vif), but this is being committed to master in case we start using ovs-vsctl there too. Reported-by: Henrik Amren <henrik@nicira.com>
2009-10-06Merge commit 'v0.90.6' into citrixJustin Pettit
2009-10-06xenserver: Fix dbcache location for xen-bugtoolJustin Pettit
I forgot to add my local changes to xen-bugtool that reflected the new location for dbcache.
2009-10-06Merge commit 'origin/citrix'Justin Pettit
2009-10-05xenserver: Include dbcache in xen-bugtool outputJustin Pettit
It has been pointed out that it would be useful to have a copy of the dbcache file in the bug report. This adds that. Bug #2106
2009-10-05Merge "citrix" branch into "master.Ben Pfaff
2009-10-05xenserver: use ovs-vsctl for VIF VLANs instead of separate state filesIan Campbell
ovs-vsctl did not exist when this code was originally written, but it provides exactly what is needed to get rid of those separate state files. The vif hotplug script diff is against the xs5.7 branch but I think is applicable to master and/or citrix with just context changes. I was thinking of using ovs-vsctl exclusively for configuration modifications from the vif hotplug script but that would need a mechanism to pass the additional vif details to ovs-vsctl add-port as well as perhaps making the bridge optional to del-port. The other option would be to use the --no-reload option and split the config mods into two parts, but I don't like that idea much.
2009-10-05xenserver: Include bridge.*.xs-network-uuids for all networksIan Campbell
Previously I advised that only networks which were currently attached to the host be listed in /etc/ovs-vswitchd.conf. However I've just realised that this interacts badly with the slightly ugly special case used for PIF.currently-attached when reading from dbcache instead of talking to Xapi. This bites on boot when /etc/init.d/management-interface tries to plug a selection of PIFs which are deemed to be somehow required by xapi. (not helped by a bug in XenServer 5.7.0 which can cause this list to be larger than it should be and not internally consistent). For now I think it prudent to simply list all networks which could potentially be attached to a given datapath, until I can figure out what the sane fix is on the XenServer end. (I think there are two options for a proper fix, either inspect the current state of the network devices or assume dbcache represents the desired final state after devices are plugged on boot. I'm leaning towards the later since the dbcache should indicate the set of PIFs which were attached on shutdown, which xapi will likely be trying to replug on boot... Needs more thought though).
2009-10-02xenserver: Rework interface-reconfigure.Ian Campbell
Substantially reworks interface-reconfigure, with the following fixes: * Create and use ifcfg files only for ipdev, use vswitch configuration for topology setup. * Take care over moving from bond to slave and back to tear down any residual sibling devices * Take care to leave datapath present when manipulating VLANs to avoid interrupting traffic on the slave PIF as well as other VLANs. * Lots of minor stuff
2009-10-02xenserver: Clear vlan.* from /etc/ovs-vswitchd.conf on boot tooIan Campbell
2009-10-02Correct whitespace in xenserver/etc_init.d_vswitchIan Campbell
2009-10-01xenserver: Clear stale configuration keys on boot, but not on later startsBen Pfaff
2009-10-01xenserver: Clear stale configuration keys on bootIan Campbell
2009-10-01xenserver: Clear stale configuration keys on boot, but not on later startsBen Pfaff
2009-10-01xenserver: Clear stale configuration keys on bootIan Campbell
2009-09-30xenserver: In xsconsole plugin, log via XSConsoleLog module.Ben Pfaff
Part of a patch from Ian Campbell <ian.campbell@citrix.com>.
2009-09-30Drop separate vswitch-cfg-update.log.Ian Campbell
xapi will log any error returned by the plugin.
2009-09-28xenserver: Add script refresh-xs-network-uuids.Ben Pfaff
On pool join, the bridge.<bridge>.xs-network-uuids key is not updated properly for the primary management interface. We don't have a proper fix for this problem yet, and probably won't ever have one for XenServer 5.5.0, so this commit adds a script that works around the problem. Running the script is a shortcut for rebooting the XenServer host, which should also solve the problem. Bug #2097.
2009-09-22Merge citrix branch into master.Ben Pfaff
2009-09-17xenserver: Synchronize interface-reconfigure from Citrix.Ian Campbell
* Drop "--test-mode" option -- it was never wired up to anything. * Add some additional checks for valid parameter combinations * Raise some errors for unimplemented (but not currently used in XenServer) options.
2009-09-17xenserver: Remove vswitch dbcache file during RPM uninstall.Ben Pfaff
It's good to clean up. Ported from "citrix" to "master" branch with file name updated. CC: Keith Amidon <keith@nicira.com> CC: Henrik Amren <henrik@nicira.com>
2009-09-17xenserver: Drop "init-dbcache" by making PIF optional for "rewrite".Ben Pfaff
Commit ac9634f0af "xenserver: Make RPM install work again" introduced a new command "init-dbcache" for the interface-reconfigure script. However it is cleaner to simply make the PIF argument to the "rewrite" command optional. CC: Ian Campbell <Ian.Campbell@citrix.com>
2009-09-16xenserver: Remove vswitch dbcache file during RPM uninstall.Ben Pfaff
It's good to clean up. CC: Keith Amidon <keith@nicira.com> CC: Henrik Amren <henrik@nicira.com>
2009-09-16create/remove /var/lock/subsys/vswitch on initscript start/stopIan Campbell
A lock file in /var/lock/subsys must be created with the same name as the initscript in order for the stop action to be automatically called on runlevel change. This is true at least on Red Hat derived systems such as XenServer where /etc/rcS contains: # First, run the KILL scripts. for i in /etc/rc$runlevel.d/K* ; do check_runlevel "$i" || continue # Check if the subsystem is already up. subsys=${i#/etc/rc$runlevel.d/K??} [ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \ || continue ... (This could potentially expose bugs e.g. in the stop priority for the script since I think it is likely that the stop action hasn't been running to now. I haven't closely considered this case yet but vswitch is currently scheduled at K91vswitch vs K90network which seems correct at first glance)
2009-09-15xenserver: Fix detection of xs-network-uuids in interface-reconfigure.Ben Pfaff
Commit c798b21c6a "xenserver: Only consider the host we are running on in interface-reconfigure" dropped the get_pifs_by_record function in favor of get_pifs_by_device, but didn't adapt callers properly, so that the XenServer network PIFs weren't properly found and thus the xs-network-uuids keys weren't set correctly. This fixes the caller. Bug #2043.
2009-09-14New utility ovs-vsctl.Ben Pfaff
2009-09-12xenserver: Have xen-bugtool collect OVS logsJustin Pettit
The original xen-bugtool did not collect any OVS logs. Now that more logging is moving from /var/log/messages to ovs-vswitchd's and ovs-brcompatd's private log files, we should include them in the information collected for bug reports.
2009-09-12Merge commit 'origin/citrix'Justin Pettit
Conflicts: vswitchd/ovs-vswitchd.8.in vswitchd/ovs-vswitchd.conf.5.in xenserver/etc_init.d_vswitch
2009-09-11xenserver: Have ovs-brcompatd's log file rotatedJustin Pettit
Suggested by Ian Campbell.
2009-09-11xenserver: Install kernel modules in proper system locations.Ben Pfaff
This gets rid of the last files in /root/vswitch. With this change, the Open vSwitch RPMs should now comply with FHS (http://www.pathname.com/fhs/).
2009-09-11xenserver: Install into /usr instead of /root/vswitch.Ben Pfaff
/usr is the standard location for installation, so use that instead of our nonstandard location under /root. This migrates everything except the kernel modules to /usr. The kernel modules will be migrated in an upcoming commit. One possibly surprising change is that the manpages listed in the %files section of vswitch-xen.spec not only moved but added .gz extensions. This seems to be because RPM automatically compresses manpages, but only if they are installed in a standard system location.
2009-09-11xenserver: Make RPM install work again.Ben Pfaff
The RPM install was generating a database cache in Python pickle format in /etc/ovs-vswitchd.conf, but interface-reconfigure was looking for it in XML format in /var/lib/openvswitch/dbcache. This fixes the problem, by adding an init-dbcache command to interface-reconfigure and then using that at RPM install time. This moves the database cache creation from %pre to %post. This is necessary so that interface-reconfigure is available from the install script.
2009-09-11xenserver: Remove dead store from interface-reconfigure.Ben Pfaff
No point in looking up pifrec if we're not going to use it.
2009-09-11xenserver: Remove unmaintained comments in interface-reconfigure.Ben Pfaff
I added these comments a long time ago and have not kept them up-to-date, so it is probably better to delete them than to confuse people.
2009-09-11xenserver: Fix syntax error in vswitch-xen.spec %pre fragment.Ben Pfaff