Commit Graph
2823 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com 458dbeddf3 Fix ip_of to cope with interfaces with multiple addresses, courtesy of
Adam Heath <doogie@brainfood.com>.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 15:54:35 +00:00
emellor@leeni.uk.xensource.com ae0212521e Strip huge piles of cruft from the connection infrastructure. We now actually
block inside accept rather than using select to poll and then calling accept
regardless of the outcome of the select call, and then failing because the
socket is non-blocking.

SocketClientConnection, SocketConnector, TCPClientConnection, TCPConnector,
connectTCP, UnixClientConnection, UnixConnector, connectUnix have gone.

loseConnection and stopListening and closeSocket (where they are needed) are
now called close.  startListening is now called listen.

Closes bug #379.

Relieves a weight from the shoulders of the universe.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 15:04:31 +00:00
emellor@leeni.uk.xensource.com 5ea39e7063 Move xm destroy handling out of crufty destroy.py and into main.py, where it
can share the better argument parsing.

Closes bug #443.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 14:30:15 +00:00
emellor@leeni.uk.xensource.com 6a6999e3fb Fix start_time parsing on restart -- it's a float, not an int.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 14:28:53 +00:00
emellor@leeni.uk.xensource.com 1c68755227 Merged. 2005-12-08 12:14:33 +00:00
emellor@leeni.uk.xensource.com 5c896ea1a5 Loop retrying when ballooning out, even when the dom0-min-mem setting means
that there is not sufficient memory available at the moment.  Memory may be
about to be freed up by the system after a domain destruction (i.e. the memory
is being scrubbed asynchronously, and will be released soon).

Closes bug #407, bug #429.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 12:13:06 +00:00
emellor@leeni.uk.xensource.com 83c3ceb178 Read start_time and image from the store on restart. Closes bugs #441 and
#442.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 12:10:22 +00:00
emellor@leeni.uk.xensource.com 7b4fe715a5 Refuse to save dom0, and move the check that refuses to migrate dom0 from
migrate.py into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-08 12:08:59 +00:00
vhanquez@kneesa.uk.xensource.com c2c982f908 allow a port to be specified for migration.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-12-08 07:11:09 +00:00
emellor@leeni.uk.xensource.com d96a859929 Don't try and print out the info returned by the server after a restore -- there
isn't any.  Don't try and unpause the restored domain either -- XendCheckpoint
does that.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 16:26:07 +00:00
emellor@leeni.uk.xensource.com 4213a82e5b Use xm create's --dryrun option to get the name from the configuration file,
rather than the eversoskanky approach taken previously (use grep, and replace
any occurrences of %d with [0-9]* !)

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 16:25:13 +00:00
danms@us.ibm.com d8fdcac4df Make the xm-test ramdisk makefile correct the permissions on the rcS script
Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-12-07 15:50:59 +00:00
emellor@leeni.uk.xensource.com afa150ca7c Fix the startup behaviour when the tdb file exists. We were attempting to
remove and recreate the /local directory, but the manual_node call only works
if the tdb is empty -- we must use create_node, otherwise the store is
corrupted.

It's not clear to me that the other manual_node calls are safe, but I have only
made this smaller change for the sake of stability.  These other calls should
be reviewed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 15:44:38 +00:00
emellor@leeni.uk.xensource.com a16c06e77e Fix usleep definition -- we would be sleeping 1000 times too long if the usleep
command were not available elsewhere on the machine (on my Debian boxes, for
example).

Sleep for a configurable amount of time between xm create calls (by default,
5 seconds).  This spaces out the booting of the new domains, meaning that they
should not thrash the disk so much.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 15:41:41 +00:00
emellor@leeni.uk.xensource.com 11d655cef6 Tidy up use of environment variables in xenbus-hotplug interaction.
I've changed this to only write "backend" (xenbus_backend.root) into
XENBUS_BASE_PATH.  After appending XENBUS_TYPE (also exported) you can
construct the "base path" easily in the scripts.  I've completely
removed writing XENBUS_FRONTEND_ID in favour of reading it from the
store at "$XENBUS_PATH/frontend-id".

Avoid re-reading the store over and over for the frontend domain's vm-path.

The patch also fixes a memory leak in backend_bus_id where we
leak the memory referenced by frontend if the function succeeds.

