Commit Graph
1006 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com cb3d870a1a From Murillo Fernandes Bernardes <mfb@br.ibm.com>:
The problem is: There is no mechanism to detect block device setup failure

Network devices have the same problem, and are fixed with this too.

I handling this problem in the way suggested by aliguori:
- hotplug scripts write a "hotplug-status" node on store
- Xend DevController.createDevice() check verify this node and return success
or throw an exception on failure.
- If no changes in "hotplug-status" node after DEVICE_CREATE_TIMEOUT seconds
Xend throw an exception showing the problem with hotplug scripts.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-31 17:10:57 +01:00
emellor@leeni.uk.xensource.com 3bbe6d0380 Removed the event server, and all it entails. This is unused, and a big pile
of crusty rubbish.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-31 16:56:34 +01:00
emellor@leeni.uk.xensource.com 6eae10ab53 Removed some dead code.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-31 16:54:05 +01:00
emellor@leeni.uk.xensource.com 6bcc179281 Added doccomment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 17:19:35 +01:00
emellor@leeni.uk.xensource.com 1df0c600a7 Added network-attach and network-detach. Fixes bug #300.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:44:47 +01:00
emellor@leeni.uk.xensource.com b67a7e6305 Force the devid given to destroyDevice to an integer. This means that that
method copes with the values given to xm network-detach without netif.py having
to intervene. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:43:52 +01:00
emellor@leeni.uk.xensource.com ff9465e411 Merged. 2005-10-30 14:00:35 +01:00
emellor@leeni.uk.xensource.com 77e1fe3493 Change the interface between XendRoot.get_network_script and Vifctl so that a
list is passed rather than a single string.  This expands the config-file
interface so that parameters may be passed to the network scripts from the
config file.

Fix XendRoot._logError (missing asterisk before args parameter).

In XendRoot, allow an empty configuration file.  This makes it easier to unit
test code reliant on XendRoot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:48:34 +01:00
emellor@leeni.uk.xensource.com d2e3b493ab Don't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
no bridge parameter and let the vif-bridge script find one for itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:45:06 +01:00
emellor@leeni.uk.xensource.com 466acdeb47 Added test_create.py, a test script for create.py. This contains a unit test
for the command line parsing code in xm create.  To make it easier to test,
create.py has changed in structure around the main(argv) function, adding a new
parseCommandLine function.

Remove a large number of useless parameters, where the opts structure was being
passed all over the place, just to eventually log through it.  Instead two
methods -- err and warn -- have been broken out from the Opts class, and there
is now no need to pass the opts value everywhere.

Change the parsing inside make_config to remove lots of cut-and-pasted cruft.

Change the documentation to the vif command to indicate that the bridge can be
auto-detected.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:42:30 +01:00
emellor@leeni.uk.xensource.com 480d7883b5 Added xen.xm.tests package to build.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 13:34:12 +01:00
kaf24@firebug.cl.cam.ac.uk 1464591d5f merge 2005-10-29 09:51:35 +01:00
jbulpin@wicket.uk.xensource.com adeed21529 Prevent event listener socket from being inherited by children.
This was passing down to dhclient which was keeping the 8001 port
open and preventing xend restarting.

Also fixed a case typo in setCloExec

Signed-off-by: James Bulpin <james@xensource.com>
2005-10-29 01:58:00 +01:00
emellor@leeni.uk.xensource.com 8c48c9e2ad Fix reboot logic. An indentation error meant that every second reboot would
be refused, with the domain being destroyed instead.

Further fix for reboot logic when using on_reboot=rename-restart: the incorrect
node was being removed once restart has completed, leaving Xend to conclude
later that it had crashed in the middle of a restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-28 13:02:06 +01:00
kaf24@firebug.cl.cam.ac.uk 7429bfd50d This patch provide local APIC support for vmx guest.
A configure option is also added to disable it, which is off by default.

Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Li Xin <xin.b.li@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2005-10-28 09:48:46 +01:00
kaf24@firebug.cl.cam.ac.uk a3cdca7914 xm help notes that domid can be used in place of domname.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
2005-10-27 18:22:45 +01:00
emellor@leeni.uk.xensource.com f76bd5cf5e Fix Jerone Young's xenstat / xenstore patch:
Reject the removal of -Werror from the xentop Makefile.

Reject the #include of xs.h inside xentop -- there is no need for it.

