Commit Graph
939 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com 7e6a2a3288 Remove the diagnostic/recovery when two domains end up with the same name. It
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 17:49:56 +01:00
emellor@leeni.uk.xensource.com 633d294bb5 Merge. 2005-10-13 15:26:44 +01:00
emellor@leeni.uk.xensource.com 043da08cae Fix broken test for zombies.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-13 15:25:42 +01:00
kaf24@firebug.cl.cam.ac.uk 8abc2d5b4e Fix multi-cpu save/restore after the max_vcpu patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 15:19:29 +01:00
kaf24@firebug.cl.cam.ac.uk 98adab9284 Add a option for enabling ne2000 NIC device model
Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2005-10-12 17:04:11 +01:00
kaf24@firebug.cl.cam.ac.uk 523636b3b7 New dom0_op to set max vcpus for a domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 16:34:49 +01:00
emellor@ewan 3e500e67eb Make the error reporting back to xm just a little bit less insane, and fix a
missing import inside blkif.  Fix the command parsing for op_device_destroy and
op_device_configure -- the device IDs should be strings, to allow the user to
specify devices by name as well as number.

This is the second half to the fixes for bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:13:32 +01:00
emellor@ewan 5ca91af2f8 Ignore any watches that fire for which we do not have a registration. This can
happen if there are watches in flight at the same time as a deregistration, and
also seems to happen spuriously on xend restart.

This fixes the Invalid token error that has been seen on xend restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 13:00:55 +01:00
emellor@ewan 0041d06c95 Don't try and call DevController if we can't destroy a device ourselves,
because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers.  Fixes bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:56:52 +01:00
emellor@ewan c74a06ff24 Improve error message. 2005-10-12 12:54:43 +01:00
emellor@ewan db778d68dd Explicitly state which architectures are going to use /usr/lib64, to allow for
the fact that Itanium does not.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 12:04:45 +01:00
emellor@ewan bd0321055f Added missing __init__.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 11:51:52 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
emellor@ewan e2c103e485 Fix deadlock in XendDomainInfo when a domain is cleaned up. We are renaming
the domain, to make it clear that it is a zombie, but this renaming cannot
check the uniqueness of the new name, because this causes a deadlock with
XendDomain.  Instead, we allow the name to be non-unique for the case of
zombie domains.

Change the locking in waitForShutdown and state_set to be robust in the face of
exceptions.

Rename the STATE_VM_ constants to STATE_DOM_.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:11:35 +01:00
emellor@ewan 9887530801 Change import that was confusing pylint (this is a pylint bug, I think).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:08:01 +01:00
emellor@ewan 2543c86b2a Issue diagnostics if xm is being run as a non-root user. This used to happen,
but the triggering error has moved, so the diagnostics were broken.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-12 10:07:04 +01:00
djm@kirby.fc.hp.com e57d870ddd Merged 2005-10-11 16:57:44 -06:00
emellor@ewan 2d15771b61 Bring out the common console-handling code from main.py and create.py.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 15:01:43 +01:00
emellor@ewan 562df47667 Added auxbin module, for handling auxillary binaries.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:59:52 +01:00
emellor@ewan ed7f93c25b Remove bang path.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:57:28 +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 72e4987ea3 Added missing global statement, to ensure that the logfilename variable is
updated.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:33:31 +01:00
emellor@ewan 9a60ba6eb8 Fix broken xm commands.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:32:03 +01:00
emellor@ewan a499c2d2dd Added doccomment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 10:30:13 +01:00
emellor@ewan 5119e92a73 Fix for "unsubscriptable object" error, courtesy of Kurt Garloff
<garloff@suse.de> -- missing comma in op_mem_target_set.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 00:03:00 +01:00
emellor@ewan d0c7f9b2ad This patch fixes an error in the xm create path when the
xc.domain_create call fails (eg, when ACM policy prevents creation of a
domain).  When xc.domain_create fails, dompath never gets set.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
2005-10-10 19:06:14 +01:00
emellor@ewan dc988367d8 Rewritten XendLogging to not be a singleton class, and not have methods used
from nowhere at all.

Log to a temporary file if permission is denied to log to /var/log/xend.log,
as happens when you are not root.  Fixes bug #305.

Remove all the log-related garbage from XendRoot -- just about every module
was going straight to XendLogging.log already, so there was no need to have
XendRoot replicate this functionality.

