Commit Graph
42 Commits
Author SHA1 Message Date
Keir Fraser 702890192a xl: init scripts (v2)
Now the init script is called xencommons and, as the name suggests, it
is a common script between xl and xend because it is used to start
xenconsoled, xenstored and xenbackendd and the initialization of these
three daemons has been removed from xend.  The global
xen_toolstack=xl/xend variable has been removed.  Regarding the
network setup, I made the vif scripts follow the same pattern as the
other scripts in xen-backend: a new script called vif-setup is
executed unconditionally. vif-setup is going to do the right thing
depending on the value of the environmental variable "script" (same
technique used before), defaulting to vif-bridge.  In the common
scenario the toolstack doesn't need to set the variable "script"
because vif-bridge is going to be called anyway.  There is no global
network script to setup the network bridges with xl, so if you are
using xl without xend, you need to manually configure the bridges
using your distro network setup, or, if you are lazy, you can just add
something like:

/etc/xen/scripts/network-bridge start

to your rc.local.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-06-07 15:49:46 +01:00
Keir Fraser 9fe075decc tools: xenbackendd for NetBSD
Attached patch introduces xenbackendd. It is used on NetBSD
to launch the hotplug scripts. Later xenbackendd can be improved to
also launch qemu-dm as child process and will notice when qemu-dm
crashes.

The changes the patch makes:
- rename hotplug scripts as xenbackendd expects them
  (current names were taken from pkgsrc)