Have XendDomainInfo write domain names into /local/domain (which used to happen,
but hasn't for a little while).

Remove the dead code from xentop.c.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-27 10:53:02 +01:00
emellor@leeni.uk.xensource.com 0edd55be19 Move exception handler for sxp.ParseError above that for Exception, as the
latter subsumes the former.  Minor tidy-ups.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-26 14:59:29 +01:00
emellor@leeni.uk.xensource.com 655b6990ad Merged. 2005-10-25 11:24:01 +01:00
djm@kirby.fc.hp.com 8620f56614 Necessary change to support ia64/vti domain build in common code.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:57:47 -06:00
chris@ubuntu.eng.hq.xensource.com be8604faf3 Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-10-24 19:04:30 -07:00
emellor@leeni.uk.xensource.com 31ad1c62b7 Change argument spec for introduce_domain argument parsing, as the MFN is a long.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 18:24:07 +01:00
djm@kirby.fc.hp.com 8250e0c500 Merge 2005-10-24 09:08:13 -06:00
emellor@leeni.uk.xensource.com 9f8f052650 Removed some unnecessary imports.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-24 15:18:31 +01:00
emellor@leeni.uk.xensource.com fea7782321 Change the semantics of GetDomainPath so that it always succeeds, regardless of
whether a domain has been introduced to the store.  Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced.  This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce.  Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.

No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.

Do not write the contents of the info block to the store.  All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:45:15 +01:00
emellor@leeni.uk.xensource.com 4384b3fc70 Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-23 22:34:13 +01:00
kaf24@firebug.cl.cam.ac.uk 9329e6405d Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-10-23 16:51:47 +01:00
kaf24@firebug.cl.cam.ac.uk 74df472110 some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-23 11:51:15 +01:00
emellor@leeni.uk.xensource.com bacb111591 Reintroduce the changes made by changeset 7455:021324804fbd, which were
disabled by workaround 7468:17a9f111fa93.  We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-22 11:04:45 +01:00
kaf24@firebug.cl.cam.ac.uk 55179ce8a5 Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 10:33:26 +01:00
kaf24@firebug.cl.cam.ac.uk 900a11e8ed cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-22 08:35:03 +01:00
jrb44@plym.cl.cam.ac.uk 1bd54c9db6 Temporary workaround to xend start problem.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-21 18:51:42 +01:00
emellor@leeni.uk.xensource.com 3896d075f8 Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 15:31:51 +01:00
emellor@leeni.uk.xensource.com b625626aa7 Merged. 2005-10-21 12:07:14 +01:00
emellor@leeni.uk.xensource.com fb22028e11 Tidy xend-config.sxp, removing entries that haven't been used since the
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump).  Remove vif-antispoof, as Vifctl no longer passes this option
down.

Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 12:04:30 +01:00
emellor@leeni.uk.xensource.com 3a2351fdda Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:22:48 +01:00
emellor@leeni.uk.xensource.com aec60dc083 Remove unused Vifctl.vifctl and Vifctl.set_vif_name. Remove the bridge and
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside.  Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.

Remove XendRoot.get_vif_antispoof, matching change above.

Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:21:05 +01:00
emellor@leeni.uk.xensource.com 174e923813 Output the Xen changeset in the logs at start of day.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-21 11:08:48 +01:00
jrb44@plym.cl.cam.ac.uk d52306f795 Avoid specifying bogus DISPLAY=None when spawning device model.
Signed-off-by: James Bulpin <james@xensource.com>
2005-10-20 19:37:41 +01:00
emellor@leeni.uk.xensource.com dd319571b5 Fix the recently-introduced failure to preserve uuid across a guest reboot.
Store the uuid in string form inside XendDomainInfo, to aid this.

Add restart-squelching logic to ensure that runaway domains to restart
indefinitely.  The logic here could be cleverer, say including a backoff for
retrying, in case a network block device has gone away, but for now this will
do to stop the pathological behaviour.  Fixes bug #275.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-20 12:34:50 +01:00
emellor@leeni.uk.xensource.com e68e8c51d2 This patch fixes the problem that VMX guest can not get brought up on
current tip (changeset 7425).

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-10-19 18:18:30 +01:00
emellor@leeni.uk.xensource.com a77149f8e4 New network-bridge script and associated gubbins.
This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
  (the ifup may otherwise figure that the veth0 hardware is
   NOT the same as the original ${netdev} and not use the same
   config -- this happens on SUSE. Charles Coffing tracked this
   one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 16:24:54 +01:00
emellor@leeni.uk.xensource.com a91b3cb6d7 Added diagnosis tool for broken domains.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:59:22 +01:00
emellor@leeni.uk.xensource.com f3adfa9dcb Set the console limit for DomUs based on a value set in xend-config.sxp.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:37:16 +01:00
emellor@leeni.uk.xensource.com db6435aaa8 Added sedf_get functionality to XendClient interface. From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 13:33:22 +01:00
emellor@leeni.uk.xensource.com 963785e3ee Remove unused parameter from addControllerClass. This became unused when the
BE_DOMAIN flags were removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:53:00 +01:00
emellor@leeni.uk.xensource.com 6d55f51603 Remove unused shadow_control functionality from the Python layer. This is
handled in xc_linux_save, and no-one in the Python layer uses this functionality
directly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:51:25 +01:00
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk e85a40dd36 Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:02:14 +01:00
emellor@leeni.uk.xensource.com a1190ad2e6 Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

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