This work is by Christian Limpach.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 11:57:26 +00:00
emellor@leeni.uk.xensource.com e21406c453 Merged. 2005-12-07 11:51:31 +00:00
emellor@leeni.uk.xensource.com 5e61562a32 Change configuration handling wrt to the vcpus entry, so that we only see a
vcpus entry in the image section when using VMX, only add VMX options at all
if the builder is vmx, and issue a warning when overriding the global vcpus
setting with the one from the image.

This removes the duplicated vcpus entries in the domain's sxpr.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 11:50:55 +00:00
emellor@leeni.uk.xensource.com 497ff155b3 Remove timeout on select -- there is no need for it, since we don't do anything
in the main loop except service I/O.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 11:47:46 +00:00
emellor@leeni.uk.xensource.com d688d94c83 Merged. 2005-12-07 11:44:02 +00:00
emellor@leeni.uk.xensource.com a4de9a218c Further fix to same_vm check. This fixes intermittent failure of live
localhost migration.

return [ test ] is not valid, simply [ test ] at the end of the function is the
correct syntax.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 11:43:43 +00:00
emellor@leeni.uk.xensource.com 2fd63647b4 Fix printf of ssize_t that broke 64-bit build.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 10:54:57 +00:00
emellor@leeni.uk.xensource.com d38caf05b2 Squelch error messages from calls when failure is handled gracefully.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 10:53:47 +00:00
emellor@leeni.uk.xensource.com df964c1d71 Remove one of the multiple occurrences of vcpus in the sxpr. This value is
in ROUNDTRIPPING_CONFIG_ENTRIES, so there is no need for it to be mentioned
explicitly in sxpr() too.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-07 10:51:55 +00:00
emellor@leeni.uk.xensource.com a64d176a1c xm-test report fails because IA64's /cpu/procinfo format is different from
x86's.  Here's a small patch to fix the problem.

Signed-off-by: Matsumoto <n_matumoto@soft.fujitsu.com>
2005-12-07 10:27:03 +00:00
emellor@leeni.uk.xensource.com ef1a53c4e0 Add a "consumed" parameter to the buffer declaration, and use this to advance
through the buffer when the data are read by console clients.  This avoids a
costly memmove with every read from the console.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-06 17:10:59 +00:00
emellor@leeni.uk.xensource.com b978d1410a Merged. 2005-12-06 16:40:50 +00:00
emellor@leeni.uk.xensource.com e50a8e9939 Make the master fd belonging to the pty pair non-blocking. Writes were blocking
if the console client disconnected before all the data had been written to the
pty, even though the select call had indicated that the fd was previously
writable.  Reads have been observed exhibiting similar behaviour too.

Closes bug #380.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-06 16:40:43 +00:00
kaf24@firebug.cl.cam.ac.uk 32dc1c6ed9 Fix vtpm support in xend.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-12-06 12:45:30 +01:00
dan@guaranine.beaverton.ibm.com 383dbc16f4 Output an explicit newline before the "REASON:" string so the report script
can find it, even when a domain outputs a non-newline-terminated line.
Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-12-05 15:36:11 +00:00
cl349@firebug.cl.cam.ac.uk c4b7794669 Make version strings consistent across all interfaces.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-04 18:16:33 +01:00
cl349@firebug.cl.cam.ac.uk abbe050874 Rename set-vcpus to vcpu-set (match docs) and update short help page.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-04 17:29:46 +01:00
kaf24@firebug.cl.cam.ac.uk 55f8d24f80 Bump blktap and dom0op version numbers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-12-04 12:06:38 +01:00
kaf24@firebug.cl.cam.ac.uk e23e1a21a5 Image.py should send 2 new arguments to qemu-dm for setting QEMU window
Title. 1 is const string "-domain-name", the other is the string of
domain name. At present imagy.py combines these two strings to 1. So
Qemu will fail to recognize it and fail to start.

