Commit Graph
100 Commits
Author SHA1 Message Date
Ian Campbell f7506e96aa Linux/xencommons: Use oxenstored by default when available
oxenstored is an ocaml implementation of the xenstore daemon. It is faster,
more scalable and more reliable than the C xenstored.

In particular the transaction model in oxenstored does not involve taking a
complete copy of the database and aborting on any (even non-conflicting) other
change.

There is a paper on the design and implementation of oxenstored at
http://gazagnaire.org/pub/GH09.pdf which includes a performance evaluation and
comparison with the C daemon etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-12-16 18:46:27 +00:00
Olaf Hering f00d216182 tools: init.d/Linux/xencommons: load evtchn and gntdev modules
There is currently no code in the kernel to trigger autoload of the
evtchn or gntdev drivers. Load them manually during xencommons start.
Handle both pvops and xenlinux module names.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-12-01 18:28:18 +00:00
Olaf Hering 48d95aee7d tools: init.d/Linux/xencommons: run script only when needed
Currently xencommons prints an error that /proc/xen/capabilities does
not exist when started on a non-xen kernel.

Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-12-01 18:27:42 +00:00
Zhigang Wang bd86a4611d tools: fix shared loop device detection in block hotplug script
We need to cope with 0 or more '0' prefixed to '$dev':

  # stat -c '%D' "/system.img"
  13
  # losetup -a
  /dev/loop0: [0013]:12062248 (/system.img)

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-08 18:12:26 +01:00
Fabio Fantoni 89758766e5 tools: Improved LSB headers in init.d scripts
xendomains service now working also without xend service

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-08 18:10:48 +01:00
Zhigang Wang 1f2591ba35 make xendomains service save/migrate vms under /etc/xen/auto only
Currently, xendomains service will save or migrate all the running domains in
the host on stop.

Change XENDOMAINS_AUTO_ONLY=true. Then on service stop, it will only
save or migrate all VMs under XENDOMAINS_AUTO (/etc/xen/auto), but always
shutdown all the running VMs.

It's a way to cleanly shutdown all the running VMs on system reboot. If you
want to save/migrate a VM, create a link to /etc/xen/auto.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-06-21 17:48:00 +01:00
Ian Jackson 4bf3ca7bdb tools/hotplug: Fix hotplug hook script arrangements not to always fail
The new feature introduced in 23401:a44b12ee2fd3 was broken; it in
general always fails, at least if there are no hotplug scripts.

If there are no hooks, call_hooks ends up running this:
  [ -x ".....*.hook" ] && . "..... *.hook"

This does not directly trigger set -e and sigerr.  However, it is the
last command exected in call_hooks.  So the return status of
call_hooks is an error, and thus a sigerr happens when call_hooks
returns.

The bug affects xl and xm.  However xl does not detect failure of the
hotplug script.

