]> xenbits.xensource.com Git - xcp/xen-api.git/log
xcp/xen-api.git
14 years ago'make doc' now removes the need for the rebuild-doc script.
Rok Strnisa [Wed, 14 Jul 2010 15:43:31 +0000 (16:43 +0100)]
'make doc' now removes the need for the rebuild-doc script.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoRemoves the need for the rebuild script.
Rok Strnisa [Wed, 14 Jul 2010 15:43:30 +0000 (16:43 +0100)]
Removes the need for the rebuild script.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years ago[PATCH] interface-reconfigure: Handle CHIN Tunnel objects
Ian Campbell [Wed, 14 Jul 2010 15:43:30 +0000 (16:43 +0100)]
[PATCH] interface-reconfigure: Handle CHIN Tunnel objects

From 92e906e484fac90d5c5618f2bca33f595ad2e390 Mon Sep 17 00:00:00 2001
Date: Wed, 23 Jun 2010 09:18:57 +0100
Only the vswitch backend is able to implement CHIN.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Dominic Curran <dominic.curran@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   48 +++++++++++++++++--
 ...xensource_libexec_InterfaceReconfigureBridge.py |    3 +
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   11 ++++-
 .../opt_xensource_libexec_interface-reconfigure    |    2 +
 4 files changed, 57 insertions(+), 7 deletions(-)

14 years agoTunnelling: do not allow transport PIFs to be destroyed
Rob Hoes [Wed, 14 Jul 2010 15:43:29 +0000 (16:43 +0100)]
Tunnelling: do not allow transport PIFs to be destroyed

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: unplugging a tunnel transport PIF also unplugs the access PIF
Rob Hoes [Wed, 14 Jul 2010 15:43:29 +0000 (16:43 +0100)]
Tunnelling: unplugging a tunnel transport PIF also unplugs the access PIF

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: synchronise tunnels with the pool master when a slave starts up
Rob Hoes [Wed, 14 Jul 2010 15:43:28 +0000 (16:43 +0100)]
Tunnelling: synchronise tunnels with the pool master when a slave starts up

Just like for bonds and VLANs, tunnels should be synchronised with the pool master and all pool slaves. This code ensure that tunnels are synchronised when xapi starts up on a slave, which is especially important after a pool join.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoVSwitch controller field may be blank on pool join
Rob Hoes [Wed, 14 Jul 2010 15:43:28 +0000 (16:43 +0100)]
VSwitch controller field may be blank on pool join

If the pool.vswitch_controller field is blank on a joining host, but not on the pool, the join is allowed. The openvswitch in the joining host will be controlled by the pool's controller.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: error handling
Rob Hoes [Wed, 14 Jul 2010 15:43:27 +0000 (16:43 +0100)]
Tunnelling: error handling

Raise appropriate exceptions in tunnel.create, VLAN.create, and PIF.plug.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: creation and destruction of tunnels
Rob Hoes [Wed, 14 Jul 2010 15:43:27 +0000 (16:43 +0100)]
Tunnelling: creation and destruction of tunnels

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: add CLI support (xe tunnel-...)
Rob Hoes [Wed, 14 Jul 2010 15:43:26 +0000 (16:43 +0100)]
Tunnelling: add CLI support (xe tunnel-...)

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoTunnelling: add datamodel objects
Rob Hoes [Wed, 14 Jul 2010 15:43:26 +0000 (16:43 +0100)]
Tunnelling: add datamodel objects

This includes a new "tunnel" class and fields in the PIF class to link PIFs to tunnels.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoAdd optional compression to VM exports. Both compressed and uncompressed formats...
David Scott [Wed, 14 Jul 2010 15:36:41 +0000 (16:36 +0100)]
Add optional compression to VM exports. Both compressed and uncompressed formats can be imported as normal since the format is auto-detected.

Design notes on the wiki: http://wiki.xensource.com/xenwiki/Compressing_VM_exports

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoFix the source manifest generation by using a simple shell script to scan the SRPMS...
David Scott [Mon, 12 Jul 2010 07:32:58 +0000 (08:32 +0100)]
Fix the source manifest generation by using a simple shell script to scan the SRPMS, rather than a hideous make/shell fragment.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoI placed the hooks at the end of each action. I didn't go as far as
Ian Campbell [Thu, 8 Jul 2010 15:28:43 +0000 (16:28 +0100)]
I placed the hooks at the end of each action. I didn't go as far as
{pre,post}x{join,eject} but could do if that is desirable.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agoSome minor improvements to the with-vdi script
Zheng Li [Wed, 16 Jun 2010 15:26:42 +0000 (16:26 +0100)]
Some minor improvements to the with-vdi script

- return the user command's exit code as the exit code of with-vdi script (unless something else failed in the preparation or post run steps)
- relax the requirement on the user command parameter, both absolute paths and in-paths executables are acceptable
- allow a user command to have its own arguments (i.e. with-vdi vdi-uuid user-command arg1 arg2 ... argn)

Signed-off-by: Zheng Li <dev@zheng.li>
15 years agoCA-38567: Catch I/O errors during VM.suspend
Daniel Stodden [Mon, 15 Mar 2010 09:22:23 +0000 (09:22 +0000)]
CA-38567: Catch I/O errors during VM.suspend

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoCoalesce RHEL/CentOS/OEL 5.x templates into one template per distro per arch
Alex Zeffertt [Thu, 8 Jul 2010 13:54:31 +0000 (14:54 +0100)]
Coalesce RHEL/CentOS/OEL 5.x templates into one template per distro per arch

Create 6 new templates (RHEL,CentOS,OEL)*(i386,x86_64) that can be used to
install 5.x point release.

For now we leave the old templates in place to prevent a failure in the
regression testing.  However, when XenRT has been updated to use the new
templates we shall remove the old ones.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoAdd templates for Debian Squeeze
Alex Zeffert [Thu, 8 Jul 2010 13:53:21 +0000 (14:53 +0100)]
Add templates for Debian Squeeze

Signed-off-by: Alex Zeffert <alex.zeffertt@eu.citrix.com>
14 years agoAdd templates for SLES 11 SP1
Alex Zeffert [Thu, 8 Jul 2010 13:52:32 +0000 (14:52 +0100)]
Add templates for SLES 11 SP1