- install hotplug scripts as executable scripts
- introduce xenbackendd
- build/install/launch on NetBSD only

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-07-22 14:37:30 +01:00
Keir Fraser 11e1149fe0 tools: Always use sane upstream (`native') python paths
Previously, by default we would install our python modules into
/usr/lib/python/xen, for example /usr/lib/python/xen/__init__.py.
Upstream python's standard install location (a) includes the Python
version number and (b) puts things in site-packages by default.

Our best conjecture for the reason for this was an attempt to make the
installs portable between different python versions.  However, that
doesn't work because compiled python modules (.pyc), and C python
extensions corresponding to one version of python, are not compatible
across different versions of python.

This is why upstream include the version number.

site-packages is the standard location for locally-installed packages
and is automatically included on the python search path.

In this change, we abandon our own unusual python path setup:

 * Invoke setup.py in an entirely standard manner.  We pass
   PREFIX and DESTDIR using the appropriate options provided by
   setup.py for those purposes (adding them to setup.py calls
   which were previously lacking them).

 * Since the installation locations are now on the standard
   python path, we no longer need to add anything to the path
   in any of our python utilities.  Therefore remove all that
   code from every python script.  (Many of these scripts
   unconditionally added /usr/lib/python and /usr/lib64/python which
   is wrong even in the old world.)

 * There is no longer any special `Xen python path'.  xen-python-path
   is no longer needed.  It is no longer called by anything in our
   tree.  However since out-of-tree callers may still invoke it, we
   retain it.  It now prints a fixed string referring to a directory
   which does not to exist; callers (who use it to augment their
   python path) will thus add a nonexistent directory to their python
   path which is harmless.

 * Remove various workarounds including use of setup.py --home
   (which is intended for something completely different).

 * Remove tests for the XEN_PYTHON_NATIVE_INSTALL build-time
   environment variable.  The new behaviour is the behaviour which we
   should have had if this variable had been set.  That is, it is now
   as if this variable was always set but also bugs in the resulting
   install have been fixed.

This should be a proper fix for the bug addressed by c/s 19515.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-04-08 19:13:04 +01:00
Keir Fraser 68c053e8a9 xend: Allow xenconsoled to be passed arguments at startup
Attached patch allows to pass arguments to xenconsoled
via XENCONSOLED_TRACE env. variable analogous to xenstored.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-08-13 13:42:30 +01:00
Keir Fraser 2f3f6d2092 Fix xend startup after 16344:0ebac857649591.
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
2007-11-08 16:27:03 +00:00
Keir Fraser 5ac841d232 xend: Allow for non-existent xen-python-path binary.
On Solaris, xen-python-path is unnecessary.

Signed-off-by: John Levon <john.levon@sun.com>
2007-11-08 15:32:14 +00:00
Keir Fraser e02df44279 xenstored: Recover from corrupt tdb on reboot
Xen cannot work when xenstored's tdb is corrupt.  When that happens
somehow (and we've seen it happen), even reboot doesn't recover from
it.  It could: there is no state in tdb that needs to be persisted
across reboots.

This patch arranges that tdb is removed before xenstored is started,
provided it doesn't already run.  This is safe, because:

* xenstored cannot be restarted.  If it dies, Xen's screwed until
  reboot.

* /usr/sbin/xend always starts xenstored anyway.

* xenstored locks its pid-file (see write_pidfile() in
  tools/xenstore/xenstored_core.c), and refuses to start when it
  can't.

* My patch makes /usr/sbin/xend remove tdb iff it can lock the
  pid-file.  In other words, it removes tdb only when xenstored is not
  running, and locks it out until it is done.

  Bonus fix: it also removes stale copies of the tdb xenstored tends
  to leave behind when it exits uncleanly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-11-06 09:40:44 +00:00
Ewan Mellor a84714b11c Break out the Python path interrogation into a separate script. This has the
advantage that the temporary path manipulation cannot affect the main script,
and that it can be shared with other programs, such as xm-test.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-02-01 12:48:53 +00:00
Tim Deegan 7f39243d68 [PYGRUB] Plumb bootloader I/O through xenconsole.
- xend forwards console traffic between the running bootloader and a pty
   which it writes to the store so the xenconsole client can see it.
 - the xenconsole client handles the domain's console pty changing.
 - xm create no longer runs the bootloader.
 - pygrub gets '-i' option to explicitly request an interactive session.
 - xend unlocks the domain list during bootloading so that "xm console"
   can see the domain and attach to its console pty.

Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-22 11:49:14 +00:00
Ewan Mellor d529c3d93b Added rudimentary "xend reload" functionality. This allows you to reconfigure
the services offered by Xend, without restarting the daemon itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:37:53 +00:00
kfraser@localhost.localdomain 22241b17fe [SOLARIS] Xen daemons are managed separately, so we need a way to start
just xend, and we need to disable xend's self-restarter.

Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:52:17 +01:00
kaf24@localhost.localdomain b643712258 [XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly.  This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-28 13:05:00 +01:00
vhanquez@gwig.uk.xensource.com 04f6e36b47 remove '=' between command line name/argument.
ease parsing without getopt.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-08-03 13:44:05 +00:00
jchesterfield@dhcp92.uk.xensource.com 0da81aa1d4 Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README. 2006-07-13 10:13:26 +01:00
emellor@leeni.uk.xensource.com c1124c5993 Use the auxbin module to find the appropriate install directory for our Python
scripts.

This fixes a bug with xm-test not working on 64-bit systems.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-05 18:36:12 +01:00
emellor@ewan af1b5637f4 Allow parallel 32- and 64-bit Xen installations. Move xc_save, xc_restore,
and xenconsole out of /usr/libexec/xen and into one of /usr/lib/xen/bin or
/usr/lib64/xen/bin.  Remove all the PATH hacking inside Xend, and rely upon
the PATH being set correctly from outside.  Added an auxbin module for
handling the hacky stuff.

Replace the few /usr/bin/python bang paths with /usr/bin/env python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:55:12 +01:00
shand@ubuntu.eng.hq.xensource.com 590d9c58a1 Make sure xend start doesn't return until xend is ready to accept connections.
This means xend start && xm list actually works now (instead of throwing an
exception).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-09-14 17:45:51 -08:00
cl349@firebug.cl.cam.ac.uk 7cded01029 g/c unused xcs.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-07 19:01:05 +00:00
cl349@firebug.cl.cam.ac.uk a69c14185c Disable xcs stop from xend script since it kills xenstored now.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-06 17:18:28 +00:00
cl349@firebug.cl.cam.ac.uk 208cd71bf7 Add support for XENSTORED_TRACE to enable trace output from xenstored.
Set XENSTORED_TRACE in /usr/sbin/xenstored's environment to enable the
trace output.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-17 09:50:26 +00:00
cl349@firebug.cl.cam.ac.uk c2bf763b7f Make xen daemon startup more robust.
1) make xenconsoled exit gracefully if xcs dies
2) daemonize xenstored before binding to xenstored socket
3) wait to close stdio in xenstored until we're ready to accept
connections (so that PID=`xenstored --output-pid` doesn't return until
it's ready to accept connections)
4) updates tools/misc/xend for these changes
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustycorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-10 09:46:51 +00:00
kaf24@firebug.cl.cam.ac.uk 2ba532d767 Rename console binaries to xenconsole and xenconsoled.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-08-07 09:12:55 +00:00
kaf24@firebug.cl.cam.ac.uk 1126965540 Attached are
three patches to fix a problem with Xend starting consoled.  consoled 
depends on xenstored to be running and xenstored is started on demand in 
Xend.  The patches change xenstored to manage its own pidfile, and have 
xend start actually start up xenstored.
2005-08-04 18:51:55 +00:00
kaf24@firebug.cl.cam.ac.uk f6d93de51e The attached patch removes all of the console handling code from Xend
and changes xm to simply exec /usr/libexec/xen/xc_console.