Remove XendRoot.event_handler, which hasn't been in use since the EventServer
was removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-10 16:15:48 +01:00
kaf24@firebug.cl.cam.ac.uk 25517fd2f2 Extend xenbus/xenstore client interface to include a transaction
handle on appropriate operations. Next step is to plug this
through to the store daemon and get rid of the nasty serialisation
mutex for transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 21:29:10 +01:00
kaf24@firebug.cl.cam.ac.uk 4657d174ab Refactor xenbus to break up the xenbus_lock and permit watches
to fire concurrently with request/reply pairs. Remove
watch_ack message: no longer needed.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 18:52:54 +01:00
emellor@ewan a513eb7d88 Alter logging statements to move the interpolation inside the logging function,
meaning that it will only occur if the message is to be logged.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 12:20:12 +01:00
emellor@ewan 94f779dfb1 Remove unnecessary extraction of ssidref from config inside restore -- this
is now handled by the construct call, which restore has recently started using.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 12:16:23 +01:00
emellor@ewan 9d12287d14 /home/emellor/log2 2005-10-09 12:14:46 +01:00
emellor@ewan e156cce3a4 Remove cruft.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:59:37 +01:00
emellor@ewan 9c04557e2d Remove code seeding RNG from /dev/urandom. The random module's default RNG is
already seeded from the clock, so this is unnecessary, non-portable, and
expensive.  This should improve start-up time of Xend.  Replace twisty maze of
code with something sensible.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:57:24 +01:00
djm@kirby.fc.hp.com c575162f2a Merge 2005-10-08 14:28:24 -06:00
kaf24@firebug.cl.cam.ac.uk 7429d6e032 Make libxenstore thread-safe. It also spawns an internal
thread to read messages from the comms channel.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-08 19:19:27 +01:00
kaf24@firebug.cl.cam.ac.uk 7951aaa23a Some cleanup in TPM-related files and implementation of functionality that
got lost when switching to xenbus.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-07 23:22:35 +01:00
kaf24@firebug.cl.cam.ac.uk 76bd51c23d Change xs_read_watch interface to return a sized array (in userspace and in
kernel).

Add index macros (XS_WATCH_*) for accessing the array to allow for future
expansion.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-07 15:51:53 +01:00
emellor@ewan a87cea82c0 Regig the construction of new domains so that restore and create can share the
construct method.  This ensures that the domain will have any stale paths in
the store removed on restore.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 13:34:10 +01:00
emellor@ewan c1a792dbf3 Merge. 2005-10-07 11:01:23 +01:00
emellor@ewan 1c7d85f77f Rename the source domain on migration, regardless of the live flag. This fixes
localhost non-live migration, and bug #297.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 10:58:41 +01:00
kaf24@firebug.cl.cam.ac.uk f16cb294c5 Big simplification of the Xen event-channel interface.
EVTCHNOP_bind_interdomain in particular is much simpler.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 10:57:13 +01:00
emellor@ewan 57e576dc3c Fix conflicting merge.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-07 00:21:00 +01:00
emellor@ewan 2a3e2af26c Merged. 2005-10-06 19:43:11 +01:00
emellor@ewan fa670bf40e Remove xm commands block-refresh and vbd-refresh, as these are unsupported.
Allow xm block-detach to take a device name as well as a device ID.  This
closes bug #285 and fixes xm-test's 01_block-destroy_btblock_pos.py and
02_block-destroy_rtblock_pos.py.

Rename and reconnect XendDomainInfo.configureDevice to reconfigureDevice.
There is nothing using this at the moment, mind you.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 19:41:29 +01:00
kaf24@firebug.cl.cam.ac.uk 07a233ac7c User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 17:02:38 +01:00
kaf24@firebug.cl.cam.ac.uk c804adf4b6 Change how event channels are allocated and used by the control
tools. /dev/xen/evtchn is now used by daemons to connect to
remote domains: the advantage is that the local ports are garbage
collected automatically if the daemon dies. xen no longer
constructs end-to-end event-channel port pairs -- it allocates an
unbound port in new domU and writes that port to xenstore. It is
then picked up by teh appropriate daemon which does interdomain bind
via /dev/xen/evtchn.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 16:07:52 +01:00
emellor@ewan 0c6f366280 Added Zope's test.py, and a unit test to sxp. This test itself isn't very
exciting, but it's there to encourage the creation of more interesting ones.  A
test target has been added to the main Makefile, and the one in tools/python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 15:12:31 +01:00
emellor@ewan 705f86977c Merged. 2005-10-06 11:12:55 +01:00
emellor@ewan 0465a697d3 Rename all dying domains to be prefixed with Zombie. This allows a new domain
to be created with the same name, fixing the race condition inside XendDomain
that caused bug #278.

Move the state_set(TERMINATED) call onto the end of cleanupDomain rather than
destroyDomain, so that this flag is set when XendDomain cleans up a domain
that was killed without going through Xend.

Remove is_terminated, as this check is no longer necessary, since we are using
Zombie prefixes instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-06 11:09:14 +01:00