Commit Graph
88 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain c0b4bd476a [XEND] Open xend-debug.log in append mode.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-25 10:27:03 +01:00
Alastair Tse 84b4b812e6 [SOLARIS] Xen daemons are managed separately, so we need a way to start
just xend, and we need to disable xend's self-restarter.

Merged with Xen API Tree.

Signed-off-by: John Levon <john.levon@sun.com>
2006-10-19 11:36:49 +01:00
Alastair Tse a69280ed5e [XEND] Add some sort of rudimentary version embedding into the source
so we can report the Xend version number as opposed to Xen's version
number.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 12:27:56 +01:00
Alastair Tse ef46d763af [XEND] Make XMLRPC Server shutdown cleanly.
We can now catch the end of Xend and clean up domains accordingly.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
atse@norwich.uk.xensource.com 2b9f3d434d [XEND] Minor syntax change
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-07-14 11:49:24 +01:00
kaf24@firebug.cl.cam.ac.uk 5308dc5660 Debugging Xend with XEND_DAEMONIZE set to False doesn't work as
expected.  Xend actually creates two children and the XEND_DAEMONIZE  
flag only prevents one of the children from being created.  This  
patch causes none of the children to be created.  With this patch,  
Xend functionality is performed in the process executed from the  
command line (i.e., /usr/sbin/xend).  This patch makes it possible to  
debug Xend with pdb.

Signed-off-by: Randy Thelen <rthelen@netapp.com>
2006-04-30 09:52:59 +01:00
emellor@leeni.uk.xensource.com 296749cb10 Don't try and close the pipe to the grandparent if it has already been closed
(i.e. we have restarted Xend).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-13 00:10:19 +00:00
emellor@leeni.uk.xensource.com 3b7940ffef Minor import tidy.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-12 16:24:32 +00:00
emellor@leeni.uk.xensource.com 9ab74b250b Add one more fork to the Xend start-up process, this time with the parent
staying alive to watch the child.  If the child crashes, then the parent
starts another one in its place.  This provides robustness in the face of
crashes like one currently tracked as bug #411.

Tidy up chunks of SrvDaemon.py on the way past.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-09 10:49:29 +00:00
emellor@leeni.uk.xensource.com d2b3b7424b Detach Xend from terminal, courtesy of Horms <horms@verge.net.au>.
* For setsid to effectively detach a process from the terminal,
  the following needs to occur:

    fork ()   Return control to the shell
    setsid () New session with no controlling terminal
    fork ()   The session leader (parent) exits and thus
              the resulting child process can never regain the terminal

  This patch adds the second fork