Signed-off-by: Alex Zeffert <alex.zeffertt@eu.citrix.com>
14 years agoThe option for encrypting VM migration.
Rok Strnisa [Thu, 8 Jul 2010 13:51:03 +0000 (14:51 +0100)]
The option for encrypting VM migration.

EXAMPLE USE:
xe vm-migrate encrypt=true ...

Default is false.

DEPENDENCY:
This patch depends on the 'stdext-improved' patch in the xen-api-libs.hg.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoImprove import of networks/VIFs on pool join
Rob Hoes [Thu, 8 Jul 2010 13:50:44 +0000 (14:50 +0100)]
Improve import of networks/VIFs on pool join

Metadata export+import is used to recreate VIFs on the pool, when a host joins. VIFs are linked to networks on the receiving pool by matching the name_label of the network on the two pools. If the name_label does not exist, this has to be because an existing physical network on the receiving pool is used; in this case, we match on bridge name. This is a sensible fall-back option for imports in general.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoImprove network recreation on pool join
Rob Hoes [Thu, 8 Jul 2010 13:47:51 +0000 (14:47 +0100)]
Improve network recreation on pool join

When joining a new host to a pool:
* Networks of physical interfaces are copied to the pool's DB if they do not yet exists; matching is done based on the bridge name (xenbr0, xenbr1, ...).
* All other networks are recreated on the pool. The bridge (xapi0, xapi1, ...) is renamed such that it is unique on the pool. All other network fields are copied from the host's network object.

(related to CA-39461)

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoReduce the min,max_verstring to 1.7, 1.7
David Scott [Thu, 8 Jul 2010 13:43:16 +0000 (14:43 +0100)]
Reduce the min,max_verstring to 1.7, 1.7

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoPR-1098: Add templates for RHEL 5.5 based distros
Alex Zeffertt [Thu, 8 Jul 2010 13:40:25 +0000 (14:40 +0100)]
PR-1098: Add templates for RHEL 5.5 based distros

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoAdd template for Ubuntu 10.04
Alex Zeffertt [Thu, 8 Jul 2010 13:39:32 +0000 (14:39 +0100)]
Add template for Ubuntu 10.04

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
14 years agoMove the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocaml...
Jon Ludlam [Thu, 8 Jul 2010 13:39:04 +0000 (14:39 +0100)]
Move the netdev library from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
14 years agovfi hotplug: drop support for XS 5.5.0 from vswitch functionlity.
David Scott [Thu, 8 Jul 2010 13:35:14 +0000 (14:35 +0100)]
vfi hotplug: drop support for XS 5.5.0 from vswitch functionlity.

This was imported from the vswitch tree (which wants to work on XS
5.5.0) for ease of import but back them out here.

14 years agovswitch: pass network uuid to vswitch when creating an internal network
Ian Campbell [Thu, 8 Jul 2010 13:35:13 +0000 (14:35 +0100)]
vswitch: pass network uuid to vswitch when creating an internal network

For external networks this is taken care of by interface-reconfigure
but in the internal network case there is currently no callout so
simply pass the network uuid when creating calling out to create the
bridge.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years ago[PATCH] xenserver: Avoid errors from ovs-vsctl at system shutdown.
Ben Pfaff [Thu, 8 Jul 2010 13:33:34 +0000 (14:33 +0100)]
[PATCH] xenserver: Avoid errors from ovs-vsctl at system shutdown.

From ab32de001f10ddcb119360744c078ed9c1aebb06 Mon Sep 17 00:00:00 2001
Date: Fri, 25 Jun 2010 13:57:22 -0700
Commit 823c5699 "interface-reconfigure: callout to datapath backend class
method on rewrite" changed "interface-reconfigure rewrite" to update
bridge external-ids in the vswitch database.  But this had the side effect
of causing errors at system shutdown, since ovsdb-server gets shut down
before the rewrite action is called.  This commit fixes the problem by
skipping the update if the database socket does not exist.  (It's just
fine to skip the update, since the external-ids will be re-set the next
time the system boots anyhow.)

This commit fixed the problem on 5.6.810-34773p for me.  I don't see the
problem at all on 5.5.0.  Presumably system shutdown order has changed.

NIC-136.

CC: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Dominic Curran <dominic.curran@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

14 years ago[PATCH] xenserver: Kill bond master's dhclient when bringing up bond slave.
Ben Pfaff [Thu, 8 Jul 2010 13:33:26 +0000 (14:33 +0100)]
[PATCH] xenserver: Kill bond master's dhclient when bringing up bond slave.

From fe19e820e4e543ee29b1b159be8ef8ee03947650 Mon Sep 17 00:00:00 2001
Date: Mon, 28 Jun 2010 10:34:10 -0700
interface-reconfigure is never explicitly called to down a bond master.
However, when it is called to up a slave it is implicit that we are
destroying the master.  The "bridge" version of interface-reconfigure
always "ifdown"s the bond master in such a case, but until now the
"vswitch" version has not done so.  Usually, it doesn't matter, because
the bond master network device disappears when the slave is brought up,
but one case was missed: for a bond master with an IP address obtained
via DHCP, the dhclient process needs to be killed, and we were not doing
it.  This commit starts doing it (by invoking ifdown on the bond master).

The dhclient process that hangs around doesn't cause problems until the
bond master is brought back up, at which point "ifup" fails because it
refuses to start another dhclient for the same interface.

The converse behavior is also important; that is, when a bond PIF is
brought up, interface-reconfigure is expected to implicitly take down its
slave PIFs.  My testing (on 5.5.0) shows that this behavior is already
correct.  At any rate, this commit does not change that behavior.

Bug #2668.
Bug #2734.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Dominic Curran <dominic.curran@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

14 years ago[PATCH] interface-reconfigure: callout to datapath backend class method on rewrite
Ian Campbell [Thu, 8 Jul 2010 13:33:23 +0000 (14:33 +0100)]
[PATCH] interface-reconfigure: callout to datapath backend class method on rewrite

From 823c5699d4de7bf726f988e1ca6197fb2400f388 Mon Sep 17 00:00:00 2001
Date: Fri, 4 Jun 2010 16:39:10 +0100
Use this mechanism to allow the vswitch backend to update the vswitch
configuration's mapping from datapath to XenAPI datamodel Network
UUIDs. The vswitch needs a mechanism to update these when they change
(i.e. on pool join and eject).