Signed-off-by: Yongkang You <yongkang.you@intel.com>
2005-12-04 11:57:32 +01:00
cl349@firebug.cl.cam.ac.uk 79a13ff2fd Fix same_vm test by adding missing '$'.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-04 00:51:15 +01:00
cl349@firebug.cl.cam.ac.uk f7ba08cc97 Use test ([) instead of expr to compare integers.
expr $int1 '<' $int2 seems to be broken on some shells.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-04 00:49:51 +01:00
iap10@freefall.cl.cam.ac.uk f74b71caca Merge 2005-12-03 20:16:04 +01:00
iap10@freefall.cl.cam.ac.uk 0466574382 Update xend-config.sxp so that dom0-min-mem is 196MB by default, as this is rather more user friendly.
Also do some minor fixes to the README
Signed-off-by: ian@xensource.com
2005-12-03 20:05:39 +01:00
kaf24@firebug.cl.cam.ac.uk 5e6cf9a3f2 Enable multiple NICs for vmx domain by configuration file
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-12-03 17:59:37 +01:00
kaf24@firebug.cl.cam.ac.uk f2e2149629 Set the device model windows title as the domain name
This helps when creating multile vmx domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-12-03 17:58:31 +01:00
emellor@leeni.uk.xensource.com 60fdf33b73 Set hostname in DHCP config from the guest name, and if more than one interface
is specified, from guest-2, guest-3 etc.  Have the DHCP server send the
hostname to the guest.

Added a lock around DHCP config file frobbing, to avoid racing creation vs
deletion.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-03 12:21:27 +00:00
kaf24@firebug.cl.cam.ac.uk 2e611ccc22 Merge with xen-ia64-unstable.hg 2005-12-03 10:44:38 +01:00
emellor@leeni.uk.xensource.com ffa06621c6 Read from the store if the filename reported by losetup has been truncated (the
loop driver stores only the first 64 chars of the filename).  In this case, we
need to read through the store until we find the domain using the device, and
read the configured filename from there instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-03 00:51:36 +00:00
emellor@leeni.uk.xensource.com 638a6fa6a0 Merged. 2005-12-02 22:27:04 +00:00
cl349@firebug.cl.cam.ac.uk cb6bdaa39f Fix vif-net script for setups where eth0 has no IP address.
Use the IP address associated with the backend network interface
for connections from dom0 to the guest connected to this network
interface.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-02 22:15:58 +01:00
djm@kirby.fc.hp.com 56aeec5ab6 Merge 2005-12-02 12:52:25 -06:00
dan@guaranine.beaverton.ibm.com 60d99f7d06 Make "xm list --long" generate device configuration data from xenstore state
instead of internal xend state.
Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-12-02 15:57:24 +00:00
emellor@leeni.uk.xensource.com 9b08b0371d This patch adds a new domain config option, 'cpus' which is a list of
CPUs a domains' vcpus can use.  The older 'cpu' config option is
prepended to the list of cpus to use and will keep the behavior of
pinning VCPU0.

The cpus option supports ranges and negation, so:

cpus = "0-3,5,^1" produces -> [0,2,3,5]

The list is circular, so in a domain with the following config:

vcpus = 4
cpus  = "0,3,7"  # Use any of 0, 3, 7 for this domain.

would see vcpus 0-3 pinned to cpus 0,3,7,0 respectively.

Also, the pin operation is moved before the memory reservation as vcpu
to cpu mapping will be helpful for future NUMA work when trying to
allocate pages close to the physical cpus being used.

An update to the display of cpumap was needed to normalize the cpumap
values to the range of possible cpus.

I've also included some text for the xmdomain.cfg(5) man page.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2005-12-02 15:52:47 +00:00
emellor@leeni.uk.xensource.com d1dd4f46f5 Fix the block-sharing check for physical devices by using a lock to serialise
the check, reading from the store rather than /sys, and checking whether the
VM for apparently-conflicting uses is actually the same (i.e. this is a
migration or a reboot in progress).

This fixes recent failures in 12_block_attach_shared_domU and recloses bug #331.

This fix includes particularly skanky path slicing inside xenbus_probe, which
it would be nice to remove very soon.

The loopback device check still suffers from the problem that filenames over
64 characters long are truncated.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-02 15:48:44 +00:00
emellor@leeni.uk.xensource.com 0bac77637b Added /etc/init.d/dhcpd to list of init files to check for (supporting Centos
4.2).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-02 15:39:13 +00:00
emellor@leeni.uk.xensource.com d3be5880f8 Added serialisation facilities. Udev is supposed to serialise events, but sadly
the older hotplug infrastructure does not, so we must be able to serialise the
block-sharing checks (etc) ourselves.

Redirect stderr to /var/log/xen-hotplug.log, for better debugging.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-12-02 15:38:22 +00:00