Commit Graph
1697 Commits
Author SHA1 Message Date
iap10@firebug.cl.cam.ac.uk 90c0e3301d Install libxenstore in /usr/lib64 for 64 bit builds
Signed-off-by: ian@xensource.com
2005-08-10 16:52:03 +00:00
twilkie@paploo.uk.xensource.com cbc34f7812 Fix simple index error in error handling. Now reports correct domain name in error message. 2005-08-10 12:21:39 +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
cl349@firebug.cl.cam.ac.uk 1b8d0b8824 Initialize the xenstore MFN for VMX domains
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-10 08:44:58 +00:00
cl349@firebug.cl.cam.ac.uk 9045816f69 Do not suppress errors on writes outside transactions.
Mike Wray made this change because xend's callbacks were failing
with EROFS, because a transaction was going on.  However, the
solution is to either block callbacks during transactions, or use
a different connection to the store.
We fail ex-transaction activity because it's not clear what the right
behaviour is: it allows deadlock if two people do it, and it implied
your transaction isn't rooted in the right place.

This hack caused the testsuite to fail (obviously), so as a result the
testsuite wasn't run very often.  This caused it to bitrot.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-09 16:16:08 +00:00
kaf24@firebug.cl.cam.ac.uk 09d42caafd Add missing LGPL license notice to python sources
that didn't have them.

Signed-off-by: Mike Wray <mike.wray@hp.com>
2005-08-09 13:17:37 +00:00
kaf24@firebug.cl.cam.ac.uk e7f2cf60b5 merge 2005-08-09 13:04:54 +00:00
twilkie@paploo.uk.xensource.com 8aa46fd245 Updates to SV. New look. Removed and simplified lots of files. 2005-08-09 12:55:18 +00:00
cl349@firebug.cl.cam.ac.uk b9a5e01c19 The following patch is a major restructuring of main.py to be more straight forward, and remove as much code as possible.
It does a number of things:

* It implements the standardized options proposed via my RFC for xm
* It restructures the calling of these functions to be function pointers out
  of a dictionary, instead of subclasses found through inspection
* It consolidates all help info, making it easier to see that the help
  screen looks consistent across commands.  (Per command help isn't yet in
  this patch just global help)
* It moves object importing into the functions that require them only,
  allowing commands like "xm help" to be runable as non root
* It adds command aliasing to provide backwards compatibility with many
  commands (i.e. xm balloon)
* It provides more useful error messages is most fail cases
* It implements a short help by default (which takes < 24 screen lines) as
  requested by Mark W at OLS
* It attempts to trap more exceptions than before and provide useful errors
  based on them (this requires more testing)

This patch makes no changes to any other elements of xen/xm, and works with
all other objects and libraries as is.

Signed-off-by: Sean Dague <sean@dague.net>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-09 12:50:22 +00:00
cl349@firebug.cl.cam.ac.uk b06a5d76b9 Don't expose xenstore daemon-only permission bits through python bindings.
These bits are daemon-only, never come though to userspace.  We already
changed them once and broke compilation: better they had never been
referenced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-09 08:44:29 +00:00
kaf24@firebug.cl.cam.ac.uk 592d8f352a Remove dead file. 2005-08-08 11:10:54 +00:00
kaf24@firebug.cl.cam.ac.uk 0996bc07b9 1) More testing: include tests which I forgot in previous patch, remove
xs_watch_stress, reduce cycles in "make check" random test.
2) xs_crashme: corrupt random packets going to xenstored, watch it
crash.
3) Handle second input from before we finished output on first one.
4) Fix bug where one-arg operations are given zero args.
5) Fix bug where SET_PERMS fails after blocking on transaction.
6) Fix memory leak when DIRECTORY op given no argument.
7) Fail on first memory leak, for better testing.
8) Fix missing waiting_for_ack initialization for new connections.
9) Ensure all input and output is handled for domains so we don't stall.
10) Fix overrun bug in xs_count_strings on non-nul-terminated strings.
11) New test for clients which write without waiting for response.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-08-08 09:13:19 +00:00
kaf24@firebug.cl.cam.ac.uk ea9fb36c36 Really include renamed console files. :-)
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-08-07 09:13:39 +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 652bdea7c1 xend prints out some messages when starting, which is annoying. This
patch send those to xend log file instead - people want them always
know where to find them.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-08-06 15:45:41 +00:00
kaf24@firebug.cl.cam.ac.uk a5af5704b2 This patch changes the vcpu-hotplug handler from using control message
over to using xenstore for triggers.  Dropping the control messages also
fixes the issue with not being able to use xm vcpu-hotplug on dom0.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-08-06 09:50:51 +00:00
kaf24@firebug.cl.cam.ac.uk 32060bbf97 This patch changes the shutdown driver and xend to use strings instead
of codes for signaling a shutdown request.

Also, we fix the return code for the shutdown notifier, so other
notifiers will get to run ;)

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-08-06 09:48:47 +00:00
kaf24@firebug.cl.cam.ac.uk a3cbc30d9f xenstored has had a testsuite for some time. This splits the test
targets into "make -s check" (the GNU standard) which is designed to run
in several seconds or less, with only "<dirname>:" and a seried of "."
for output, and "make fullcheck" which is more verbose and complete, and
runs in minutes.