Refactor the DatapathFactory method to return the class which the
caller can instantiate or not as the require.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Dominic Curran <dominic.curran@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   12 +++++++++---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   11 +++++++++++
 .../opt_xensource_libexec_interface-reconfigure    |    9 ++++++---
 3 files changed, 26 insertions(+), 6 deletions(-)

14 years ago[PATCH] xenserver: Clean-up space/tabs issues in vif script
Justin Pettit [Thu, 8 Jul 2010 13:32:33 +0000 (14:32 +0100)]
[PATCH] xenserver: Clean-up space/tabs issues in vif script

From 291a0f6b6e05fe5be28b935436abb5a958334885 Mon Sep 17 00:00:00 2001
Date: Wed, 21 Apr 2010 03:53:22 -0700
Our vif script had a mishmash of tab and space indentations.  The
original vif script only uses spaces, so I went with that style.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |  172 +++++++++++++++++-----------------
 1 files changed, 86 insertions(+), 86 deletions(-)

14 years ago[PATCH] xenserver: Set internal network-uuids in Bridge table on XS5.5
Justin Pettit [Thu, 8 Jul 2010 13:32:32 +0000 (14:32 +0100)]
[PATCH] xenserver: Set internal network-uuids in Bridge table on XS5.5

From 79eb8b002c588e6f7495a0cd73d8a0597a458442 Mon Sep 17 00:00:00 2001
Date: Wed, 21 Apr 2010 03:42:52 -0700
On XenServer 5.5, interface-reconfigure is not called when creating
internal bridges, so we jump through extra hoops to determine the
network UUIDs.  The code that handled this was not properly retrieving
the UUIDs from XAPI, so the field would never be set.  This commit
corrects that.

Bug #2666

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

14 years ago[PATCH] interface-reconfigure+vif: accept openvswitch in /etc/xensource/network.conf
Ian Campbell [Thu, 8 Jul 2010 13:32:32 +0000 (14:32 +0100)]
[PATCH] interface-reconfigure+vif: accept openvswitch in /etc/xensource/network.conf

From aeb2b7a166ec1f7143bd75b01a65ba440cccd88a Mon Sep 17 00:00:00 2001
Date: Thu, 8 Apr 2010 15:00:21 +0100
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif                |    9 +++++----
 .../opt_xensource_libexec_InterfaceReconfigure.py  |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

14 years ago[PATCH] xenserver: strip all alpha-suffixes from the xenserver build number.
Ian Campbell [Thu, 8 Jul 2010 13:32:31 +0000 (14:32 +0100)]
[PATCH] xenserver: strip all alpha-suffixes from the xenserver build number.

From 2c0f11dc7e66e10257ef927574a99d5f888c774c Mon Sep 17 00:00:00 2001
Date: Thu, 1 Apr 2010 10:45:22 +0100
The letter at the end of the build number indicates the site where the build
was done. All publicly released builds come from "p" but within Citrix we have
other suffixes (i.e. in Cambridge we get c).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

14 years ago[PATCH] Cleanup default file locations and XenServer packaging
Justin Pettit [Thu, 8 Jul 2010 13:31:28 +0000 (14:31 +0100)]
[PATCH] Cleanup default file locations and XenServer packaging

From bc39196036f8e33d15274855087f0c47be2095ee Mon Sep 17 00:00:00 2001
Date: Thu, 25 Mar 2010 22:38:13 -0700
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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 INSTALL.Linux                                      |    4 +-
 INSTALL.SSL                                        |    4 +-
 INSTALL.XenServer                                  |   14 +-
 INSTALL.bridge                                     |    2 +-
 debian/openvswitch-switch.init                     |    2 +-
 lib/dirs.h                                         |    4 +-
 lib/unixctl.c                                      |    2 +-
 m4/openvswitch.m4                                  |    5 +-
 utilities/ovs-vsctl.8.in                           |    2 +-
 utilities/ovs-vsctl.c                              |    2 +-
 xenserver/README                                   |   63 ++--
 xenserver/automake.mk                              |   16 +-
 xenserver/etc_init.d_openvswitch                   |  440 ++++++++++++++++++++
 xenserver/etc_init.d_openvswitch-xapi-update       |   54 +++
 xenserver/etc_init.d_vswitch                       |  425 -------------------
 xenserver/etc_init.d_vswitch-xapi-update           |   54 ---
 xenserver/etc_logrotate.d_openvswitch              |   16 +
 xenserver/etc_logrotate.d_vswitch                  |   16 -
 xenserver/etc_profile.d_openvswitch.sh             |   48 +++
 xenserver/etc_profile.d_vswitch.sh                 |   47 --
 .../etc_xapi.d_plugins_openvswitch-cfg-update      |  104 +++++
 xenserver/etc_xapi.d_plugins_vswitch-cfg-update    |  105 -----
 scripts/vif                |    2 +-
 xenserver/openvswitch-xen.spec                     |  370 ++++++++++++++++
 ..._lib_xsconsole_plugins-base_XSFeatureVSwitch.py |   20 +-
 xenserver/usr_sbin_brctl                           |    4 +-
 xenserver/usr_sbin_xen-bugtool                     |   45 +-
 ...share_openvswitch_scripts_refresh-network-uuids |   12 +
 ...sr_share_openvswitch_scripts_sysconfig.template |  234 +++++++++++
 ...usr_share_vswitch_scripts_refresh-network-uuids |   12 -
 .../usr_share_vswitch_scripts_sysconfig.template   |  234 -----------
 xenserver/vswitch-xen.spec                         |  374 -----------------
 32 files changed, 1376 insertions(+), 1360 deletions(-)
 create mode 100755 xenserver/etc_init.d_openvswitch
 create mode 100755 xenserver/etc_init.d_openvswitch-xapi-update
 delete mode 100755 xenserver/etc_init.d_vswitch
 delete mode 100755 xenserver/etc_init.d_vswitch-xapi-update
 create mode 100644 xenserver/etc_logrotate.d_openvswitch
 delete mode 100644 xenserver/etc_logrotate.d_vswitch
 create mode 100644 xenserver/etc_profile.d_openvswitch.sh
 delete mode 100644 xenserver/etc_profile.d_vswitch.sh
 create mode 100755 xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
 delete mode 100755 xenserver/etc_xapi.d_plugins_vswitch-cfg-update
 create mode 100644 xenserver/openvswitch-xen.spec
 create mode 100755 xenserver/usr_share_openvswitch_scripts_refresh-network-uuids
 create mode 100644 xenserver/usr_share_openvswitch_scripts_sysconfig.template
 delete mode 100755 xenserver/usr_share_vswitch_scripts_refresh-network-uuids
 delete mode 100644 xenserver/usr_share_vswitch_scripts_sysconfig.template
 delete mode 100644 xenserver/vswitch-xen.spec

