Commit Graph
1110 Commits
Author SHA1 Message Date
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
kaf24@firebug.cl.cam.ac.uk 6242befca2 Small build fix to Python xenstore interface library.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-11-20 10:18:29 +01:00
cl349@firebug.cl.cam.ac.uk ceb4196680 Revert 04a7decd0645b23f1f398340e927eb191f0e754d since it's not needed.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-11-19 04:35:37 +01:00
cl349@firebug.cl.cam.ac.uk ba0f86655c Fix support for sxp domain configuration files.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-11-19 01:59:43 +01:00
emellor@leeni.uk.xensource.com 72af5fff3b Merged. 2005-11-18 16:32:04 +01:00
emellor@leeni.uk.xensource.com 3b7259968a Remove one further reference to network_limit_help that I missed when merging.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 16:31:50 +01:00
emellor@leeni.uk.xensource.com eaa3641b4f Merged. 2005-11-18 14:30:47 +01:00
emellor@leeni.uk.xensource.com 224611c6da Remove barbaric abuse of goto out of one nested block and into a previous one.
Remove one other -- less barbaric but still horrible -- use of goto.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 14:28:38 +01:00
emellor@leeni.uk.xensource.com 7a9a19bd5a From Ken Grant: Add per command help / make help match new man pages.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-18 14:04:53 +01:00
emellor@leeni.uk.xensource.com 2f7678e706 Simplify the logic of each of the functions here, removing the many bizarre
uses of goto that reduce down to return NULL in any case, breaking the common
code out for returning values based upon the success or failure of an
operation, and the common code that parses transaction and path parameters,
used by xspy_read, xspy_ls, and xspy_mkdir.  Break out also the common code
that removes a watch token from the XsHandle watches list.

Use bool rather than int for result values, where this matches the same use
by tools/xenstore/xs.c.

Added missing free in xspy_get_permissions.

Use PySequence_SetItem inside xs_watch, rather than Py_INCREF followed by
PyList_SetItem.  If there is no None entry in the watches list, the code goes
on to append to the list using PyList_Append, and that call takes its own
reference rather than stealing one like PyList_SetItem.  This means that we
were previously leaking a reference if the list was full and so PyList_Append
was necessary.

Use PySequence_SetItem rather than Py_INCREF/PyList_SetItem also where we are
using assigning Py_None into the list, for neatness.

Remove meaningless pipe from xspy_release_domain's arg_spec.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-17 20:17:50 +01:00
smh22@tempest.cl.cam.ac.uk 99e88d6dd7 Trivial fixes for 64bit and xend.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 18:03:48 +01:00
smh22@firebug.cl.cam.ac.uk 4c908cf0e3 Many fixes for save/restore and related areas for PAE in particular. Now
should be able to save/restore successfully on machines with up to 16GB 
and any size of guest. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 17:45:03 +01:00
emellor@leeni.uk.xensource.com 329d8364e0 Merged. 2005-11-16 15:50:36 +01:00
emellor@leeni.uk.xensource.com 02d6c42688 Watch for changes in the /vm section of the store, so that we update our
internal state if the store is configured by an external tool.

We react properly to changes in name and on_{reboot,poweroff,crash}.  Reacting
correctly to vcpus, vcpu_avail, memory, and maxmem will come soon (those code
aspects are already under review).  cpu_weight and bootloader to be considered.

Removed unused and semantically invalid method XendDomainInfo.setDomid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:32:56 +01:00
emellor@leeni.uk.xensource.com 8676593f36 Added an unwatch method, so that XendDomainInfo can unregister the watch from
outside the watch handler.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:27:59 +01:00
emellor@leeni.uk.xensource.com 1edf495b0f Move the registration of the @releaseDomain watch so that we avoid a watch
between the watch firing and the first call to refresh. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-16 15:27:11 +01:00