I plan to submit a patch to plumb these tests in at the top level soon,
with the idea of having a "make -s check" which you can reasonable run
every checkin (time make check << time make), and a "make fullcheck"
which you can run after significant changes.

This patch speeds up testing by making tests one single "xs_test"
script, enhancing xs_test with a simple "expect" command.  It also only
runs the "high value" tests under "make check", and leaves the rest for
"make fullcheck".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-08-05 09:04:01 +00:00
kaf24@firebug.cl.cam.ac.uk d2f97d17d4 The C interface no longer has a priority arg, but the python interface
still takes one (and just doesn't use it).  Noone uses it anyway, so
nothing should break by taking it away.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-08-05 09:02:58 +00:00
kaf24@firebug.cl.cam.ac.uk 04303c4108 Attached is a randomized tester for consoled. It's a patch against
xen-unstable.hg but it doesn't add itself to any of the Makefiles but 
just as a subdirectory of consoled.  There's a README in the directory 
that should be read otherwise you won't be able to do anything useful 
with it :-)

Right now, we can get pretty far before seeing data corruption.  
Previously, we'd see it almost immediately (after ~600 bytes, which is 
the max the control channel can hold before filling up).

It's actual general enough that it could be also used to test network 
traffic corruption but there are certainly better tools for that.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-05 09:02:09 +00:00
kaf24@firebug.cl.cam.ac.uk af976cb9bd Instead of queuing messages when the control channels are full, xcs just
does nothing (see ctrl_interface.c:ctrl_chan_write_request()).

The following patch throttles the rate in which consoled writes data to 
xcs.  With the current values, you get a responsive console but avoid 
data corruption in most scenarios.

I'm able to get pretty far in my regression test with this patch.  With 
higher throttle values I'm able to get even further (but the console 
becomes painfully slow).

I implemented proper control channel queuing in xenctld in VM-Tools and 
it's pretty nasty stuff.  This should prevent corruption for most users 
until we can get rid of xcs.

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com
2005-08-05 09:01:30 +00:00
kaf24@firebug.cl.cam.ac.uk 73349217f0 xc_console is probably too chatty about termios failures since ssh
sessions apparently don't have proper term settings.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-05 09:00:50 +00:00
kaf24@firebug.cl.cam.ac.uk fe0b8e6e6e The attached patch:
1. Converts the shutdown driver and xend to use the store instead of
   control messages, 

2. Includes Anthony's xenstore notification code, and

3. Changes xend so that sysrq's are no longer sent as "special case"
   shutdown messages.  Store keys are cheap, so making the sysrq
   delivery less obscure is good.

I think I have made all of the appropriate modifications to Xend, but
it is complex, so I may have missed something.  Comments are welcome.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-05 08:59:41 +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
akw27@arcadians.cl.cam.ac.uk 15c8e89845 Blktap updates: request batching, O_DIRECT/AIO support.
This patch changes the blktap code mapping pages to user space to be
faster and to allow page lookups to foreign mapped pages through linux
to do direct io.  An AIO test driver on this achieves comparable
performance to the in-kernel block-backend.

Signed-off-by: andrew.warfield@cl.cam.ac.uk
2005-08-04 16:35:35 +00:00
akw27@arcadians.cl.cam.ac.uk 8148452c35 Add missing parallax makefile.
Seems to have vanished in the directory shuffle of last month.

Signed-off-by: andrew.warfield@cl.cam.ac.uk
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-08-04 15:02:09 +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
kaf24@firebug.cl.cam.ac.uk c025f1530a Here are another couple of places where 8 sectors/page is assumed,
which I missed in my first patch.