14 years ago[PATCH] xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set...
Ian Campbell [Thu, 8 Jul 2010 13:31:27 +0000 (14:31 +0100)]
[PATCH] xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set as appropriate.

From 16f2ae571fc7d21f13c9ddbe4e948d8f35552ae5 Mon Sep 17 00:00:00 2001
Date: Fri, 26 Mar 2010 09:35:32 -0700
Otherwise bridges can end up with a generated MAC address using Nicira OID
which has an impact when using DHCP on that devices.

tests/interface-reconfigure.at updated by Ben Pfaff.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 tests/interface-reconfigure.at                     |    8 ++++----
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   17 ++++++++++++-----
 2 files changed, 16 insertions(+), 9 deletions(-)

14 years ago[PATCH] vswitchd: Make names of Bridge external_ids generic.
Ben Pfaff [Thu, 8 Jul 2010 13:31:26 +0000 (14:31 +0100)]
[PATCH] vswitchd: Make names of Bridge external_ids generic.

From 5c43922c13983d2b5addf9e6dd3f54a006c568a6 Mon Sep 17 00:00:00 2001
Date: Thu, 18 Mar 2010 09:37:31 -0700
Until now the names of the external_ids keys used for Bridge records have
implied that they are specific to XenServer, because they begin with "xs-".
They are more generic in intent, however, so this commit removes the "xs-"
prefix and explains them more generically.

This finishes the renaming process started in commit c0f9490 "vswitchd:
Make names of Interface external_ids generic."

CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tests/interface-reconfigure.at                     |   12 ++++++------
 vswitchd/vswitch.xml                               |   11 +++++++----
 xenserver/README                                   |    4 ++--
 xenserver/automake.mk                              |    2 +-
 scripts/vif                |    4 ++--
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    8 ++++----
 ...usr_share_vswitch_scripts_refresh-network-uuids |   12 ++++++++++++
 ..._share_vswitch_scripts_refresh-xs-network-uuids |   12 ------------
 xenserver/vswitch-xen.spec                         |    6 +++---
 9 files changed, 37 insertions(+), 34 deletions(-)
 create mode 100755 xenserver/usr_share_vswitch_scripts_refresh-network-uuids
 delete mode 100755 xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids

14 years ago[PATCH] vswitchd: Make names of Interface external_ids generic.
Ben Pfaff [Thu, 8 Jul 2010 13:31:26 +0000 (14:31 +0100)]
[PATCH] vswitchd: Make names of Interface external_ids generic.

From c0f9490c24649855f36b9cb426decd600e5c3115 Mon Sep 17 00:00:00 2001
Date: Fri, 12 Mar 2010 14:57:59 -0800
Until now the names of the external_ids keys used for Interface records
have implied that they are specific to XenServer, because they begin with
"xs-".  They are more generic in intent, however, so this commit removes
the "xs-" prefix and explains them more generically.

The Bridge record's external_ids still need renaming.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 vswitchd/vswitch.xml                |   36 +++++++++++++++++++++-------------
 scripts/vif |    8 +++---
 2 files changed, 26 insertions(+), 18 deletions(-)

14 years ago[PATCH] xenserver: Restore XS5.5 compatibility for vif script.
Ben Pfaff [Thu, 8 Jul 2010 13:31:25 +0000 (14:31 +0100)]
[PATCH] xenserver: Restore XS5.5 compatibility for vif script.

From c69af19fe8f20b5a3333e54310b1592bc3f6dfd0 Mon Sep 17 00:00:00 2001
Date: Fri, 12 Mar 2010 15:08:18 -0800
XAPI in XenServer 5.5 does not put the vif-uuid or network-uuid into
XenStore, so the vif script needs to query xapi for those attributes in
that case.