I've done a pretty good amount of testing and this seems to clear up all 
of the Xend console issues in bugzilla.

This is a pretty big change to Xend though with a lot of deleted code so 
I'd appreciate if people more familiar with the Xend codebase could look 
through it critically.

In addition to the patch, the following files are no longer used:

tools/python/xen/util/console_client.py
tools/python/xen/xend/XendConsole.py
tools/python/xen/xend/server/SrvConsole.py
tools/python/xen/xend/server/SrvConsoleDir.py
tools/python/xen/xend/server/console.py

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-04 09:00:16 +00:00
iap10@tetris.cl.cam.ac.uk 227aeb4d79 bitkeeper revision 1.1717 (42b3442b7kXKhXN5lvR9spIGT5LsYQ)
When xend starts, it fires off xcs.  If you're running on a slow
machine its possible that xcs started but xend didnt wait long 
enough to notice.  The attached patch loops several times while 
waiting for xcs to come up.  It seems to be working here while the 
original is not (slow machine here).

From: Tim Newsham [newsham@lava.net]
Signed-off-by: ian@xensource.com
2005-06-17 21:44:11 +00:00
cl349@firebug.cl.cam.ac.uk 50f2601af9 bitkeeper revision 1.1533 (429379beNzrMmx_MJCmvdmLhK3EMfw)
migrate.py, params.py, SrvDaemon.py, xend, Makefile:
  Remove xfrd now that save/restore doesn't use xfrd anymore.
console.py:
  Remove/disable debug output.
.del-check_twisted~f74b05eb88f208a1:
  Delete: tools/check/check_twisted
xend:
  Twisted is no longer used -- remove check whether it's installed or not.
.del-Makefile~474b093f3e64d016:
  Delete: tools/xfrd/Makefile
.del-xfrdClient.py~d1d33f981191dfa:
  Delete: tools/xfrd/xfrdClient.py
.del-xfrd.h~54f8ea6e77cf4f26:
  Delete: tools/xfrd/xfrd.h
.del-xfrd.c~e3be851c3a4297a5:
  Delete: tools/xfrd/xfrd.c
.del-xen_domain.h~4a0c609ff18c63a8:
  Delete: tools/xfrd/xen_domain.h
.del-xen_domain.c~cd85f330a909fbce:
  Delete: tools/xfrd/xen_domain.c
.del-select.h~348b2b069dd5748:
  Delete: tools/xfrd/select.h
.del-select.c~373282d5f920303d:
  Delete: tools/xfrd/select.c
.del-marshal.h~9929a72563171372:
  Delete: tools/xfrd/marshal.h
.del-marshal.c~3108fab658d2220:
  Delete: tools/xfrd/marshal.c
.del-lzi_stream.h~49308e7b16ba42e3:
  Delete: tools/xfrd/lzi_stream.h
.del-lzi_stream.c~e1870394f081f255:
  Delete: tools/xfrd/lzi_stream.c
.del-debug.h~c268d8f144e5e4da:
  Delete: tools/xfrd/debug.h
.del-connection.h~ac7cb6a42316a421:
  Delete: tools/xfrd/connection.h
.del-connection.c~c025e96fc5649424:
  Delete: tools/xfrd/connection.c
.del-Make.xfrd~5a18d2f63aad1d40:
  Delete: tools/xfrd/Make.xfrd
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-24 19:00:14 +00:00
kaf24@firebug.cl.cam.ac.uk 99124bb409 bitkeeper revision 1.1378 (426ca26eUpP7OInuOBvTyETb6y9VRQ)
Add /usr/lib64/python to the path for python tools so that they can be
found on 64-bit platforms.
Signed-off-by: Jerone Young <jyoung@us.ibm.com>
2005-04-25 07:55:26 +00:00
iap10@freefall.cl.cam.ac.uk 7af13f54d1 bitkeeper revision 1.1306 (42604119SDlzs7R1nEPCLSovtVOJ7A)
Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
2005-04-15 22:32:57 +00:00
katzj@redhat.com[iap10] c9505fed46 bitkeeper revision 1.1159.258.97 (42603992S3sF-t0yBth7NEBevozVOg)
[PATCH] Make non-native python path handling a
> > Although I don't really agree with the installing of the
> > python bits to the non-native paths, I can see where it's
> > useful as long as the module ABI doesn't change if you're
> > trying to distribute binary tarballs.  But with the current
> > handling it adds module lookup costs for the native path case
> > (which would be the norm) as well as prevents using
> > PYTHONPATH to look to a different location for the modules.
> >
> > The attached patch changes things so that at first, the xen
> > module is attempted to be imported from the stock paths.  If
> > we get an ImportError exception, then it adds /usr/lib/python
> > to the end of the python path and imports again.
>
> Do you prefer this to just unconditionally addding /usr/lib/python to
> the end of the path rather than the front?

