Commit Graph
1125 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com fa45226f84 Move the translation from pages to MiB out of XendNode and into the xc layer.
xc has access to the page size for the platform and the Python layer does not,
so there was a hardcoded "/ 256" in there.

Rename the "memory" physinfo parameter to "total_memory", to match the usage
elsewhere.

Tidy the code generating the SXP for xm info.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-30 18:43:00 +00:00
emellor@leeni.uk.xensource.com 9d72feba41 Cope with longs being passed to xstransact.write.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-30 18:38:48 +00:00
emellor@leeni.uk.xensource.com 5c9e232d3d Merged. 2005-11-29 15:00:27 +00:00
emellor@leeni.uk.xensource.com e01408a262 Increase device timeout to 10 seconds, as restarting a DHCP server takes a few
seconds, so we need to allow for that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-29 15:00:01 +00:00
pl@us.ibm.com 0cf194e2b0 Fix minor traceback in xen-bugtool when send fails 2005-11-29 01:00:10 +00:00
emellor@leeni.uk.xensource.com 81f77d8400 Change uuid string format to match that outputted by Xen.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-28 16:48:25 +00:00
emellor@leeni.uk.xensource.com 08006b1a91 Use StringIO to simplify string_iterator here. Altered the up-front
documentation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-28 12:21:17 +00:00
emellor@leeni.uk.xensource.com 74f2b3c56d Added xen-bugtool, an application that collects various system logs and can
save them as a tarball, or submit them to a pre-existing bugzilla bug.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-28 01:47:28 +00:00
emellor@leeni.uk.xensource.com fd3a649380 Remove keyword from call to xc.domain_setmaxmem; keyword support for this call
was removed with changeset 7955:f72da8799418.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-27 01:28:11 +00:00
smh22@firebug.cl.cam.ac.uk d8fa063ad2 Fix save/restore and migrate on x86_64.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-26 12:13:39 +01:00
emellor@leeni.uk.xensource.com 9d71c153ea Added a comment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-26 00:38:45 +00:00
emellor@leeni.uk.xensource.com d966085083 Check when using physical devices that the device is not already in use. Using
a device from two guests, or from dom 0 and a guest, can destroy the filesystem,
and this check prevents that.  This should ensure that the xm tests
11_block_attach_shared_dom0 and 12_block_attach_shared_domU should pass.
Closes bug #331.

Devices may be shared only if all uses are read-only.  If anyone has read-write
access to a device, then no sharing is allowed.

The mode in the config file may now have an exclamation mark appended, to
indicate that devices may be shared (i.e. that this new check should be
bypassed).  This supports some network block devices, but is clearly dangerous
and should only be used when you know what you are doing.

The mode specified in the config file is now written explicitly to the store,
To implement this, the blkback driver has been changed to create two entries
in /sys describing each device in use.  This means that we can determine which
devices are in use without crawling through the store.

The physical-device node has been changed to give the major and minor of the
device, separated by a colon.  This means that we do not need to pack these
numbers into one, removing the restriction to 8 bit minors that we had in place
before.

The mode specified in the config file is now written explicitly to the store,
rather than using the presence or absence of a read-only node.  This supports
the write-sharing override above.

If the device is in use, a new hotplug status of "busy" is written to the
store, and a message is written to a new hotplug-error node.  Xend uses these
things for diagnosis.

The block scripts do not need to handle online or offline events, so this
support has been removed.  These scripts can be called twice, depending upon
the hotplug config, so they now identify the second run and do not attempt to
set up the device again.

The device directories in the store are cleaned out before new details are
written there.  This prevents stale information from messing up block device
hotplugging.  This will be one cause of "blkback: changing physical device
not supported" messages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 20:58:07 +00:00
emellor@leeni.uk.xensource.com b7a3863d9a Fix handling of devid_end when devid is an integer, but not present as a device.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:05:45 +00:00
kaf24@firebug.cl.cam.ac.uk b588d4451a Update vtpm driver following the recent changes to the
xenbus driver and its semantics.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-11-25 09:14:01 +01:00
emellor@leeni.uk.xensource.com 114f16d3fb Programmatically generate the xm help strings from the snippets, rather than
splicing the strings together manually.

Replace the word "bogus" with the command in question where it appears, as this
shows up in the Usage statements.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 19:56:38 +00:00
emellor@leeni.uk.xensource.com 5840748740 Check whether a device is already configured before trying to configure it
again.  Closes bug #397.