Tested with XenServer 5.5.0 update 1 and XenServer 5.5.9 build 29381
(the latter just to make sure I didn't break anything).

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |   49 +++++++++++++++++++++-------------
 1 files changed, 30 insertions(+), 19 deletions(-)

14 years ago[PATCH] xenserver: Suppress error message for expected non-error condition.
Ben Pfaff [Thu, 8 Jul 2010 13:31:25 +0000 (14:31 +0100)]
[PATCH] xenserver: Suppress error message for expected non-error condition.

From d5bac2a0cfea7efc27c4f06de132460390a2e920 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 13:52:33 -0800
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

14 years ago[PATCH] xenserver: Various fixes for vif script
Justin Pettit [Thu, 8 Jul 2010 13:31:24 +0000 (14:31 +0100)]
[PATCH] xenserver: Various fixes for vif script

From 3612b72c3639f22b33786c2fac3fb291ff9f6061 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 00:15:40 -0800

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

14 years ago[PATCH] xenserver: Implement missing interface-reconfigure settings.
Ben Pfaff [Thu, 8 Jul 2010 13:30:23 +0000 (14:30 +0100)]
[PATCH] xenserver: Implement missing interface-reconfigure settings.

From 47a3c536c345925b6d3837643b0e8a24b752fad3 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 14:52:05 -0800
These settings are supported by the bridge, and they were supported
earlier by the vswitch, but support regressed when OVSDB was initially
introduced because at first ovs-vsctl did not support these settings.
This commit restores support.

Related to bug #2430, #2442.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   68 ++++++++++++++++----
 2 files changed, 62 insertions(+), 14 deletions(-)

14 years ago[PATCH] xenserver: Remove dump-vif-details script.
Ben Pfaff [Thu, 8 Jul 2010 13:30:23 +0000 (14:30 +0100)]
[PATCH] xenserver: Remove dump-vif-details script.

From 5a195c94ae4d663925a99b8dba761b9d961bdf9e Mon Sep 17 00:00:00 2001
Date: Fri, 26 Feb 2010 14:11:09 -0800
It is no longer used.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif                |    1 -
 5 files changed, 0 insertions(+), 94 deletions(-)
 delete mode 100755 xenserver/usr_share_vswitch_scripts_dump-vif-details

14 years ago[PATCH] xenserver: Fix vNetManager internal network compatibility with XS 5.5.0.
Ben Pfaff [Thu, 8 Jul 2010 13:30:22 +0000 (14:30 +0100)]
[PATCH] xenserver: Fix vNetManager internal network compatibility with XS 5.5.0.

From b09d5ec96a32c906bb35770937120401f64e90b7 Mon Sep 17 00:00:00 2001
Date: Tue, 2 Mar 2010 12:20:43 -0800
The previous commit depends on XAPI to add "xs-network-uuids" external IDs
for internal networks.  Only recent XAPI builds do this and in particular
the version in XenServer 5.5.0 does not.  This commit restores support
for these older XenServer versions.

The xs-network-names field is no longer set.  We plan to avoid the need for
it in the software that once used it.  It was always a bit of a kluge
anyhow.

CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

14 years ago[PATCH] vswitch: do not access XenAPI from VIF hotplug script
Ian Campbell [Thu, 8 Jul 2010 13:30:21 +0000 (14:30 +0100)]
[PATCH] vswitch: do not access XenAPI from VIF hotplug script

From 31afafc599ec9806e7a56e947a6ca0cd7af055f1 Mon Sep 17 00:00:00 2001
Date: Fri, 26 Feb 2010 13:25:09 -0800
XenAPI accesses must go through the pool master which introduces a
scalability issue.  All but one of the required values are already
present in xenstore for this reason

The only exception is the network UUID for an internal network. Rather
than working around the lack of callout to interface-reconfigure for
these networks simply pass the network uuid when creating calling out
to create the bridge.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |   48 ++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 6 deletions(-)

14 years ago[PATCH] vswitch: interface-reconfigure: bring down physical interfaces
Ian Campbell [Thu, 8 Jul 2010 13:30:21 +0000 (14:30 +0100)]
[PATCH] vswitch: interface-reconfigure: bring down physical interfaces

From df9a459ab60259b88610ac781889f69b73fbffad Mon Sep 17 00:00:00 2001
Date: Thu, 25 Feb 2010 16:15:13 +0000
This should be done when bringing down the last PIF which uses a
datapath in order to account for VLAN PIFs sharing a datapath.

The logic in bring_down() already acounts for this requirement by
clearing the dp variable if the datapath is still required so if we
get as far as deconfiguring that datapath then it is also correct to
bring down the physical devices.

With unit test suite update by Ben Pfaff.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

14 years ago[PATCH] xenserver: In vif script, tolerate port existing when we (re)add it.
Ben Pfaff [Thu, 8 Jul 2010 13:30:20 +0000 (14:30 +0100)]
[PATCH] xenserver: In vif script, tolerate port existing when we (re)add it.

From 867cc7bd395b32a3516112127a04d41d9f1b15fc Mon Sep 17 00:00:00 2001
Date: Tue, 23 Feb 2010 14:35:08 -0800
When a Windows VM boots, it initially has "vif" devices.  Then, when
XS Tools loads during boot, those "vif" devices disappear and then are
recreated under the same name.  The vif script is not called to remove
the old devices, but it is called to add the new ones.  It refused to do
this, however, because it saw the new device as having a duplicate name
(because the old was wasn't deleted).

This commit fixes the problem by making the vif script delete the port,
if it exists, before it adds it.

Bug #2425.

CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 scripts/vif |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

14 years ago[PATCH] xenserver: Avoid error due to missing MTU fields on XenServer 5.5.
Ben Pfaff [Thu, 8 Jul 2010 13:30:18 +0000 (14:30 +0100)]
[PATCH] xenserver: Avoid error due to missing MTU fields on XenServer 5.5.

From 3a32d4ca77ab91c495b3628b58c3967af7b6ff39 Mon Sep 17 00:00:00 2001
Date: Wed, 24 Feb 2010 15:45:11 -0800
The network records in XenServer 5.5 do not have an MTU field, so allow
these to be missing.

Diagnosed-by: Reid Price <reid@nicira.com>
CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

14 years ago[PATCH] xenserver: Add --no-syslog feature to interface-reconfigure.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Add --no-syslog feature to interface-reconfigure.

From b63fadcfdc8a96ddb5e944b60733edf21999a1ad Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:26:50 -0800
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing messages to be read from stderr instead of
having to somehow intercept syslog calls.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   16 +++++++++++++++-
 .../opt_xensource_libexec_interface-reconfigure    |    9 +++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)

14 years ago[PATCH] xenserver: Add --root-prefix feature to interface-reconfigure.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Add --root-prefix feature to interface-reconfigure.

From 64ddb6fecfe21a7b50c5907dd88de67a87ec6eca Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:25:54 -0800
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing fake configuration files and scripts to be
added in a directory other than the real root.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   19 ++++++++++----
 ...xensource_libexec_InterfaceReconfigureBridge.py |   10 ++++----
 .../opt_xensource_libexec_interface-reconfigure    |   26 +++++++++++--------
 3 files changed, 34 insertions(+), 21 deletions(-)

14 years ago[PATCH] xenserver: Add assertion and additional comments to ovs-vsctl commands.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Add assertion and additional comments to ovs-vsctl commands.

From 86e1bb44dadf886a34bfef00b5523873081f32fe Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:42:02 -0800
I found these useful while debugging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

14 years ago[PATCH] xenserver: Remove a VLAN's bridge when bringing down its PIF.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Remove a VLAN's bridge when bringing down its PIF.

From 7966caf4a08629f7d0498427420ef83b44838f44 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:32:01 -0800
Before, interface-reconfigure would only bring remove a VLAN's bridge
incidentally as part of removing its datapath's bridge.  This commit fixes
it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

14 years ago[PATCH] xenserver: Avoid doing unneeded work in deconfigure_datapath().
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Avoid doing unneeded work in deconfigure_datapath().

From 2a75efe8236e0c98838d866399cc0092fc7f2cd1 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:27:19 -0800
Deleting a bridge deletes all of its ports, too, so there's no benefit in
doing so manually beforehand.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

14 years ago[PATCH] xenserver: Set xs-network-uuids for both datapath and VLAN bridges.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Set xs-network-uuids for both datapath and VLAN bridges.

From c0a50086d9e60995b17bdd8a4e1f150caba337d5 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:41:19 -0800
It makes sense to set xs-network-uuids for every bridge, so this commit
does so.  It also makes the code a bit more readable by factoring logic
out into a new function.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   39 ++++++++++++--------
 1 files changed, 23 insertions(+), 16 deletions(-)

14 years ago[PATCH] xenserver: Always call ovs-vsctl in bring_down().
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Always call ovs-vsctl in bring_down().

From 56cac225ae4df8ff0c50a806b78abdb6ac96c33a Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:41:19 -0800
The datapath_modify_config() call here was at the wrong level of
indentation, so it was only getting called if 'dp' was to be deleted.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

14 years ago[PATCH] xenserver: Fix bringing up VLAN PIFs.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Fix bringing up VLAN PIFs.

From d77ffabfbcf9eb04b7e69ff6b34e12f000d314ee Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 13:08:10 -0800
In configure_datapath(), bringing up a VLAN PIF's datapath is no different
from bringing up a non-VLAN PIF's datapath, but the code was making
unnecessary distinctions.  Also, the test
if parent and datapath:
did not work at all, because there was no variable named 'datapath' in
scope and no obvious source of one.

In preconfigure(), it then becomes necessary to create a VLAN bridge for a
VLAN PIF, in a straightforward way.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   34 ++++++++++---------
 1 files changed, 18 insertions(+), 16 deletions(-)

14 years ago[PATCH] xenserver: Hoist identical bridge and vswitch functions into common code.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Hoist identical bridge and vswitch functions into common code.

From 96c7918c4043326bfa0e05b3fc9cbb9547279d40 Mon Sep 17 00:00:00 2001
Date: Tue, 23 Feb 2010 09:47:31 -0800
The previous commit made pif_bridge_name() in the bridge and vswitch
versions of interface-reconfigure functionally identical, so this commit
hoists them into a single common implementation in InterfaceReconfigure.py.

pif_is_bridged() also comes along for the ride because it is also generic
and because it is logically related.  Only the bridge code uses it at the
moment.

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   28 ++++++++++++++++++++
 ...xensource_libexec_InterfaceReconfigureBridge.py |   28 --------------------
 ...ensource_libexec_InterfaceReconfigureVswitch.py |   16 -----------
 3 files changed, 28 insertions(+), 44 deletions(-)

14 years ago[PATCH] xenserver: Accept VLAN PIFs in pif_bridge_name().
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Accept VLAN PIFs in pif_bridge_name().

From 6987c81c05f21c579fbe60e9b6693862abbbb762 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 12:53:17 -0800
pif_bridge_name() was written when the vswitch interface-reconfigure was
working with the raw Open vSwitch configuration via ovs-cfg-mod.  Then,
it made no sense to ask for the "bridge name" of a VLAN PIF, because a
VLAN PIF didn't have a bridge.

Now, however, the vSwitch interface-reconfigure works with ovs-vsctl, which
provides a thin layer over the OVS configuration that makes VLAN bridges
appear to exist.  So now it makes sense to ask for the bridge of a VLAN
PIF, and this commit enables that.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

14 years ago[PATCH] xenserver: Delete ports by interface name.
Ben Pfaff [Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)]
[PATCH] xenserver: Delete ports by interface name.