Signed-off-by: Matthew Chapman <matthewc@hp.com>
2005-08-04 08:58:18 +00:00
kaf24@firebug.cl.cam.ac.uk 165c0d1741 libxenstore (used to access the daemon) should be licensed under LGPL.
There are several people I am aware of interested in writing non-GPL
tools, and this code is trivial, so they'd just end up writing their
own.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2005-08-04 08:57:37 +00:00
kaf24@firebug.cl.cam.ac.uk baa265234e 1) Make more functions in io.c static
2) Fix memory leak in domain free
3) Fix error path in read (reported by aq)
4) Move reading of buffer limit to tty reconnect so that changes in 
limit take affect more quickly.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-03 09:32:39 +00:00
cl349@firebug.cl.cam.ac.uk cfd6b38dc8 Update xenstore python bindings for "Implement watching of nodes which don't exist."
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 19:19:16 +00:00
cl349@firebug.cl.cam.ac.uk b7f49181c9 Implement watching of nodes which don't exist.
Requires permission check every time event is generated.
Requires generalization of permissions: ask arbitrary number of
parents whether it's OK to tell about node (eg. watching
/dir/subdir/x when /dir is deleted: root permissions will now
determine whether we fire event).
Add test that we don't leak information on whether a file exists
or not.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 18:04:28 +00:00
cl349@firebug.cl.cam.ac.uk 0603c5d12a Fix typo.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 18:04:00 +00:00
cl349@firebug.cl.cam.ac.uk 879b63b37c Fix up non-valgrind case to send stderr to file like valgrind case does.
(Having trouble with signal delivery and valgrind, causing spurious test
timeouts)
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 17:59:59 +00:00
cl349@firebug.cl.cam.ac.uk c5a8d2c78b Don't abort on untranslatable errors: EINVAL and print warning
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 17:59:20 +00:00
cl349@firebug.cl.cam.ac.uk d16ff05a08 merge? 2005-08-02 17:13:11 +00:00
cl349@firebug.cl.cam.ac.uk 59f1e250c2 Fix checkpointing - add save/restore support to the xenbus driver.
- Add xenbus driver suspend/resume functions
- Change xenbus irq to not be shared
- Translate store mfn in suspend record to pfn and back
- Make tools re-introduce the domain to the store
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 17:12:36 +00:00
smh22@firebug.cl.cam.ac.uk bf4410c5bc Fixes. 2005-08-02 15:42:06 +00:00
kaf24@firebug.cl.cam.ac.uk 7dd5c4ef07 A few consoled tweaks. It's not worth building by default
right now as it isn;t actually used.
2005-08-02 14:51:06 +00:00
kaf24@firebug.cl.cam.ac.uk 81efc4a27f Remove some binary files. 2005-08-02 12:37:37 +00:00
kaf24@firebug.cl.cam.ac.uk ecf4de1162 This is the first patch to move the console code out of Xend and into a
separate daemon.  In this patch I've included the daemon and a 
front-end.  I've also have the console code removed from Xend locally 
but I wanted to clarify a few things first before submitting that.

Here's how it works:

1) Daemon sits on control channel (via xcs) waiting for console messages
2) Buffers all console data received
3) Publishes the location of a tty that can be used for reading in 
/console/<domid>/tty
4) Reads a value from the store to determine what the limit of console 
data should be (/console/<domid>/limit) to prevent DoS attacks

Using it is quite simple, just run consoled and use the xc_console 
program to connect to the console.  It uses syslog for logging.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-02 12:18:47 +00:00
kaf24@firebug.cl.cam.ac.uk 0e535dd1ce This is the first patch to move the console code out of Xend and into a
separate daemon.  In this patch I've included the daemon and a 
front-end.  I've also have the console code removed from Xend locally 
but I wanted to clarify a few things first before submitting that.

Here's how it works:

1) Daemon sits on control channel (via xcs) waiting for console messages
2) Buffers all console data received
3) Publishes the location of a tty that can be used for reading in 
/console/<domid>/tty
4) Reads a value from the store to determine what the limit of console 
data should be (/console/<domid>/limit) to prevent DoS attacks

Using it is quite simple, just run consoled and use the xc_console 
program to connect to the console.  It uses syslog for logging.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-08-02 12:18:15 +00:00
smh22@firebug.cl.cam.ac.uk a621fb860f Manual merge. 2005-08-02 11:35:45 +00:00
smh22@firebug.cl.cam.ac.uk b9ca214b2d Disable build of pygrub for now - does not build with e2fsprogs-1.35
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 11:34:38 +00:00
smh22@firebug.cl.cam.ac.uk 024fb8a600 Fix typo in pygrub code 2005-08-02 11:27:58 +00:00
kaf24@firebug.cl.cam.ac.uk 794c430127 The attached patch converts the balloon driver and xend to use
xenstore instead of control messages.

Note: Because there is no way to set a watch on a non-existent key,
this patch includes a workaround to account for the fact that dom0's
store keys are not initialized by the tools before it boots.

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-08-02 11:21:11 +00:00
kaf24@firebug.cl.cam.ac.uk 5f5202f471 Missing ia64_stubs file for libxc. 2005-08-02 11:08:47 +00:00
smh22@firebug.cl.cam.ac.uk 6b3b33d853 Remainder of ACM patch (hgrrrr).
Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 10:15:17 +00:00
smh22@firebug.cl.cam.ac.uk bd471dc416 The patches below clean-up sHype-related file names in the tools subtree
and security policy-versioning and data structures in the xen subtree 
(ACM):

 *  the very generic tools directory name "policy"  is changed to 
    "security" and the included "policy_tool" to "secpol_tool"

 * the single constant POLICY_INTERFACE_VERSION is replaced 
   by ACM_INTERFACE_VERSION; the security policy headers are
   versioned independently since the policy can be supplied
   at boot time instead of through the  hypervisor interface

Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 09:37:00 +00:00
smh22@firebug.cl.cam.ac.uk a89e4d770c The attached patch adds the support that was only stubbed in to be able
to support having reading the boot loader config when you're using a
whole disk (eg, file:/root/disk.img,xvda,w) as opposed to just a
partition.

This reads the partition table in the MBR to find the active partition
and then passes that offset down into the filesystem reading code.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-08-02 09:31:47 +00:00