aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
Commit message (Collapse)AuthorAgeFilesLines
...
* xend: insufficient quoting in tapdiskPhilipp Hahn2011-12-011-4/+5
| | | | | | | | | | | | | | | | | insufficient quoting between "tap-ctl list" and xend/server/BlktapController.py BlktapController splits the output into lines using \n, then each line at each space, and finally each of these 'words' at the '=', which fails if the filename contains spaces. As a quick work-around, the attached patch fixes the problem for me. That is, until tap-ctl changes it's output format. A more permanent solution would be to add proper quoting / escaping to tap-ctl and un-quoting / de-escaping to BlktapController.py Signed-off-by: Philipp Hahn <hahn@univention.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: command line switch to enable/disable checkpoint compressionShriram Rajagopalan2011-12-014-7/+16
| | | | | | | | | Add a command line switch to remus script that allows the user to enable or disable checkpoint compression in the libxc code. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvmloader: Move acpi_enabled out of hvm_info_table into xenstorePaul Durrant2011-11-181-1/+0
| | | | | | | | | Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools: xend: tolerate empty state/*.xmlKonrad Rzeszutek Wilk2011-11-141-0/+3
| | | | | | | | | | | | Bugzilla 1680: Xend fails to start if /var/lib/xend/state/*.xml are empty which I get often when replacing the Xen hypervisor with a newer version. This can be easily be reproduced under Fedora Core 16 by installing xen RPMs and then replacing the xen.gz with a newer version. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Anthony Low <shinji@pikopiko.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: add a flags argument to libxl_ctx_alloc.Ian Campbell2011-10-181-1/+1
| | | | | | | | | Currently unused but gives us scope for expansion in an ABI compatible manner in the future. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: convert PCI device handling to device APIIan Campbell2011-10-181-5/+14
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: idl: use "dispose" rather than "destroy" for function to free IDL typesIan Campbell2011-10-182-3/+3
| | | | | | | | | | | Destroy is an overloaded term which would commonly like to be used for actual destructive operations, such as destroying a domain etc. Dispose isn't a great term but it does the job. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: Rename libxl.idl to libxl_types.idl.Anthony PERARD2011-09-291-2/+2
| | | | | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> --HG-- rename : tools/libxl/libxl.idl => tools/libxl/libxl_types.idl
* PCI multi-seg: adjust domctl interfaceJan Beulich2011-09-221-29/+33
| | | | | | | Again, a couple of directly related functions at once get adjusted to account for the segment number. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* xend: remove PCI device listing from NetBSD, since it's LinuxRoger Pau Monne2011-07-231-0/+1
| | | | | | specific code. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
* xend: NetBSD portability fix for LVM raw volume namesRoger Pau Monne2011-06-281-1/+1
| | | | | | | | | | | | Xen 4.1.1 was incorrectly passing /dev/rmapper/vg-lvname to pygrub (notice the r in front of mapper), when it should pass /dev/mapper/rvg-lvname (add the r to the last file) when using NetBSD. I've patched it to work correctly. I'm attaching a unified diff with the patch made against Xen 4.1.1 (it's a really simple modification). From: Roger Pau Monne <roger.pau@entel.upc.edu> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen.lowlevel.xl: Return None on empty domain nameMarek Marczykowski2011-06-271-2/+3
| | | | | | | | | | Previously PyString_FromString(NULL) was called, which caused assertion failure. Signed-off-by: Marek Marczykowski <marmarek@mimuw.edu.pl> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: handle exceptions while installing/unstalling net bufferSigned-off-by: Shriram Rajagopalan2011-06-272-10/+28
| | | | | | Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remus: support DRBD disk backendsShriram Rajagopalan2011-05-261-13/+54
| | | | | | | | | | | | | | | | | | DRBD disk backends can be used instead of tapdisk backends for Remus. This requires a Remus style disk replication protocol (asynchronous replication with output buffering at backup), that is not available in standard DRBD code. A modified version that supports this new replication protocol is available from git://aramis.nss.cs.ubc.ca/drbd-8.3-remus Use of DRBD disk backends provides a means for efficient resynchronization of data after the crashed machine comes back online. Since DRBD allows for online resynchronization, a DRBD backed Remus VM does not have to be stopped or shutdown while the disks are resynchronizing. Once resynchronization is complete, Remus can be started at will. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: write circumlocution for try..except..finallyJinsong Liu2011-05-241-5/+6
| | | | | | | | | | | | | | | | | | | Parsing /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line 169 finally: ^ SyntaxError: invalid syntax This was introduced in 23195:13ec53a59a42 It is a problem for Python 2.4 and earlier, only. So use try...(try...except)...finally as suggested by Ian Campbell. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: libxl: remove libxl_domain_build_state from the IDLIan Campbell2011-04-201-12/+0
| | | | | | | | | | | | | | This datastructure is internal to the library. Remove the reference from libxl_device_console. This could never have been used from outside libxl and is only used internally to add the primary PV console to a guest. Make an internal variant of libxl_device_console_add which takes the build state as a parameter instead. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: add concept of in- and out-put only data types to IDLIan Campbell2011-04-201-8/+19
| | | | | | | | This allow language bindings to only emit the relevant conversion functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: remove BitField type class from IDLIan Campbell2011-04-201-1/+1
| | | | | | | | | | | | | All usages are single bit BitFields, AKA booleans. In general we prefer to use simple structures (e.g. without packing or specific layouts) in the libxl API and take care of any require structure by marshalling within the library instead of expecting users to do so (e.g. the PCI device BDF is unpacked in the libxl API). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: add libxl_domid to IDLIan Campbell2011-04-201-0/+10
| | | | | | | | | | | | | Language bindings would like to strongly type the domid as a separate type so make it a defined type. This patch only impacts the datatypes and autogenerated destructors, I didn't think the churn of switching the uint32_t's through the code was worth it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: add an Enumeration type to the IDLIan Campbell2011-04-202-50/+32
| | | | | | | | | | | | | The IDL requires a specific value for each enumerate, this make it much easier to avoid (or at least track) ABI changes since they must now be explicit. I believe I have used the same values as would have been chosen previoulsy but have not confirmed. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: namespace enum values within their type.Ian Campbell2011-04-201-8/+8
| | | | | | | | | In other words the values for an enum type libxl_foo always take the form LIBXL_FOO_VALUE. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: generalize libxl_qemu_machine_type into libxl_domain_typeIan Campbell2011-04-201-2/+2
| | | | | | | | | The FV/PV distinction is not particular to the device model, although that remains the only user for now. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: libxl: move all enum values into the libxl namespaceIan Campbell2011-04-201-16/+16
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* remus: fix incorrect error handling for switch_qemu_logdirty in checkpoint codeShriram Rajagopalan2011-04-121-1/+1
| | | | | | | | | c/s 22275: "tools: cleanup domain save switch_qemu_logdirty callback" introduced a whole bunch of error code fixups. In the process, it also ended up treating the success return code (0) from switch_qemu_logdirty as an error and vice versa. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
* remus: blackhole replication targetShriram Rajagopalan2011-04-081-0/+6
| | | | | | | | | | | | The new --null option allows one to test and play with just the memory checkpointing and network buffering aspect of remus, without the need for a second host. The disk is not replicated. All replication data is sent to /dev/null. This option is pretty handy when a user wants to see the page churn for his workload or observe the latency hit though the latter will not be accurate. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: proper cleanup on checkpoint failure.Shriram Rajagopalan2011-04-082-1/+8
| | | | | | | | | | | | While running remus, when an error occurs during checkpointing (e.g., timeouts on primary, failing to checkpoint network buffer or disk or even communication failure) the domU is sometimes left in suspended state on primary. Instead of blindly closing the checkpoint file handle, attempt to resume the domain before the close. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: drop XenAPI error message translationIan Campbell2011-04-085-258/+15
| | | | | | | | | | | | | | | | | | The only "translation" is to the C locale (e.g. the NUL translation). I think it very unlikely we are going to see any new translations of the XenAPI error messages at this point so the only purpose of this code appears to be to periodically regenerate xen-xm.pot with a new embedded timestamp, to the detriment of those of us who use a version control system. After much beating with sticks I mananged to enable XenAPI support in xend and configure xm such that it returns "Permission denied." (AKA the SESSION_AUTHENTICATION_FAILED message) which I take to be a sign I've not broken things too badly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: do not expose libxenctrl/libxenstore headers via libxl.hIan Campbell2011-04-062-17/+17
| | | | | | | | | | | | This completely removes libxenstore from libxl users' view. xl still needs libxenctrl directly due to the direct use of the xentoollog functionality but it is not exposed to the indirect linkage anymore. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Add nestedhvm guest config optioncegger2011-02-284-5/+17
| | | | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Eddie Dong <eddie.dong@intel.com> Acked-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
* remus: fix check for installed qdiscs on ifbShriram Rajagopalan2011-03-312-4/+3
| | | | | | | | | | current check includes ingress and pfifo_fast. Add mq to the list of allowed qdiscs already installed on ifb. This patch fixes cases where remus fails to start, due to an mq qdisc already present on the vif. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: Fix startup after removal of ACM support.Keir Fraser2011-03-272-107/+9
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Remove unmaintained Access Control Module (ACM) from hypervisor.Keir Fraser2011-03-253-414/+3
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* libxl: remove XS transaction from public API.Ian Campbell2011-03-231-2/+2
| | | | | | | | | | All external users pass 0 anyway so make the version of libxl_domain_rename which takes a transaction internal and provide an external facing function which does not expose a transaction. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: link each shared library or binary only against the libraries it usesIan Campbell2011-03-173-80/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular if binary A uses libB and libB uses libC entirely internally then A does not need to link against libC only libB. However when linking binary A the linker does need to have visibility of the libraries which libB links against (libC in this example). For out of tree uses this is achieved without fuss due because the libraries are installed in a standard path. However in the case of in-tree users the linker needs a hint in the form of the -rpath-link option. Therefore a new class of build variable, $(SHLIB_FOO), is introduced which includes the linker options needed to link against a library which uses libFOO. The intention is that $(LDLIBS_bar) will include the $(SHLIB_foo)s which it uses where necessary rather requiring that users are aware of this. For the python extensions this change appears particularly large since previously each of python bindings were linked against the union of all possible libraries used by all bindings instead of just what they individually needed. This change removes a dependency on libdl.so from nearly everything in the system, only libxenctrl actually uses it. In the context of xl/libxl the intention of libxl is to remove any need for a user of libxl to know about libxenstore or libxenctrl, however in the current build it is xl which links against those libraries rather than libxl (which only links against libc). After this change libxl correctly depends on the libraries it uses and xl does not depend on libraries which it is not support to be required to know about. Note that xl does depend on libxenctrl.so since it uses xtl_* directly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* xl/xm: make pci-list use same BDF format as all other commandsIan Campbell2011-03-091-8/+6
| | | | | | | | In particular using the same syntax as pci-{attach,detach} uses is very helpful. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: disk specification interface changeKamala Narasimhan2011-02-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Currently we pile all the backend and format information pertaining to disk option in a single enum. This check-in separates the two and uses two enums, one for disk format and another for disk backend. This helps clearly differentiate between disk format and backend within the implementation and also helps cleanup the code in this area in preparation for the impending parser revamping to be done post 4.1. Along with separating format and backend, this check-in also removes unwanted types and renames variables in the disk interface and fixes the code affected by the interface changes. In specific, here are the disk interface changes made - In libxl_device_disk structure physpath was renamed to pdev_path, virtpath was renamed to vdev, phystype was removed and replaced with backend and format enums. Also previously a single enum libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file, phy, empty and that got refactored into two enums, libxl_disk_format to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend to hold unknown, phy, tap and qdisk. Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: canonicalise symlinks found in /dev for vbds (helps vscsi)James Harper2011-02-081-0/+2
| | | | | | | | | | | By default, vscsi expects to be passed the final device name (eg /dev/st3) instead of one of the various udev symlinks (eg /dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch resolves the path to the real path if the name starts with /dev/ Signed-off-by: James Harper <james.harper@bendigoit.com.au> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Change the name of the qemu save file at restore timeStefano Stabellini2011-01-211-1/+1
| | | | | | | | | Change the name of the qemu save file to qemu-resume at restore time so that it doesn't collide with the name of the next save file. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: pci.py: fix open file descriptor leakKouya Shimura2011-01-201-0/+4
| | | | | | | | I got the following error: $ xm pci-list-assignable-devices Error: [Errno 24] Too many open files Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* xend: improve psudeo-bootloader support for external block scriptsJim Fehlig2011-01-182-9/+21
| | | | | | | | | | | | | | | | | Userspace tools support external block scripts (e.g. block-drbd provided by drbd project). The psuedo-bootloader setup code in xend has a few limitations wrt external block scripts, which this patch addresses. blkif.py: parse_uname() utility function should be able to parse a disk specifier understood by the rest of the tools. XendDomainInfo.py: Block devices using external block scripts must be attached to dom0 before running the psuedo-bootloader. Signed-off-by: Jim Fehlig <jfehlig@novell.com> Tested-by: Shriram Rajagopalan <rshriram@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xend: drbd: Revert 19444:152257350930Jim Fehlig2011-01-181-1/+1
| | | | | | | | | Remove some more "drbd" cruft from xend. This is not necessary for drbd to work with Xen. Requested-by: Jim Fehlig <jfehlig@novell.com> Tested-by: Shriram Rajagopalan <rshriram@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Updates to builtin-type marshalling functionsGianni Tedesco2011-01-111-3/+20
| | | | | | | | | Allow setting a string field to None as a way to zero it out. Implement setting/getting libx_file_references as strings. Produce relevant Exceptions marshallers which remain unimplemented. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Export PCI passthrough related libxl functionsGianni Tedesco2011-01-111-0/+74
| | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Allow subclassing of auto-generated python typesGianni Tedesco2011-01-112-2/+2
| | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Export relevant integer constants from python wrapperGianni Tedesco2011-01-111-0/+32
| | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Un-muddle libxl_domain_(pause|unpause) wrappersGianni Tedesco2011-01-111-2/+2
| | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python/pyxl: Fix reference counting of Py_(None|True|False)Gianni Tedesco2011-01-112-2/+15
| | | | | | | The incorrect refcounting causes the python interpreter to crash Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xend: check for device model if path is not specifiedMichal Novotny2011-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is the patch to check for device model (in XendConfig.py) when the device_model had no path specified, i.e. XenD was trying to read the file on the auxbin path. Without this patch applied the meaningless python error "coercing to Unicode: need string or buffer, NoneType found" occurred: [2010-11-30 13:56:47 5255] ERROR (xmlrpclib2:181) Internal error handling xend.domain.create Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py", line 134, in _marshaled_dispatch response = self._dispatch(method, params) File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch return func(*params) File "/usr/lib64/python2.4/site-packages/xen/xend/server/XMLRPCServer.py", line 80, in domain_create info = XendDomain.instance().domain_create(config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 1001, in domain_create dominfo = XendDomainInfo.create(config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 97, in create domconfig = XendConfig.XendConfig(sxp_obj = config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 367, in __init__ self.validate() File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 558, in validate self._platform_sanity_check() File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 502, in _platform_sanity_check if not os.path.exists(self['platform']['device_model']): File "/usr/lib64/python2.4/posixpath.py", line 171, in exists st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found This patch raises VmError with message that no valid device model was specified if None type was found in the device_model specification. It's been tested on non-existing device model where the message is being printed. If an invalid (but existing) device_model is set in the configuration file the domain was destroyed because it crashed. If there is a path specified (i.e. it's not using auxbin path) it bails with error that the device model was not found (which was already implemented there). Signed-off-by: Michal Novotny <minovotn@redhat.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xend: drbd: fix things by reverting 20158Ian Jackson2011-01-052-18/+1
| | | | | | | | | drbd's block-drbd script handles all of the details that c/s 20158 introduces within xend :-(. This c/s should be reverted as it causes a regression. Jim Fehlig tested drbd without 20158 and it works fine. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Jim Fehlig <jfehlig@novell.com>