From 7c79588e006eb28e51ca8b715e22abce0c81f5d4 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:36:30 -0800
ovs-vsctl command "--if-exists del-port eth0" does nothing if eth0 is on
a bridge as part of a bond, because the bond's port name is not eth0 but
something else.  But interface-reconfigure needs to do that, so this commit
adds that ability to ovs-vsctl and modifies interface-reconfigure to use it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 utilities/ovs-vsctl.8.in                           |   11 ++++
 utilities/ovs-vsctl.c                              |   55 +++++++++++++------
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    6 +-
 3 files changed, 51 insertions(+), 21 deletions(-)

14 years ago[PATCH] xenserver: Fix comment in interface-reconfigure.
Ben Pfaff [Thu, 8 Jul 2010 13:25:21 +0000 (14:25 +0100)]
[PATCH] xenserver: Fix comment in interface-reconfigure.

From 3b1acc9955fa9c595f6b9e41999aa40041c7b049 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 12:37:20 -0800
This comment was accurate, but didn't actually say what the function did.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

14 years agointerface-reconfigure+vif: sync vswitch updates from openvswitch.git
Ian Campbell [Thu, 8 Jul 2010 13:24:19 +0000 (14:24 +0100)]
interface-reconfigure+vif: sync vswitch updates from openvswitch.git
(git SHA 5c9a0b820c1ff5b20f572198cda241d5cd557320)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agointerface-reconfigure: exclude VLANs when setting up test environment
Ian Campbell [Thu, 8 Jul 2010 13:22:49 +0000 (14:22 +0100)]
interface-reconfigure: exclude VLANs when setting up test environment

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agoCA-39972: call openvswitch-cfg-update instead of vswitch-cfg-update
Ian Campbell [Thu, 8 Jul 2010 12:02:16 +0000 (13:02 +0100)]
CA-39972: call openvswitch-cfg-update instead of vswitch-cfg-update

Upstream changed the name of this script as part of a move to
consistently use the openvswitch name.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agoAdvertise which network backend is in use in DB
Rob Hoes [Thu, 8 Jul 2010 12:01:37 +0000 (13:01 +0100)]
Advertise which network backend is in use in DB

For clients to determine which network backend is in use a key "network_backend" is added to the Host.software_version map on each host. The value of this key can be (same as the contents of /var/xensource/network.conf):

    * bridge: the Linux bridging backend is in use;
    * openvswitch: the Open vSwitch backend is in use.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoblktap2: Map Tap type devices to blkback backends.
Daniel Stodden [Thu, 8 Jul 2010 11:59:56 +0000 (12:59 +0100)]
blktap2: Map Tap type devices to blkback backends.

Make the agent map all Vbd backend types to blkback instances. We keep
the kind=Tap on backend types. But the distinction remains significant
only so VHD snapshotting can pause VBDs where necessary.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoblktap2: Redirect VBD pause events to sm/blktap.py
Daniel Stodden [Thu, 8 Jul 2010 11:59:55 +0000 (12:59 +0100)]
blktap2: Redirect VBD pause events to sm/blktap.py

Delegate blkback uevent handling to sm/blktap2.py, a drop-in
replacment for scripts/block.

Once blktap2 is enabled, the new module additionally manages
pause/resume for all tapdisk2 nodes. A VBD.pause/resume then will
pause/resume the tapdev node accordingly.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoscripts/block: Update and disable blkback queue state callbacks.
Daniel Stodden [Thu, 8 Jul 2010 11:59:54 +0000 (12:59 +0100)]
scripts/block: Update and disable blkback queue state callbacks.