Slightly, but just because having /usr/lib/python in my sys.path is
ugly :-)  I can look over it, though... patch doing that attached

Signed-off-by: Jeremy Katz <katzj@redhat.com>

===== tools/misc/netfix 1.13 vs edited =====
2005-04-15 22:00:50 +00:00
kaf24@firebug.cl.cam.ac.uk a1af03bac4 bitkeeper revision 1.1236.34.7 (423735acABhfn7rysHwGJkcVOLD6GA)
XCS cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-15 19:21:16 +00:00
akw27@arcadians.cl.cam.ac.uk acf79a97a3 bitkeeper revision 1.1236.25.20 (423576ddv67ZIGUBXLyQsmLCTyT6NA)
Bunch of little xcs fixes.

Signed-off-by: andrew.warfield@cl.cam.ac.uk
2005-03-14 11:34:53 +00:00
kaf24@scramble.cl.cam.ac.uk 8d22f23fd3 bitkeeper revision 1.1236.1.60 (42299622PoSV4xT6Ds22AHb8mP24xA)
XCS binds thru /var/lib/xen and gives better error message if this
fails.
Signed-off-by: Muli Ben-Yahuda <mulix@mulix.org>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-05 11:21:06 +00:00
iap10@freefall.cl.cam.ac.uk 82d1ce9852 bitkeeper revision 1.1236.1.39 (422385e3JUTcpAnifvTDP-tLQGjpug)
trivial fix to remove time.usleep 
Signed-off-by: ian@xensource.com
2005-02-28 20:58:11 +00:00
akw27@arcadians.cl.cam.ac.uk 626a253ce5 bitkeeper revision 1.1236.1.29 (421facf0U_Bl4zERFH7SO_Vg0H8Ebg)
Move xcs to unix domain sockets.

signed-off-by: akw27@cl.cam.ac.uk
2005-02-25 22:55:44 +00:00
kaf24@scramble.cl.cam.ac.uk 61618a0936 bitkeeper revision 1.1159.217.10 (41e4efd62HR6KHx5S8553JDf-xT3zg)
Merge scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
2005-01-12 09:37:26 +00:00
kaf24@scramble.cl.cam.ac.uk cf36fcf0e3 bitkeeper revision 1.1159.170.89 (41e4ef8aHmcX3lP2zVDZBpN59cSX6A)
Python packages always install to ${prefix}/us/lib/python/xen/...
2005-01-12 09:36:10 +00:00
kaf24@scramble.cl.cam.ac.uk 8b313272dd bitkeeper revision 1.1159.1.525 (41d58ba8VgPwkfEiKrUXF8b7LLwQ5Q)
Andy's control-interface message switch -- first cut.
2004-12-31 17:26:00 +00:00
kaf24@freefall.cl.cam.ac.uk 4b3444f92a bitkeeper revision 1.1159.149.1 (4187c1c8_Vcj2qeTWowskcZY0OAlfQ)
Build cleanups.
2004-11-02 17:20:08 +00:00
kaf24@freefall.cl.cam.ac.uk 90d122ec63 bitkeeper revision 1.1159.79.1 (414b5fab__RjPaRIcKFGQmiG7K6ggA)
SrvDaemon.py, xend:
  Xend daemonization fixes from Charles Coffing.
2004-09-17 22:05:31 +00:00
mjw@wray-m-3.hpl.hp.com 851e908f9a bitkeeper revision 1.1108.1.2 (40fd3202hesHtZpdMd1v994DiPkgZw)
Make xend check its prerequisites more carefully.
Add python logging package (standard from python 2.3).
2004-07-20 14:53:54 +00:00
mjw@wray-m-3.hpl.hp.com 6d83f76bb1 bitkeeper revision 1.1074 (40f3b27b9znWwwTVgEKSTwPzTJCS0w)
Check Twisted version.
2004-07-13 09:59:23 +00:00
mjw@wray-m-3.hpl.hp.com 48e9a9c636 bitkeeper revision 1.1026.1.8 (40e1b09foCFBM0EuIgrSA1uLJrWuzA)
Restructuring the python code and libs - first stage.
2004-06-29 18:10:39 +00:00