* The call to self.daemonize(), which now forks, is moved to
  run before self.tracing(), as now that it actually disconnects
  from the terminal, and thus the prevailing process, the trace
  loses the processes created in self.run().

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 16:17:53 +00:00
emellor@leeni.uk.xensource.com f6d80a7f57 Reverse accidental commits for changesets 8001 and 7996-7999.
The Mercurial Queues extensions suddenly looks a lot less useful than it first
seemed.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 19:37:33 +00:00
emellor@leeni.uk.xensource.com a14862a927 imported patch trace-thread.patch 2005-11-23 19:19:24 +00:00
emellor@leeni.uk.xensource.com aecd7580d4 As with xs.c, change the module interface to match the current Python/C
tutorial, simplifying the interface here, and making it more conventional.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 18:46:09 +01:00
emellor@leeni.uk.xensource.com 8c4aff7e06 Added method so that SrvDaemon can be run in the foreground without all the
forking implied by the start method.  This makes it easier to run valgrind
against Xend, or run it with a pydebug-compiled Python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:44:43 +01:00
emellor@leeni.uk.xensource.com 3bbe6d0380 Removed the event server, and all it entails. This is unused, and a big pile
of crusty rubbish.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-31 16:56:34 +01:00
chris@ubuntu.eng.hq.xensource.com be8604faf3 Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-24 19:04:30 -07:00
emellor@leeni.uk.xensource.com 3896d075f8 Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 15:31:51 +01:00
emellor@leeni.uk.xensource.com 174e923813 Output the Xen changeset in the logs at start of day.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:08:48 +01:00
emellor@leeni.uk.xensource.com a77149f8e4 New network-bridge script and associated gubbins.
This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
  (the ifup may otherwise figure that the veth0 hardware is
   NOT the same as the original ${netdev} and not use the same
   config -- this happens on SUSE. Charles Coffing tracked this
   one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 16:24:54 +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
emellor@ewan 39f62611c4 Removed the EventServer, replacing the events fired with simple logging
messages.  This closes bug #281.  Removed references to XendRoot where these
have become unnecessary either through the work above or just through time.

Renamed some parameters in event.py, to mark them as unused.  Fix a call to a
base class constructor there too.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-05 11:43:23 +01:00
emellor@ewan 30c72ff29e Explicitly close files.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-04 23:56:42 +01:00
emellor@ewan d67469375a Remove unused imports, variables.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-27 22:09:12 +01:00
cl349@firebug.cl.cam.ac.uk 403d1cc0a8 Remove last remaining "import controller" occurences.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-19 11:01:18 +00:00
cl349@firebug.cl.cam.ac.uk 71a28c9e9d Make dom0_enforce_cpus() use vcpu_hotplug rather than directly modifying the sysfs entries.
Directly modifying the sysfs entries causes the xenstore state of
a cpu's availability to be incorrect.  Also slightly modify the
dom0-cpus description in the xend-config.  Rather than specifying which
dom0 vcpus are to be used, it is now a target of how many vcpus to use
as pinvcpu ops are the preferred method for setting which physical cpu a
vcpu uses.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 19:08:36 +00: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 78552ee77c g/c unused control message code.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-07 18:28:04 +00:00
cl349@firebug.cl.cam.ac.uk 940e39c97f Remove python virq code.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-07 14:19:05 +00:00
shand@ubuntu.eng.hq.xensource.com 1f1e576a4a Fix nasty tools race between barking xu_autoreap() and xpopen3.wait() -
save/restore now seems more robust from a tools pov at least. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-28 21:40:36 -08: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 084dedfee3 This patch does 2 jobs:
- Enforce the number of CPUs dom0 will take. See the new variable
"dom0-cpus" in xend-config.sxp (you will want to set this variable to
1 on SMP systems)

- Balloon out dom0 memory when creating domU, if there is not enough
free memory. The lowest level we will balloon out is configured via
the new variable "dom0-min-mem" in xend-config.sxp


I still have a doubt: where to put the code to enforce dom0-cpus. At
the moment I put it into
python/xen/xend/server/SrvDaemon.py, and hopefully that is resonable
enough. Any comment?



Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-07-29 10:36:53 +00:00
cl349@firebug.cl.cam.ac.uk 55e1cda4c0 Make XENSTORED_DEBUG create a xenstored trace logfile.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-07-27 17:03:00 +00:00
cl349@firebug.cl.cam.ac.uk 57c8cb2125 bitkeeper revision 1.1662.1.20 (42a8054awYd-HJnwjnXqXtWmKbE1Yw)
SrvDaemon.py:
  Disable kill of xenstored on xend exit.
xu.c:
  Set error reason in failure case.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-09 09:00:58 +00:00
cl349@firebug.cl.cam.ac.uk 8359d0386f bitkeeper revision 1.1662.1.16 (42a59915qzJ0eBmm6tVyIARo8G0cXA)
params.py, SrvDaemon.py:
  Add xenstored.
ignore:
  Add tools/xenstore/xenstored.
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-07 12:54:45 +00:00
cl349@firebug.cl.cam.ac.uk 94a75e0212 bitkeeper revision 1.1662.1.4 (42a449c17mlN0vfY0fcb2leEnvVb-A)
usbif.py, netif.py, controller.py, console.py, blkif.py, XendDomainInfo.py:
  Cleanup imports.
XendDomain.py:
  Cleanup imports and some function comments.
  BUG: Add back missing _add_domain call in domain_create.
SrvDaemon.py:
  g/c DEBUG and DAEMONIZE.
XendCheckpoint.py:
  Cleanup domain id/name confusion.
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-06 13:04:01 +00:00
cl349@firebug.cl.cam.ac.uk d057c5ef08 bitkeeper revision 1.1662.1.1 (42a07145CPNIh8TprNz04Qg7x-S7Cw)
xend cleanups from Mike Wray.
XendDomain.py:
  Add comment for domain_mem_target_set.
SrvDaemon.py:
  Use XEND_DAEMONIZE, XEND_DEBUG and XEND_DEBUGLOG.
XendRoot.py:
  Use XEND_DEBUG.
netif.py:
  Unknown domains are called "Domain-%d" % dom.
params.py:
  Add additional parameters and set some parameters from
  environment variables.
blkif.py, XendDomain.py:
  Cleanup whitespace.
XendRoot.py:
  enable_dump default is 'no'.
  enable_dump is a bool.
  Add 'true' and 'false' to get_config_bool.
XendDomainInfo.py:
  Add DOMAIN_CRASH shutdown code.
XendDomain.py:
  Simplify.
  Add domain_dumpcore.
  Move class XendDomainDict outside of class XendDomain.
  Import shutdown_reason from XendDomainInfo.
  Update comment for xen_domain.
PrettyPrint.py:
  Cleanup prettyprintstring.
SrvDir.py:
  Cleanup render_GET.
xc.c:
  Various cleanups.
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-06-03 15:03:33 +00:00
cl349@firebug.cl.cam.ac.uk a49e6a7461 bitkeeper revision 1.1605 (429c2a02hn35DARfsEykCzpBrPrMhw)
SrvDaemon.py:
  Remove unused code.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-31 09:10:26 +00:00
cl349@firebug.cl.cam.ac.uk 8553e6167e bitkeeper revision 1.1550.1.2 (4294a1f1_I9jQ97QY8OTqDCx1kDIUA)
SrvDaemon.py, XendRoot.py, relocate.py:
  Add relocation server.
XendCheckpoint.py:
  Import XendError.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-25 16:04:01 +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
cl349@firebug.cl.cam.ac.uk 627aaffcb5 bitkeeper revision 1.1440 (428a703fGt3asjVc5fTAW72ClnFOog)
Many files:
  g/c _readline{,s} and use regular readline{,s} functions -- the special
  _readline{,s} functions were only needed because of Twisted.
ip.py:
  Also use readlines() instead of xreadlines().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-17 22:29:19 +00:00
mjw@wray-m-3.hpl.hp.com 007d7b6e1e bitkeeper revision 1.1403 (4284c2edzLTGTr4gHmGzYsZMuetTRQ)
Switch to using unix-domain interface on xend instead
of http via libcurl.
Sundry other merges and fixes.
Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-05-13 15:08:29 +00:00
mjw@wray-m-3.hpl.hp.com 5ee95edd62 bitkeeper revision 1.1327.2.11 (426fb893OrpBVeRpaWJ0atIxlG4Hxw)
Add support for unix-domain sockets to consoles and the
event server.

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-27 16:06:43 +00:00
mjw@wray-m-3.hpl.hp.com 084b3e366e bitkeeper revision 1.1327.2.9 (426f9bfcIjY9QAFCPqWBbFw35vclow)
Add support for unix-domain sockets on xend.
Remove some dead code.
Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-27 14:04:44 +00:00
mjw@wray-m-3.hpl.hp.com 890ea518d9 bitkeeper revision 1.1327.2.8 (426cead1A05puWeKCli1otyMkZ6B9A)
Refresh domain list periodically.
Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-25 13:04:17 +00:00
mjw@wray-m-3.hpl.hp.com a2dd80a6ea bitkeeper revision 1.1327.2.4 (426918a34Af7gihN8mTkq-P3KrAZXg)
Remove twisted from save/migrate handling.
This needs to use threads, so add thread support for
http server requests.

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-22 15:30:43 +00:00
mjw@wray-m-3.hpl.hp.com 14a5b54eb0 bitkeeper revision 1.1327.2.2 (4267a9b3MhPpljnjQ5IbfLdzcW2K3w)
Remove twisted from the HTTP server and replace with a 
threaded server. Add classes to provide tcp and unix servers
using threads instead of twisted. Remove use of twisted from
the consoles, event server and HTTP resources

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-21 13:25:07 +00:00
mjw@wray-m-3.hpl.hp.com ebd2e8acfb bitkeeper revision 1.1327.2.1 (4266169fT9qqykPCJWENnvnqwf71kQ)
Refactor domain construction and device controllers to
remove use of twisted. Use threads to dispatch channel
input. Move device controllers into domains.

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-04-20 08:45:19 +00:00
kaf24@scramble.cl.cam.ac.uk 5f53c9cfb8 bitkeeper revision 1.1236.28.1 (42340a42zVMF1dHpLj0Rzok7P9t48Q)
Manual merge.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-13 09:39:14 +00:00
mjw@wray-m-3.hpl.hp.com fd4de8dfe3 bitkeeper revision 1.1159.265.2 (42319500DXIXjiTkjszNpliySomMvA)
Add support for setting the listen address for consoles
and the event port.

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-03-11 12:54:24 +00:00
kaf24@firebug.cl.cam.ac.uk c05cf24716 bitkeeper revision 1.1236.1.75 (4230715amFhBlsGlZ_IAsONxYJw8Dw)
Merge firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
2005-03-10 16:10:02 +00:00