Fixed, then disabled for now. The change handler is only left around
for reference, and upstreaming to xen.org, eventually.

The queue state variable in kernel space was eliminated, we now exit
the dispatcher for any of pause/shutdown/disconnect operations.
Instead we cleanly write/remove the kthread-pid before signalling
transitions.

Scripts now can hook into shutdown-done too. This is useful because
the hotplug scripts want time to ack the shutdown change, before the
agent gets to remove the backend. Exit signalling might later aid in
other areas, e.g. for consistent ionice modes.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoThis avoids a failure when power on is used with HP iLO and DRAC.
Javier Alvarez-Valle [Thu, 8 Jul 2010 10:21:19 +0000 (11:21 +0100)]
This avoids a failure when power on is used with HP iLO and DRAC.

Signed-off-by: Javier Alvarez-Valle <javier.alvarez-valle@citrix.com>
14 years agoOCamlDoc: Properly removes all whitespace and *'s from the beginning of lines in...
Rob Hoes [Thu, 8 Jul 2010 11:56:35 +0000 (12:56 +0100)]
OCamlDoc: Properly removes all whitespace and *'s from the beginning of lines in ocamldoc comments.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoWhen a VBD unplug event is caught by the event thread, it issues a VDI.detach but...
Jon Ludlam [Thu, 8 Jul 2010 11:55:00 +0000 (12:55 +0100)]
When a VBD unplug event is caught by the event thread, it issues a VDI.detach but not a VDI.deactivate. This fixes this behaviour. Also does the same for eject (although no ISO SRs currently use activate/deactivate)

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
14 years agoIf there is any error in syncing the RRDs while shutting down, don't let the exceptio...
Jon Ludlam [Thu, 8 Jul 2010 11:54:49 +0000 (12:54 +0100)]
If there is any error in syncing the RRDs while shutting down, don't let the exception propagate.
Only bad things can happen if the exception gets out.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
14 years agoRequire lifecycle specification for APIs
Rob Hoes [Thu, 8 Jul 2010 11:53:49 +0000 (12:53 +0100)]
Require lifecycle specification for APIs

Another step in the transition to better lifecycle information in the API.
Each API in the datamodel.ml should have an explicit lifecycle description attached to it (which may be [] for prototypes). Specifying 'in_product_since' is still allowed for backwards compatibility, but should no longer be used!

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoA script to build the documentation for xen-api.hg.
Rok Strnisa [Thu, 8 Jul 2010 11:52:51 +0000 (12:52 +0100)]
A script to build the documentation for xen-api.hg.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoA script to build the component (performing all the necessary steps).
Rok Strnisa [Thu, 8 Jul 2010 11:52:51 +0000 (12:52 +0100)]
A script to build the component (performing all the necessary steps).

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoIncrease SSL private key from 512 to 1024 bits.
Ben Pfaff [Fri, 18 Jun 2010 18:46:40 +0000 (11:46 -0700)]
Increase SSL private key from 512 to 1024 bits.

At Nicira, we are experimenting with the idea of converting XAPI SSL keys to SSH keys.  In some cases this might be convenient for giving XenServers access to remote resources without distributing a second set of keys.

OpenSSH, however, refuses to accept RSA keys shorter than 768 bits for use in authentication.  So this change is necessary, to make XAPI generate keys longer than the current default of 512 bits.