To perform this check in the same transaction as the writing of the device
entries has required a little bit of rejigging.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:57:36 +00:00
emellor@leeni.uk.xensource.com 2bf2793e18 Support destruction of device by /dev/sda1 (for example) even when the
configuration just said sda1.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:55:49 +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 3ad90d3df7 Added comment describing usage.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 19:31:14 +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 8856d17150 imported patch my-config 2005-11-23 19:19:23 +00:00
emellor@leeni.uk.xensource.com 30f626794c imported patch logging-thread.patch 2005-11-23 19:19:23 +00:00
emellor@leeni.uk.xensource.com f7ba489565 Fix to xm create --help from Ken Grant.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 12:29:58 +01:00
smh22@firebug.cl.cam.ac.uk 297fc3718d Fix syntax error.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-21 19:28:50 +01:00
emellor@leeni.uk.xensource.com 10edfe8abf Merged. 2005-11-21 19:08:44 +01:00
emellor@leeni.uk.xensource.com cd082ee2d3 Misc fixes for breakage when moving to new Python/C interface style.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 19:08:27 +01:00
kgrant@localhost.localdomain b12096d703 use help in create.py for "xm help create" 2005-11-21 18:53:31 +01:00
xenrtd@shispar-rt.testdev.hq.xensource.com 859804fbea Catch parsing errors in xm create. 2005-11-21 18:52:40 +01:00
emellor@leeni.uk.xensource.com dd6ab4433e Merged. 2005-11-21 18:47:31 +01: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 2b2f00d237 Tidy use of module / package names.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 18:34:25 +01:00
emellor@leeni.uk.xensource.com 4922a76ab2 Merged. 2005-11-21 18:33:27 +01:00
emellor@leeni.uk.xensource.com 78d2a7ffe3 Return the changed path as an argument to the watch callback. This is useful
for the test CD, and simplifies DevController everso slightly.  It ought to be
generally useful, too.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 18:33:17 +01:00
emellor@leeni.uk.xensource.com e9653b1204 Remove many unnecessary uses of keyword arguments, to reduce complexity.
Have the self parameter to all the methods be an XsHandle, not a PyObject, to
avoid casting.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 17:48:22 +01:00
emellor@leeni.uk.xensource.com 0bed005388 Fix removal of use of scheduler, broken earlier today by mismerge.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 17:30:22 +01:00
emellor@leeni.uk.xensource.com f7abab3a59 Replace initialiser for readonly parameter in xshandle_init that should never
have been deleted.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 14:48:10 +01:00
emellor@leeni.uk.xensource.com 5d1f08e233 Merged. 2005-11-21 13:17:29 +01:00
emellor@leeni.uk.xensource.com 10201a9dd6 Removed, now unused.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:15:08 +01:00
emellor@leeni.uk.xensource.com 9282de479a Append the new device config to our internal structure, in device_create. This
will preserve the new device config across migration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:14:38 +01:00
emellor@leeni.uk.xensource.com 431db49359 Catch RuntimeError inside initDomain, for better handling of out-of-memory, etc.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:13:57 +01:00
emellor@leeni.uk.xensource.com 875af1a9da Remove last remaining use of scheduler.py, so we can remove the whole module.
It's not worth a whole module to save us 8 characters of typing to start a
timer.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:12:09 +01:00
emellor@leeni.uk.xensource.com 8a20de98b5 Downgrade debug message to level "trace".
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:09:45 +01:00
emellor@leeni.uk.xensource.com cab9735d16 Added another test. Fix the existing tests to close the written config file
before running the test upon it, to ensure that the file is flushed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:03:45 +01:00
emellor@leeni.uk.xensource.com bbd9571e5f Added reset method to Opts so that create.parseCommandLine can be used more than
once.  This makes it possible to unit test this code.  Remove the odd aliasing
of gopts to opts inside parseCommandLine.

Rename local variables globals and locals inside opts.load -- these are built-in
functions.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 13:00:36 +01:00
emellor@leeni.uk.xensource.com 8b3050a110 Remove whole piles of cruft from the connection layer. The only thing that was
using connectionMade, connectionLost, startedConnecting, clientConnectionLost,
and clientConnectionFailed was the test classes (TestClientFactory,
TestClientProtocol, TestServerFactory, TestServerProtocol), so they were
actually testing lots of code that no-one else was using.  All these classes
have gone, freeing up lots of cruft around.

The useless classes Factory, ServerFactory, ClientFactory, RelocationFactory,
UnixServerConnection, and TCPServerConnection have gone, in favour of passing
the Protocol class directly to SocketListener, and using SocketServerConnection 
directly.

connectTransport has gone, in favour of overriding connect directly.

Piles of closedown cruft has gone, as this was only supporting the correct
output of connectionLost events, none of which we need.

Unused SocketServerConnection.{getHost,getPeer} have gone.

Mark some parameters in relocate as unused.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:55:51 +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 0858255f54 Fix typo, and failure to unpack singleton tuple correctly.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:42:47 +01:00
emellor@leeni.uk.xensource.com 8c71f5197b Added unit test for the DevController subclasses.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:41:39 +01:00
emellor@leeni.uk.xensource.com dcae872252 Change the module registration declarations and change the object creation and
deallocation to match those in the Python/C tutorial.  This has been done to
make the interface here more conventional, in the hunt for bug #411.  One
double deallocation has been fixed, but this would only occur if we failed to
create the connection to Xenstore, and so unfortunately is not the cause of
that bug.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:40:02 +01:00
emellor@leeni.uk.xensource.com 3afa97b0f2 Remove all unnecessary uses of keyword arguments, to reduce complexity. In
many places we were supporting keywords for calling the methods here, and never
using that feature (especially where all the arguments were compulsory anyway)
and in some places we were even accepting positional and keyword arguments, and
not actually taking any arguments to the method at all!

Fix the permission parsing string in xspy_set_permissions -- this would have
blown up horribly if anyone were actually calling this code.

Fix the documentation comments to include the transaction handle throughout.

Have the self parameter to all the methods be an XsHandle, not a PyObject, to
avoid casting.

Remove unused pyvalue_int and pyvalue_str.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-21 12:34:37 +01:00