Change the script to use if...then rather than &&, as the latter has
very confusing and undesirable semantics.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-06-03 15:04:30 +01:00
Fabio Fantoni 205e1b66cc tools/hotplug/Linux: start all xen daemons in runlevel 2
Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-05-26 14:38:56 +01:00
W. Michael Petullo 8b917cf2d0 tools/hotplug: support vif-post.d hook arrangements
New feature: you can drop hook scripts into
 /etc/xen/scripts/vif-post.d/*.hook

Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-05-25 10:45:24 +01:00
Olaf Hering d55ae1cc8f hotplug: fix busy loop device detection
Improve busy loop device detection after changeset 22773:02c0af2bf280

The intention is not to find the file to be mounted in the losetup -a
output.  What matters are existing mounted files with the same dev:inode
as the new file.  So the fix is to apply variable expansion which
happens only without double quotes.  Otherwise $dev will contain
newlines for hardlinked files, as mentioned in the commit message from
the changeset above.

losetup -a does also truncate long filenames to 62 chars due to ioctl
limitations.  This part is fixed with 2.6.37 where the filename can be
obtained from sysfs. As a result very long filenames will be missed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-05-20 18:09:26 +01:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00
Ian Jackson cd98e00714 tools/hotplug/Linux: Use correct device name for vifs in setup scripts
In vif-common.sh, set the shell variable "dev" to the new interface
name when interfaces are renamed, and consistently use this variable
in all the vif scripts.

This fixes hotplug of renamed interfaces.

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
From: Patrick Scharrenberg <pittipatti@web.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Patrick Scharrenberg <pittipatti@web.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-11 18:21:35 +00:00
Olaf Hering 0f850909c8 tools/hotplug: set mtu from bridge also on vif interface
Apply mtu size from bridge interface also in vif interface.
This depends on a kernel change which allows arbitrary mtu sizes until
the frontend driver has connected to the backend driver. Without this
kernel change, the vif mtu size will be limited to 1500 even with this
change to the vif-bridge script.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-07 16:55:25 +00:00
Michael Young 6fddee89c1 tools/hotplug: Fix proxy arp messing about to use correct device
Fix an anomaly in /etc/xen/scripts/network-route.

Currently this script contains
  netdev=${netdev:-eth${vifnum}}
ie. netdev is set to eth${vifnum} by default. Unfortunately vifnum
is not set anywhere in the xen code so the default is actually the
broken "eth".  And anyway the vif number (which is what vifnum ought
to be) is not relevant.

The patch changes the default to eth0 (which is what the comment at
the top of the file says it should be).

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-02-01 19:16:28 +00:00
Christoph Egger e948bb9571 libxl: rename xenstored pid file on Linux
Changset 22806:eefb8e971be5 broke 'xl'.

After starting the xenstored, xenconsoled, xenbackendd and running xl
create I get this:
  libxl: error: libxl.c:53:libxl_ctx_init Is xenstore daemon running?
  failed to stat /var/run/xenstore.pid: No such file or directory
  cannot init xl context

The reason for the failure is that the NetBSD startup script
creates the file
  /var/run/xenstored.pid
but libxl checks for
  /var/run/xenstore.pid

Attached patch makes this consistent across Linux and NetBSD by
changing the Linux name (to the more-conventional food.pid form).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-26 16:11:41 +00:00
user virtual 45244f3cd1 tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd
"xen-watchdog stop" attempts to kill non existing "watchdogd" but
misses the running "xenwatchdogd".  This also provokes errors during
install and Debian package management.

Signed-off-by: user virtual <virtualusr@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-25 16:42:00 +00:00
Olaf Hering 86e440aebc tools/hotplug/Linux: allow hardlinked files for block device images
tools/hotplug/Linux/block change for this losetup -a output:
(inode 12 is listed twice due to hardlinks)

/dev/loop0: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop1: [0809]:139266 (/abuild/vdisk-sles11_1-disk1)
/dev/loop3: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
/dev/loop5: [0809]:139273 (/abuild/vdisk-sles11_5-disk1)
/dev/loop8: [0809]:12 (/abuild/bootiso-xenpaging-sles11_5.iso)
/dev/loop10: [0809]:12 (/abuild/bootiso-xenpaging-sles11_4.iso)
/dev/loop11: [0809]:139271 (/abuild/vdisk-sles11_4-disk0)

Without this change, $dev would contain /dev/loop8\n/dev/loop10
Applies to 4.0 and 4.1

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2011-01-17 18:05:52 +00:00
Ian Campbell 65285155c6 tools/hotplug/Linux: start xen daemons in runlevel 2.
This is the default runlevel on a Debian system.

In addition update-rc.d complains:

  update-rc.d: warning: xencommons stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)

and it seems reasonable to stop the daemons during shutdown or reboot
so make that change as well.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-01-17 17:52:39 +00:00
Ian Campbell 6162c530ff tools/hotplug/Linux: only apply dummy MAC address to virtual devices.
Avoid applying to the bridge and physical network device.

This should un-break dom0 networking in the old xend-creates-bridge
setup (problem introduced in 22493:937488219719).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-04 15:26:02 +00:00
Ian Jackson 01fcfa3b96 tools/hotplug: read /etc/default/xencommons if appropriate
Since 22187:c41252a55a0a we have been installing our example
xencommons settings file in either /etc/sysconfig or /etc/default,
depending on whether /etc/sysconfig exists.

However I omitted to add the code to /etc/init.d/xencommons to
actually read either version of the file, although every other init
script seems to have it.

An effect of this misplaced/unread file is that the automatic tests
don't cause xenconsoled to collect serial logs, because the tester
edits whichever file actually exists.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-22 17:48:31 +00:00
Keir Fraser 26637cd320 tools/hotplug/Linux: Avoid dependency on iptables conntrack module.
Checking for RELATED,ESTABLISHED traffic being sent to a domU requires
connection tracking, which adds unexpected (to most users) load to
dom0. Heavily loaded systems can fill the conntrack tables.

So avoid this, be more liberal in what we accept, and leave it to domU
to police its own input.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-17 16:12:37 +00:00
Ian Campbell e40c1e449e tools/hotplug: Do not recursively invoke xenstore_write on error
This fixes a possible infinite recursion.

From: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-16 17:58:00 +00:00
Kouya Shimura 5d0efa621f tools/hotplug/Linux: force release lock if holder process is gone (fix)
22508:57907b28e51a was unsafe for mutual exclusion.  There is a case
that the owner file doesn't exist yet when an atomic mkdir operation
fails.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-15 16:49:06 +00:00
Ian Jackson 09150fd700 blktap2: fix up non-ASCII characters in 21129:bf74d9c31674
21129:bf74d9c31674 contained UTF-8-encoded nonbreaking spaces.
Sorry for not noticing this.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-15 13:34:26 +00:00
Ian Jackson 6e22a6ba68 tools/hotplug: Do not mind if "ip link set" fails on vif backends
Most versions of netback do not support setting the MAC address.  This
means that c/s 937488219719 causes the hotplug script to break for
vifs, even as it fixes the bridge-wrong-MAC-address problem for tap
devices (used for emulated nics).

The mac-setting operation is not necessary for vifs since they are
hardcoded to fe:ff* anyway.

As a band-aid, add "|| true" to the call to ip link, so that this
error does not cause the hotplug operation to fail.  There will still
be an error message printed until we can fix this better.

Suggested-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-14 17:38:18 +00:00
Kouya Shimura 6250b87dcd tools/hotplug/Linux: forced to release lock if holder process is gone
When a script using locking.sh is stopped by ctrl-C, the lock file remains.
We have to wait 100 seconds for releasing the lock at the next time.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-14 17:15:48 +00:00
Chunyan Liu f662bb114a Fix /vm/uuid xenstore leak on tapdisk2 device cleanup
While doing block-detach blktap2 disk, tap2 device info is not cleared from
xenstore /vm/uuid/xxx. The reason is in xen-hotplug-cleanup script: when $vm_dev
does not exist, $(xenstore-read "$vm_dev" 2>/dev/null) is also "", won't enter
the block. So, change to use cmd return value to check existence.

Signed-off-by Chunyan Liu <cyliu@novell.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-12-13 17:39:27 +00:00
Ian Campbell 6824dea08b tools/hotplug/Linux: Ensure tap devices receive a dummy MAC address.
If a tap device is not given an explicit MAC address it will generate
one randomly.

The behaviour of the Linux bridge is to pickup the lowest MAC address
of any port for use in for ARP, STP etc. If the tap device's randomly
generated MAC address happens to be the lowest then this can cause all
manner of strange networking glitches in both domain 0 and guests when
the bridge suddenly takes over from the previously used MAC address.

We choose FE:FF:FF:FF:FF:FF as it the numerically largest
non-broadcast address. This ensures that the physical NIC device's
port will have the lowest MAC address and therefore be the one picked
up by the bridge.

vif devices already have a MAC address of FE:FF:FF:FF:FF:FF set by
netback already but there is no harm in forcing it a second time in
the hotplug script.

tap devices are added by the "add" event and therefore we should call
setup_bridge_port then as well as for "online" which is caused by vif
devices.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:44:07 +00:00
Sander Eikelenboom adee1dd918 tools/hotplug/Linux: supply --physdev-is-bridged in iptables runes
With newer (pvops) kernels logs get flooded with this iptables
warning: physdev match: using --physdev-out in the OUTPUT, FORWARD and
POSTROUTING chains for non-bridged traffic is not supported anymore

Using the --physdev-is-bridged option prevents this.
See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571634#10

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-10 14:37:19 +00:00
Jan Beulich 95e155c6ec tools/hotplug: Linux udev rules adjustment
While earlier this year some work was done to eliminate libxc's
creation of nodes under /dev (as in some cases it actually got
things wrong), I just found that tapdisk2 does exactly the same.
While I'm not currently aiming at removing this code, I want to
at least suggest some adjustments to the provided rules file.

First of all, the present rule

KERNEL=="blktap[0-9]*", NAME="xen/%k"

matches both blktap1's devices and blktap2's ring devices,
resulting in whoever comes last replacing what was there
before (e.g. a tap2:aio: attach will replace bltap1's
/dev/blktap0 [i.e. the main control device] with the ring device
of the new virtual disk). Therefore we should add a subsystem
qualifier there.

Second, at some udev versions default to using 0660 as the
permissions on nodes it creates. The kernel (with devtmpfs)
defaults to 0600, and hence I'd suggest to also make this
explicit in the rules.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Boris Derzhavets <bderzhavets@yahoo.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-21 15:59:01 +01:00
744d6961f9 tools, build system: Make changing distro-specific layout aspects easier
Introduce CONFIG_LEAF_DIR, SUBSYS_DIR, INITD_DIR variables to cope
better with variation between distributions.

See docs/misc/distro_mapping.txt for details.

Signed-off-by: Bruce Edge <bruce.edge@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-20 17:54:25 +01:00
Brendan Cully 33577c40bf tools/hotplug: 21549:8bcaec29574e breaks vif-script with arguments.
For example, (vif-script 'vif-bridge bridge=eth1') in xend-config.sxp will
cause vif-setup to attempt to execute 'vif-bridge bridge=eth1' due to a
quoting mismatch. The fix appears to be to remove the extra quotes around
"$script" in vif-setup.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-18 14:50:51 +01:00
Anthony Perard 025e84f126 tools/hotplug, Use udev rules instead of qemu script to setup the bridge.
From: Anthony PERARD <anthony.perard@citrix.com>

This patch adds a second argument to vif-bridge script. It can be "vif"
or "tap". "vif" give the default behavior and "tap" just add the
interface to the found bridge when the action is "add".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 tools/hotplug/Linux/vif-bridge        |   20 ++++++---
 tools/hotplug/Linux/vif-common.sh     |   70 ++++++++++++++++++++++++---------
 tools/hotplug/Linux/xen-backend.rules |    5 +-
 tools/libxl/libxl.c                   |    6 +-
 4 files changed, 70 insertions(+), 31 deletions(-)
2010-08-09 16:46:02 +01:00
Olaf Hering 42b7a80b01 # HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1280140115 -3600
# Node ID 8c3e1e8ddd599371d882b17996be88b545119ccb
# Parent  2092c06f9467747da608c448ddd01e2f1f82290a
tools/hotplug: init.d should test for /proc/xen/capabilities being a file

Correct test for /proc/xen/capabilities
It is a file, not a directory.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-26 11:29:11 +01:00
Ian Jackson fd452d0f64 tools/hotplug etc.: remove Default-Enabled from LSB header
"Default-Enabled:" is not a LSB keyword.
Remove it from the LSB section.

This avoids an openSuSE buildcheck warning and we are not aware of any
reason why it should be kept.

From: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Modified-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-26 11:15:40 +01:00
Olaf Hering 7e4a3b097f tools/hotplug: add LSB header to xen-watchdog runlevel script
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-26 11:11:25 +01:00
Olaf Hering 8fc69686f5 tools/hotplug: Install udev rules into rules.d
Install rules straight into /etc/udev/rules.d
udev version 029 since mid 2004 uses this directory already.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 19:23:49 +01:00
Olaf Hering f4c4de9caf tools/hotplug: correct xend initscript dependency in LSB part
Add missing dependencies to runlevel script
xend requires at least xenstored

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 17:55:14 +01:00
Olaf Hering cddbcd7143 tools and Makefiles: introduce and use new SYSCONFIG_DIR variable
On SuSE the configuration files in /etc/sysconfig/ will be updated in
a smart way from templates found in /var/adm/fillup-templates/
Introduce new variable SYSCONFIG_DIR for Linux installations.  Now
only one place needs patching, or it can be specified as option to
make(1).

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 17:50:05 +01:00
Ian Jackson ec9afc69fe tools/hotplug: xencommons: xenconsoled tracing
cut and paste error lead to using the xenstored command line syntax
for xenconsoled.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-07-09 18:46:07 +01:00
Ian Jackson 0c85cce09c tools/hotplug: locking.sh script: fix lock directory remains on error bug
_release_lock should be used instead of release_lock.
sigerr is introduced so that it can be redefined by
xen-hotplug-common.sh to a version which writes error status to xenstore.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2010-07-06 13:10:14 +01:00
Ian Jackson f706d9e9af tools: init.d/xencommons: Wait for xenstored to start before setting dom0 name
On one of my boxes, the xenstore-write setting dom0's name starts
before xenstored is actually ready to handle the connection properly,
resulting in the name set failing.  Wait for xenstored to be up and
responding to reads before continuing, timing out after 30 seconds.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-06-29 15:07:17 +01:00
Ian Jackson 8209429099 tools: init.d/xencommons: Make init script more verbose
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-06-29 15:06:27 +01:00
Ian Jackson e724c3fa88 prompt user to start xencommons first if it is not running.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-06-23 17:01:35 +01:00
Ian Jackson 7b76ecc628 init.d: Fix xencommons init script chkconfig configuration
Fix the xencommons init script chkconfig configuration since the
priority was missing here and chkconfig was complaining about invalid
chkconfig script so I added both start and stop priorities to the
chkconfig line and it was working fine, the script was successfully
added to chkconfig when using `chkconfig --add xencommons` and
management using the chkconfig utility was now possible.

Tested on RHEL-5 Server with Xen-4.1-unstable installed, running on
PVops kernel 2.6.32.15 and it was working fine.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2010-06-22 16:22:30 +01:00
Stefano Stabellini 14d8a83b62 this patch adds support for xl in xendomains: if xm list fails all the
following commands are issued using xl instead.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-22 16:05:30 +01:00
Ian Jackson 6f4e9be827 If xenfs is compiled as a module, now cannot complete
'service xencommons start', mount xenfs directly can fix it,
it can trigger modprobe xenfs.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-06-22 15:39:42 +01:00
Keir Fraser c814a49b06 Revert 21641:2e5844e17d6f "xencommons: modprobe xenfs if it not be loaded"
Nacked by Jeremy Fitzhardinge and Ian Jackson.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-21 18:37:34 +01:00
Keir Fraser 0ca1bba0a6 xencommons: modprobe xenfs if it not be loaded
If xenfs is compiled as a module, now cannot complete
'service xencommons start', modprobe xenfs can fix it.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-06-21 09:57:10 +01:00
Keir Fraser edf9a6a284 xend: Do not mess with bridge if admin has set one up already
Previously, the default "network-script",
/etc/xen/scripts/network-bridge, would attempt to do its horrid work
even if you had already set everything up in /etc/network/interfaces.

Setting up your bridge in /etc/network/interfaces is:
 * easy
 * required for libxl since libxl never does it for you
 * not a fragile piece of lunacy
 * properly documented
 * the way everyone would expect it to work

In this small patch we make it so that the default config for xend
doesn't mess about on startup if you already have a bridge, and
doesn't mess about on shutdown unless your first-named bridge (eth0 or
xenbr0, normally) doesn't also have a physical interface named
p<whatever> (peth0 or pxenbr0) enslaved to it.  The latter test is not
ideal but will hopefully do from now until the time xend finally dies.

We also fix the "documentation" - ie, the comments in the default
xend-config.sxp - to correspond to reality.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-06-15 11:36:27 +01:00