Additionally, RSA says "512-bit keys no longer provide sufficient security for anything more than very short-term security needs"
(http://www.rsa.com/rsalabs/node.asp?id=2218), so this change seems like a good idea in any case.

Increasing the key length makes generating the key at installation time take a bit longer, but the difference is not significant:
on my desktop, "openssl genrsa 512" takes about 10 ms and "openssl genrsa 1024" takes about 100 ms.

Signed-off-by: Ben Pfaff <blp@nicira.com>
14 years agoMake the output of 'xe host-get-vms-which-prevent-evacuation' more uniform
David Scott [Fri, 18 Jun 2010 21:54:18 +0000 (22:54 +0100)]
Make the output of 'xe host-get-vms-which-prevent-evacuation' more uniform

Now the regular output looks like this:

# xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d
uuid ( RO)          : 1d4eba84-9c04-962b-8fd3-f9fb5d597b64
    name-label ( RW): oim2
        reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:1ea1dad3-3b5c-4a51-2e9b-128688585769

uuid ( RO)          : 6a97a613-bfa2-088d-f415-cf49bbb4bb95
    name-label ( RW): oim
        reason ( RO): VM_MISSING_PV_DRIVERS,OpaqueRef:e8eeb830-36ac-fa4b-5703-d8a7bb551331

The --minimal output looks like this:

# xe host-get-vms-which-prevent-evacuation uuid=b82bf253-1494-40f2-9c3d-34f5bd17012d --minimal
6a97a613-bfa2-088d-f415-cf49bbb4bb95,1d4eba84-9c04-962b-8fd3-f9fb5d597b64

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoIn the xapi RPM post-install actions, use 'chkconfig --add' rather than 'chkconfig...
David Scott [Fri, 18 Jun 2010 19:54:26 +0000 (20:54 +0100)]
In the xapi RPM post-install actions, use 'chkconfig --add' rather than 'chkconfig ... on' otherwise services are shutdown in the wrong order, causing a slave host to freeze during reboot.

(Thanks to James Bulpin for figuring out what was going on :-)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-41895: make the CLI RT default to 'on-host' mode since it has 'localhost' hardcode...
David Scott [Fri, 18 Jun 2010 17:40:07 +0000 (18:40 +0100)]
CA-41895: make the CLI RT default to 'on-host' mode since it has 'localhost' hardcoded anyway.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoChange the 'close' field in the request record to be mutable rather than a reference
Jon Ludlam [Fri, 18 Jun 2010 13:15:07 +0000 (14:15 +0100)]
Change the 'close' field in the request record to be mutable rather than a reference

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
14 years agoAdd a simple script which monitors the paused domains on a host, checks them against...
David Scott [Fri, 18 Jun 2010 12:53:21 +0000 (13:53 +0100)]
Add a simple script which monitors the paused domains on a host, checks them against the xapi database, logs anomalies, and optionally destroys the domain if it has been in an error state for longer than a threshold (currently 60s)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years ago[CA-40987]: Fix improper Secret log filtering in the CLI.
Magnus Therning [Fri, 18 Jun 2010 12:53:21 +0000 (13:53 +0100)]
[CA-40987]: Fix improper Secret log filtering in the CLI.

Signed-off-by: Magnus Therning <magnus.therning@citrix.com>
14 years agoCA-34549: make the host chooser use the precomputed memory_overhead for consistency.
David Scott [Fri, 18 Jun 2010 12:38:31 +0000 (13:38 +0100)]
CA-34549: make the host chooser use the precomputed memory_overhead for consistency.

Now it should be possible to make a single large VM by:
* subtracting the host memory-overhead from memory-total
* subtracting dom0's memory-actual and memory-overhead
* subtracting the overhead of a new VM
* make the new VM use all remaining memory

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-40530: bump up the threshold time before a host is declared offline to 10 minutes...
David Scott [Fri, 18 Jun 2010 12:38:30 +0000 (13:38 +0100)]
CA-40530: bump up the threshold time before a host is declared offline to 10 minutes. This is in response to several stress test failures where the heartbeats were delayed by 3 minutes.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-40530: Unset the Task.stunnel_pid when the stunnel connections are closed. This...
David Scott [Fri, 18 Jun 2010 12:38:30 +0000 (13:38 +0100)]
CA-40530: Unset the Task.stunnel_pid when the stunnel connections are closed. This prevents the killing of old pids in the event of (i) a task leak; and (ii) a host being declared offline.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-40022: add a bunch more debugging and sanity-checks to the console code.
David Scott [Fri, 18 Jun 2010 12:38:29 +0000 (13:38 +0100)]
CA-40022: add a bunch more debugging and sanity-checks to the console code.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-40618: Change path to the supplemental pack
javier.alvarez-valle@citrix.com [Wed, 21 Apr 2010 12:10:14 +0000 (13:10 +0100)]
CA-40618: Change path to the supplemental pack

Signed-off-by: Javier Alvarez-Valle <javier.alvarez-valle@citrix.com>
14 years agoCA-41230: In VM.{snapshot,clone}, keep track of whether a new VDI has actually been...
David Scott [Fri, 18 Jun 2010 12:38:27 +0000 (13:38 +0100)]
CA-41230: In VM.{snapshot,clone}, keep track of whether a new VDI has actually been created and therefore, whether that VDI should be deleted on failure. In particular CDs are shared not duplicated and so the cleanup code shouldn't try to delete them.

Unfortunately the 'writable ISO SR' support changes the default NFS ISO SR mount options to read/write from read/only, exposing this bug.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoxe-edit-bootloader: support grub2 paths
Ian Campbell [Fri, 18 Jun 2010 12:38:26 +0000 (13:38 +0100)]
xe-edit-bootloader: support grub2 paths

(and fix a typo while I'm here)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agoCA-41292: Provide XenAPIPlugins.Failure exception in order to compatibility
Ian Campbell [Fri, 18 Jun 2010 12:38:25 +0000 (13:38 +0100)]
CA-41292: Provide XenAPIPlugins.Failure exception in order to compatibility
with plugins written against previous versions of XenServer.

This API was unintentionally removed in 90:85c10f6fab58

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
14 years agoRemove "dechainify VLAN" code from dbsync_slave
Rob Hoes [Fri, 18 Jun 2010 12:38:23 +0000 (13:38 +0100)]
Remove "dechainify VLAN" code from dbsync_slave

This is no longer needed, as the creation of VLANs-on-VLANs is not possible anymore (for about two years), and this function therefore causes unnecessary overhead in xapi's startup sequence. Removed an unused function from the same module as well.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years ago'make doc' should also build PDF of API docs
Rob Hoes [Fri, 18 Jun 2010 12:38:09 +0000 (13:38 +0100)]
'make doc' should also build PDF of API docs

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoUpdate version number in API doc (PDF)
Rob Hoes [Fri, 18 Jun 2010 12:37:51 +0000 (13:37 +0100)]
Update version number in API doc (PDF)

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoUpdate scripts/block for blkback's new pause/resume ops.
Daniel Stodden [Fri, 18 Jun 2010 12:37:42 +0000 (13:37 +0100)]
Update scripts/block for blkback's new pause/resume ops.

The kernel can emit uevents when quiescing a VBD's I/O queue. It won't
write pause-done, but signal state changes through a new key:
queue-state. The basic idea is to let storage-level code hook into
pause/resume transitions where desirable. This script implements a
default handler.

The original device.ml protocol remains as is, but the implementation
differs:

 * ACTION=add:    request queue-state change notifications.
 * ACTION=change: translate queue-state to pause-done.

Also adds a bit more verbosity to the daemon.log.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoBug #1614: scheduler weight/cap and affinity values are lost over a migrate
David Scott [Fri, 18 Jun 2010 12:37:35 +0000 (13:37 +0100)]
Bug #1614: scheduler weight/cap and affinity values are lost over a migrate

A call to "configure_vcpus" was present in the build (ie boot) path but missing in the restore (ie resume, migrate) path.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoCA-41839: Moving to RPMs for xapi had the side-effect of renaming the CLI RPM from...
David Scott [Fri, 18 Jun 2010 12:37:34 +0000 (13:37 +0100)]
CA-41839: Moving to RPMs for xapi had the side-effect of renaming the CLI RPM from xe-cli-... to xapi-xe... This patch changes it back for now to minimise unwanted churn.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoWhen uninstalling xapi-datamodel, do it from the place it was installed in
Rob Hoes [Fri, 18 Jun 2010 13:20:58 +0000 (14:20 +0100)]
When uninstalling xapi-datamodel, do it from the place it was installed in

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoHTML code docs: Handle @param ocamldoc option
Rob Hoes [Fri, 18 Jun 2010 13:20:57 +0000 (14:20 +0100)]
HTML code docs: Handle @param ocamldoc option

This option can be used to attached ocamldoc comments to function parameters.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoHTML code docs: Compatibility improvements
Rob Hoes [Fri, 18 Jun 2010 13:20:57 +0000 (14:20 +0100)]
HTML code docs: Compatibility improvements

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
14 years agoHTML API docs: Display namespace changes in release notes
Rob Hoes [Fri, 18 Jun 2010 13:20:56 +0000 (14:20 +0100)]
HTML API docs: Display namespace changes in release notes

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>