]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
15 years agopython: Fix networkLookupByUUID
Philip Hahn [Wed, 17 Mar 2010 16:34:04 +0000 (12:34 -0400)]
python: Fix networkLookupByUUID

According to:

http://libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUID

virNetworkLookupByUUID() expects a virConnectPtr as its first argument,
thus making it a method of the virConnect Python class.

Currently it's a method of libvirt.virNetwork.

@@ -805,13 +805,6 @@ class virNetwork:
         if ret == -1: raise libvirtError ('virNetworkGetAutostart() failed', net=self)
         return ret

-    def networkLookupByUUID(self, uuid):
-        """Try to lookup a network on the given hypervisor based on its UUID. """
-        ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
-        if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', net=self)
-        __tmp = virNetwork(self, _obj=ret)
-        return __tmp
-
 class virInterface:
     def __init__(self, conn, _obj=None):
         self._conn = conn
@@ -1689,6 +1682,13 @@ class virConnect:
         __tmp = virDomain(self,_obj=ret)
         return __tmp

+    def networkLookupByUUID(self, uuid):
+        """Try to lookup a network on the given hypervisor based on its UUID. """
+        ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
+        if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', conn=self)
+        __tmp = virNetwork(self, _obj=ret)
+        return __tmp
+

15 years ago.gitignore: Ignore generated daemon/libvirtd.logrotate
Cole Robinson [Wed, 17 Mar 2010 16:27:41 +0000 (12:27 -0400)]
.gitignore: Ignore generated daemon/libvirtd.logrotate

15 years agoFix make dist with XenAPI changes
Cole Robinson [Wed, 17 Mar 2010 16:25:50 +0000 (12:25 -0400)]
Fix make dist with XenAPI changes

15 years agoAllow suspend during live migration
Jiri Denemark [Mon, 15 Mar 2010 13:19:00 +0000 (14:19 +0100)]
Allow suspend during live migration

Currently no command can be sent to a qemu process while another job is
active. This patch adds support for signaling long-running jobs (such as
migration) so that other threads may request predefined operations to be
done during such jobs. Two signals are defined so far:
    - QEMU_JOB_SIGNAL_CANCEL
    - QEMU_JOB_SIGNAL_SUSPEND

The first one is used by qemuDomainAbortJob.

The second one is used by qemudDomainSuspend for suspending a domain
during migration, which allows for changing live migration into offline
migration. However, there is a small issue in the way qemudDomainSuspend
is currently implemented for migrating domains. The API calls returns
immediately after signaling migration job which means it is asynchronous
in this specific case.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agodo not require two ./autogen.sh runs to permit "make"
Jim Meyering [Tue, 16 Mar 2010 20:08:31 +0000 (21:08 +0100)]
do not require two ./autogen.sh runs to permit "make"

* autogen.sh (bootstrap_hash): New function.
Running bootstrap may update the gnulib SHA1, yet we were computing
t=$(git submodule status ...) *prior* to running bootstrap, and
then recording that sometimes-stale value in the stamp file upon
a successful bootstrap run.  That would require two (lengthy!)
bootstrap runs to update the stamp file.

15 years agophyp: Use virRequestUsername and virRequestPassword
Matthias Bolte [Sun, 14 Mar 2010 20:46:32 +0000 (21:46 +0100)]
phyp: Use virRequestUsername and virRequestPassword

15 years agoxenapi: Don't leak url and caps in case of error
Matthias Bolte [Sun, 14 Mar 2010 20:31:14 +0000 (21:31 +0100)]
xenapi: Don't leak url and caps in case of error

15 years agoxenapi: Check for NULL before accessing the scheme
Matthias Bolte [Sun, 14 Mar 2010 20:29:06 +0000 (21:29 +0100)]
xenapi: Check for NULL before accessing the scheme

15 years agoxenapi: Request a username if there is non in the URI
Matthias Bolte [Sun, 14 Mar 2010 20:00:43 +0000 (21:00 +0100)]
xenapi: Request a username if there is non in the URI

Use virRequestUsername and virRequestPassword.

15 years agoxenapi: Check for valid private data in xenapiSessionErrorHandle
Matthias Bolte [Sun, 14 Mar 2010 20:53:01 +0000 (21:53 +0100)]
xenapi: Check for valid private data in xenapiSessionErrorHandle

15 years agoesx: Move username and password helper functions to authhelper.c
Matthias Bolte [Sun, 14 Mar 2010 19:50:14 +0000 (20:50 +0100)]
esx: Move username and password helper functions to authhelper.c

15 years agofix two "make syntax check" failures
Jim Meyering [Tue, 16 Mar 2010 18:32:05 +0000 (19:32 +0100)]
fix two "make syntax check" failures

* src/xenapi/xenapi_driver.c (xenapiOpen): Remove useless-if-before-free.
* po/POTFILES.in: Add src/xenapi/xenapi_utils.c.

15 years agoUse WARN_CFLAGS when compiling virsh.c
Jiri Denemark [Tue, 16 Mar 2010 10:51:36 +0000 (11:51 +0100)]
Use WARN_CFLAGS when compiling virsh.c

15 years agoUse fsync() at the end of file allocation instead of O_DSYNC
Jiri Denemark [Tue, 16 Mar 2010 15:03:59 +0000 (16:03 +0100)]
Use fsync() at the end of file allocation instead of O_DSYNC

Instead of opening storage file with O_DSYNC, make sure data are written
to a disk only before we claim allocation has finished.

15 years agoRevert f5a6ce44ce8368d4183b69a31b77f67688d9af43
Jim Meyering [Mon, 15 Mar 2010 15:43:23 +0000 (16:43 +0100)]
Revert f5a6ce44ce8368d4183b69a31b77f67688d9af43

* src/qemu/qemu_driver.c (qemudDomainAttachSCSIDisk): The ".controller"
member is an index, and *may* be 0.  As such, the commit that we're
reverting broke SCSI disk hot-plug on controller 0.
Reported by Wolfgang Mauerer.

15 years agosecurity: Set permissions for kernel/initrd
Cole Robinson [Fri, 12 Mar 2010 18:38:39 +0000 (13:38 -0500)]
security: Set permissions for kernel/initrd

Fixes URL installs when running virt-install as root on Fedora.

15 years agoqemu: Fix USB by product with security enabled
Cole Robinson [Fri, 12 Mar 2010 17:37:52 +0000 (12:37 -0500)]
qemu: Fix USB by product with security enabled

We need to call PrepareHostdevs to determine the USB device path before
any security calls. PrepareHostUSBDevices was also incorrectly skipping
all USB devices.

15 years agoqemu: Add some debugging at domain startup
Cole Robinson [Fri, 12 Mar 2010 17:36:56 +0000 (12:36 -0500)]
qemu: Add some debugging at domain startup

15 years agoqemu: pass the information when disks are read-only
Daniel Veillard [Thu, 11 Mar 2010 16:53:49 +0000 (17:53 +0100)]
qemu: pass the information when disks are read-only

* src/qemu/qemu_conf.c: add the ",readonly=on" for read-only disks
  and also parse it back in qemuParseCommandLineDisk()
* tests/qemuxml2argvtest.c
  tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args
  tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml:
  add a specific regression test

15 years agoFix syntax-check errors
Jiri Denemark [Mon, 15 Mar 2010 13:14:06 +0000 (14:14 +0100)]
Fix syntax-check errors

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agoFix error messages in qemu text monitor
Jiri Denemark [Mon, 15 Mar 2010 13:01:20 +0000 (14:01 +0100)]
Fix error messages in qemu text monitor

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agoxenapi: Initial commit of the new driver
Sharadha Prabhakar [Sun, 14 Mar 2010 11:11:51 +0000 (12:11 +0100)]
xenapi: Initial commit of the new driver

15 years agoesx: Improve documentation about remote URIs
Matthias Bolte [Fri, 12 Mar 2010 21:09:11 +0000 (22:09 +0100)]
esx: Improve documentation about remote URIs

15 years agomacvtap: Only export symbols if support is enabled
Matthias Bolte [Fri, 12 Mar 2010 21:09:50 +0000 (22:09 +0100)]
macvtap: Only export symbols if support is enabled

15 years agoOnly use the numa functions when they are available.
Chris Lalancette [Fri, 12 Mar 2010 15:41:49 +0000 (10:41 -0500)]
Only use the numa functions when they are available.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoMake nodeGetInfo report the correct number of NUMA nodes.
Chris Lalancette [Thu, 11 Mar 2010 20:45:11 +0000 (15:45 -0500)]
Make nodeGetInfo report the correct number of NUMA nodes.

The nodeGetInfo code was always assuming that machine had a
single NUMA node, which is not correct.  The good news is that
libnuma gives us this information pretty easily, so let's
properly report it.

NOTE: With recent hardware starting to support CPU hot-add
and hot-remove, both this code and the nodeCapsInitNUMA()
code are quickly going to become obsolete.  We'll have to
think of a more dynamic solution for dealing with NUMA
nodes and CPUs that can come and go at will.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix crash in virsh after bogus command
Chris Lalancette [Fri, 12 Mar 2010 11:00:46 +0000 (12:00 +0100)]
Fix crash in virsh after bogus command

If you ran virsh in interactive mode and ran a command
that virsh could not parse, it would then SEGV
on subsequent commands.  The problem is that we are
freeing the vshCmd structure in the syntaxError label
at the end of vshCommandParse, but forgetting to
set ctl->cmd to NULL.  This means that on the next command,
we would try to free the same structure again, leading
to badness.

* tools/virsh.c: Make sure to set ctl->cmd to NULL after
  freeing it in vshCommandParse()

15 years agoFix virsh command 'cd'
Chris Lalancette [Fri, 12 Mar 2010 10:49:16 +0000 (11:49 +0100)]
Fix virsh command 'cd'

* tools/virsh.c: cmdCd was returning a 0 on success and -1 on error,
  when the rest of the code expected a TRUE on success and a
  FALSE on error.

15 years agoFix compiler warnings in virsh.c
Laine Stump [Fri, 12 Mar 2010 10:39:24 +0000 (11:39 +0100)]
Fix compiler warnings in virsh.c

No functional change. These all generated compiler warnings which, for
some reason weren't converted to errors by
--enable-compiler-warnings=error.

* tools/virsh.c:
  - change return type from int to void on two functions that don't
    return a value.
  - remove unused variables/labels from two functions
  - eliminate non-literal format strings
  - typecast char* into xmlChar* when calling
  - xmlParseBalancedChunkMemory

15 years agoSilence compiler complaints about non-literal format strings
Laine Stump [Fri, 12 Mar 2010 10:36:05 +0000 (11:36 +0100)]
Silence compiler complaints about non-literal format strings

* src/util/macvtap.c: replace _("....") with "%s", _("...") in two places

15 years agoUpdate commiters list
Daniel Veillard [Fri, 12 Mar 2010 10:30:07 +0000 (11:30 +0100)]
Update commiters list

15 years agoFix hang in qemudDomainCoreDump.
Chris Lalancette [Wed, 10 Mar 2010 21:50:13 +0000 (16:50 -0500)]
Fix hang in qemudDomainCoreDump.

Currently if you dump the core of a qemu guest with
qemudDomainCoreDump, subsequent commands will hang
up libvirtd.  This is because qemudDomainCoreDump
uses qemuDomainWaitForMigrationComplete, which expects
the qemuDriverLock to be held when it's called.  This
patch does the simple thing and moves the qemuDriveUnlock
to the end of the qemudDomainCoreDump so that the driver
lock is held for the entirety of the call (as it is done
in qemudDomainSave).  We will probably want to make the
lock more fine-grained than that in the future, but
we can fix both qemudDomainCoreDump and qemudDomainSave
at the same time.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoMake sure qemudDomainSetVcpus doesn't hang.
Chris Lalancette [Wed, 10 Mar 2010 20:52:39 +0000 (15:52 -0500)]
Make sure qemudDomainSetVcpus doesn't hang.

The code to add job support into libvirtd caused a problem
in qemudDomainSetVcpus.  In particular, a qemuDomainObjEndJob()
call was added at the end of the function, but a
corresponding qemuDomainObjBeginJob() was not.  Additionally,
a call to qemuDomainObj{Enter,Exit}Monitor() was also missed
in qemudDomainHotplugVcpus().  These missing calls conspired to
cause a hang in the libvirtd process after the command was
finished.  Fix this by adding the missing calls.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoRemove qemudDomainSetMaxMemory.
Chris Lalancette [Wed, 10 Mar 2010 19:14:53 +0000 (14:14 -0500)]
Remove qemudDomainSetMaxMemory.

As previously discussed[1], this patch removes the
qemudDomainSetMaxMemory() function, since it doesn't
work.  This means that instead of getting somewhat
cryptic errors, you will now get:

error: Unable to change MaxMemorySize
error: this function is not supported by the hypervisor: virDomainSetMaxMemory

Which describes the situation perfectly.

[1] https://www.redhat.com/archives/libvir-list/2010-February/msg00928.html

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix a JSON CPU information bug.
Chris Lalancette [Wed, 10 Mar 2010 18:22:02 +0000 (13:22 -0500)]
Fix a JSON CPU information bug.

When using the JSON monitor, qemuMonitorJSONExtractCPUInfo
was returning 0 on success.  Unfortunately, higher levels of
the cpuinfo code expect that it returns the number of CPUs
it found on success.  This one-line patch fixes it so that
it returns the correct number.  This makes "virsh vcpuinfo <domain>"
work when using the JSON monitor.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoAllow devices without a parent
Ed Swierk [Wed, 10 Mar 2010 18:48:49 +0000 (13:48 -0500)]
Allow devices without a parent

* Allow devices without parent links to be created and set their parent to the root "computer" node

15 years agobuild: change to gnulib module list should rerun bootstrap
Eric Blake [Wed, 10 Mar 2010 17:03:29 +0000 (10:03 -0700)]
build: change to gnulib module list should rerun bootstrap

* autogen.sh (curr_status): Also include hash of bootstrap.conf
when checking for changes that require bootstrap rerun.
* cfg.mk (_update_required): Likewise.

15 years agobuild: enforce preprocessor indentation
Eric Blake [Tue, 9 Mar 2010 21:22:14 +0000 (14:22 -0700)]
build: enforce preprocessor indentation

Since cppi is not part of Fedora Core 12, the check is conditional:
without cppi, running 'make syntax-check' merely warns:

$ make sc_preprocessor_indentation
preprocessor_indentation
maint.mk: skipping test sc_preprocessor_indentation: cppi not installed

* cfg.mk (sc_preprocessor_indentation): New syntax-check rule.
(preprocessor_exempt): New macro, with first exemption.

15 years agobuild: update gnulib submodule to newer (but not latest)
Jim Meyering [Wed, 10 Mar 2010 16:26:40 +0000 (17:26 +0100)]
build: update gnulib submodule to newer (but not latest)

This is a stop-gap measure to make autogen.sh rerun ./bootstrap,
(required due to recent bootstrap.conf addition) while we prepare
the fix to automatically detect the case of an updated modules list.

15 years agoFree resources on error in udev startup
David Allan [Thu, 4 Mar 2010 18:17:24 +0000 (13:17 -0500)]
Free resources on error in udev startup

* The udev driver didn't properly free resources that it allocates when setting up the 'computer' device in the error case.

15 years agoMake virsh reconnect when losing connection
Daniel Veillard [Fri, 5 Mar 2010 09:59:52 +0000 (10:59 +0100)]
Make virsh reconnect when losing connection

When the daemon libvirtd restarts, a connected virsh gets a SIGPIPE
and dies. This change the behaviour to try to reconnect if the
signal was received or command error indicated a connection or RPC
failure. Note that the failing command is not restarted.

* tools/virsh.c: catch SIGPIPE signals as well as connection related
  failures, add some automatic reconnection code and appropriate error
  messages.

15 years agoFix up nodeinfo parsing code.
Chris Lalancette [Tue, 9 Mar 2010 15:17:59 +0000 (10:17 -0500)]
Fix up nodeinfo parsing code.

As pointed out by eblake, I made a real hash of the
nodeinfo code with commit
aa2f6f96ddd7a57011c3d25586d588100651feb2.  This patch
cleans it up:

1)  Do more work at compile time instead of runtime (minor)
2)  Properly handle the hex digits that come from
/sys/devices/system/cpu/cpu*/topology/thread_siblings
3)  Fix up some error paths that could cause SEGV
4)  Used unsigned's for the cpu numbers (cpu -1 doesn't
make any sense)

Along with the recent patch from jdenemar to zero out
the nodeinfo structure, I've re-tested this on the
machines having the problems, and it seems to be good.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoChange logrotate to be per-hypervisor logs
Daniel Veillard [Thu, 4 Mar 2010 14:17:08 +0000 (15:17 +0100)]
Change logrotate to be per-hypervisor logs

Having a single logrotate configuration file for all hypervisors
did not work as logrotate would get confused if an hypervisor not
supported on that platform was still listed. Simplest is to split
the logrotate as separate per hypervisor files and change the
spec file to only install the ones compiled in.
* daemon/libvirtd.lxc.logrotate.in daemon/libvirtd.qemu.logrotate.in
  daemon/libvirtd.uml.logrotate.in: copy and split the original
  daemon/libvirtd.logrotate.in file
* daemon/Makefile.am: update to support the different files and
  cleanup in sed suggested by Eric Blake
* libvirt.spec.in: only install the relevant logrotate configs
* daemon/.gitignore: update logrotate generated list

15 years agobuild: consistently indent preprocessor directives
Eric Blake [Tue, 9 Mar 2010 18:22:22 +0000 (19:22 +0100)]
build: consistently indent preprocessor directives

* global: patch created by running:
for f in $(git ls-files '*.[ch]') ; do
    cppi $f > $f.t && mv $f.t $f
done

15 years agovirsh: use N_ rather than gettext_noop
Eric Blake [Tue, 9 Mar 2010 17:05:02 +0000 (10:05 -0700)]
virsh: use N_ rather than gettext_noop

With N_() in place, we can use it for a smaller file.

* doc/api-extension/0008-Step-8-of-8-Add-virsh-support.patch:
Replace all uses of gettext_noop with N_.
* tools/virsh.c: Likewise, throughout the file.

15 years agovirsh: fix existing N_ uses
Eric Blake [Tue, 9 Mar 2010 17:05:01 +0000 (10:05 -0700)]
virsh: fix existing N_ uses

It is a bad idea to call gettext on an already-translated
string.  In cases where a string must be translated separately
from where it is exposed to xgettext, the gettext manual
recommends the idiom of N_() wrapping gettext_noop for
marking the string.

* src/internal.h (N_): Fix definition to match gettext manual.
* tools/virsh.c: (cmdHelp, cmdList, cmdDomstate, cmdDominfo)
(cmdVcpuinfo, vshUsage): Replace incorrect use of N_ with _.
(vshCmddefHelp): Likewise.  Mark C format strings appropriately.

15 years agodoc: fix typos in hacking.html.in; mark HACKING as read-only
Jim Meyering [Tue, 9 Mar 2010 16:59:25 +0000 (17:59 +0100)]
doc: fix typos in hacking.html.in; mark HACKING as read-only

* HACKING: Mark as read-only.  Soon we'll generate it from...
* docs/hacking.html.in: ... this file.  More typo fixes.

15 years agoFix copy&paste typos in virProcessInfoGetAffinity
Jiri Denemark [Tue, 9 Mar 2010 13:59:01 +0000 (14:59 +0100)]
Fix copy&paste typos in virProcessInfoGetAffinity

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agoWipe nodeinfo structure before filling it
Jiri Denemark [Tue, 9 Mar 2010 13:54:01 +0000 (14:54 +0100)]
Wipe nodeinfo structure before filling it

The nodeinfo structure wasn't initialized in qemu driver and with the
recent change in CPU topology parsing, old value of nodeinfo->sockets
could be used and incremented giving totally bogus results.

Let's just wipe the structure completely.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agodoc: fix more typos in HACKING
Jim Meyering [Tue, 9 Mar 2010 16:21:55 +0000 (17:21 +0100)]
doc: fix more typos in HACKING

* HACKING: More spelling/typo fixes.

15 years agoAUTHORS: add recent contributors
Eric Blake [Mon, 8 Mar 2010 21:59:52 +0000 (14:59 -0700)]
AUTHORS: add recent contributors

15 years agohacking: add a section on preprocessor conventions
Eric Blake [Tue, 9 Mar 2010 00:02:45 +0000 (17:02 -0700)]
hacking: add a section on preprocessor conventions

* doc/hacking.html.in (preprocessor): New section to document
recently-discussed style issues.

Signed-off-by: Eric Blake <eblake@redhat.com>
15 years agohacking: fix typos
Eric Blake [Tue, 9 Mar 2010 00:02:44 +0000 (17:02 -0700)]
hacking: fix typos

* docs/hacking.html.in (committers): Fix spelling and grammar.

15 years agoFix format string warnings
Laine Stump [Tue, 9 Mar 2010 13:32:06 +0000 (14:32 +0100)]
Fix format string warnings

A few more non-literal format strings in error log messages have crept
in. Fix them in the standard way - turn the format string into "%s"
with the original string as the arg.

15 years agomacvtap build detection fix
Stefan Berger [Tue, 9 Mar 2010 13:14:48 +0000 (14:14 +0100)]
macvtap build detection fix

* configure.ac: fix the header test used for macvtap availability
  detection

15 years agoFix virDomainGetXMLDesc cache settings output
Soren Hansen [Tue, 9 Mar 2010 12:59:51 +0000 (13:59 +0100)]
Fix virDomainGetXMLDesc cache settings output

If a special cache strategy for a disk has been specified in a domain
definition, but no driverName has been set, virDomainGetXMLDesc would not
include the <driver> tag at all.

* src/conf/domain_conf.c: make sure any <driver> tag setting is
  serialized if set.

15 years agoUpdate hacking.html.in
David Allan [Mon, 8 Mar 2010 15:26:30 +0000 (10:26 -0500)]
Update hacking.html.in

* Added section on use of goto
* Added missing content from HACKING document

15 years agoGet thread and socket information in virsh nodeinfo.
Chris Lalancette [Thu, 4 Mar 2010 22:28:40 +0000 (17:28 -0500)]
Get thread and socket information in virsh nodeinfo.

The current code for "nodeinfo" is pretty naive
about socket and thread information.  To determine the
sockets, it just takes the number of cpus and divides
by the number of cores.  For the thread count, it always
sets it to 1.  With more recent Intel machines, however,
hyperthreading is again an option, meaning that these
heuristics no longer work and give bogus numbers.  This
patch goes through /sys to get the additional
information so we properly report it.

Note that I had to edit the tests not to report on
socket and thread counts, since these are determined
dynamically now.

v2: As pointed out by Eric Blake, gnulib provides
    count-one-bits (which is LGPLv2+).  Use it instead
    of a hand-coded popcnt.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoFix locking in qemudDomainMemoryStats
Adam Litke [Mon, 8 Mar 2010 14:15:44 +0000 (15:15 +0100)]
Fix locking in qemudDomainMemoryStats

When adding domainMemoryStats API support for the qemu driver, I didn't
follow the locking rules exactly.  The job condition must be held when
executing monitor commands.  This corrects the segfaults I was seeing
when calling domainMemoryStats in a multi-threaded environment.

* src/qemu/qemu_driver.c: in qemudDomainMemoryStats() add missing
  calls to qemuDomainObjBeginJob/qemuDomainObjEndJob

15 years agoEliminate large stack buffer in doTunnelSendAll
Laine Stump [Mon, 8 Mar 2010 14:01:52 +0000 (15:01 +0100)]
Eliminate large stack buffer in doTunnelSendAll

doTunnelSendAll function (used by QEMU migration) uses a 64k buffer on
the stack, which could be problematic. This patch replaces that with a
buffer from the heap.

While in the neighborhood, this patch also improves error reporting in
the case that saferead fails - previously, virStreamAbort() was called
(resetting errno) before reporting the error. It's been changed to
report the error first.

* src/qemu/qemu_driver.c: fix doTunnelSendAll() to use a malloc'ed
  buffer

15 years agobuild: consistently use C99 varargs macros
Eric Blake [Mon, 1 Mar 2010 23:38:28 +0000 (16:38 -0700)]
build: consistently use C99 varargs macros

Prior to this patch, there was an inconsistent mix between GNU and C99.

For consistency, and potential portability to other compilers, stick
with the C99 vararg macro syntax.

* src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU
  vararg macro syntax.
* src/conf/domain_conf.c (virDomainReportError): Likewise.
* src/conf/domain_event.c (eventReportError): Likewise.
* src/conf/interface_conf.c (virInterfaceReportError): Likewise.
* src/conf/network_conf.c (virNetworkReportError): Likewise.
* src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise.
* src/conf/secret_conf.h (virSecretReportError): Likewise.
* src/conf/storage_conf.h (virStorageReportError): Likewise.
* src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than
  GNU vararg macro syntax.
* src/esx/esx_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_interface_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_network_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_secret_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_storage_driver.c (ESX_ERROR): Likewise.
* src/esx/esx_util.c (ESX_ERROR): Likewise.
* src/esx/esx_vi.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise.
* src/esx/esx_vmx.c (ESX_ERROR): Likewise.
* src/util/hostusb.c (usbReportError): Use C99 rather than GNU
  vararg macro syntax.
* src/util/json.c (virJSONError): Likewise.
* src/util/macvtap.c (ReportError): Likewise.
* src/util/pci.c (pciReportError): Likewise.
* src/util/stats_linux.c (virStatsError): Likewise.
* src/util/util.c (virUtilError): Likewise.
* src/util/xml.c (virXMLError): Likewise.
* src/xen/proxy_internal.c (virProxyError): Use C99 rather than
  GNU vararg macro syntax.
* src/xen/sexpr.c (virSexprError): Likewise.
* src/xen/xen_driver.c (xenUnifiedError): Likewise.
* src/xen/xen_hypervisor.c (virXenError): Likewise.
* src/xen/xen_inotify.c (virXenInotifyError): Likewise.
* src/xen/xend_internal.c (virXendError): Likewise.
* src/xen/xm_internal.c (xenXMError): Likewise.
* src/xen/xs_internal.c (virXenStoreError): Likewise.
* src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU
  vararg macro syntax.
* src/datatypes.c (virLibConnError): Likewise.
* src/interface/netcf_driver.c (interfaceReportError): Likewise.
* src/libvirt.c (virLibStreamError): Likewise.
* src/lxc/lxc_conf.h (lxcError): Likewise.
* src/network/bridge_driver.c (networkReportError): Likewise.
* src/nodeinfo.c (nodeReportError): Likewise.
* src/opennebula/one_conf.h (oneError): Likewise.
* src/openvz/openvz_conf.h (openvzError): Likewise.
* src/phyp/phyp_driver.c (PHYP_ERROR): Likewise.
* src/qemu/qemu_conf.h (qemuReportError): Likewise.
* src/remote/remote_driver.c (errorf): Likewise.
* src/security/security_driver.h (virSecurityReportError): Likewise.
* src/test/test_driver.c (testError): Likewise.
* src/uml/uml_conf.h (umlReportError): Likewise.
* src/vbox/vbox_driver.c (vboxError): Likewise.
* src/vbox/vbox_tmpl.c (vboxError): Likewise.

15 years agoebtablesAddRemoveRule: avoid dead store
Jim Meyering [Fri, 5 Mar 2010 16:36:40 +0000 (17:36 +0100)]
ebtablesAddRemoveRule: avoid dead store

* src/util/ebtables.c (ebtablesAddRemoveRule): Avoid dead store
to local, "s".

15 years agovirInterfaceDefParseBond: avoid dead stores
Jim Meyering [Fri, 5 Mar 2010 15:18:47 +0000 (16:18 +0100)]
virInterfaceDefParseBond: avoid dead stores

* src/conf/interface_conf.c (virInterfaceDefParseBond): Avoid dead stores
to local, "node".  Remove declaration, too.

15 years agoxenXMDomainConfigParse: avoid dead store
Jim Meyering [Fri, 5 Mar 2010 15:15:09 +0000 (16:15 +0100)]
xenXMDomainConfigParse: avoid dead store

* src/xen/xm_internal.c (xenXMDomainConfigParse): Avoid dead store
to local, "data".  Remove declaration, too.

15 years agoqemudDomainAttachSCSIDisk: handle empty controller list
Jim Meyering [Tue, 2 Mar 2010 16:45:10 +0000 (17:45 +0100)]
qemudDomainAttachSCSIDisk: handle empty controller list

* src/qemu/qemu_driver.c (qemudDomainAttachSCSIDisk): Handle
the (theoretical) case of an empty controller list, so that
clang does not think the subsequent dereference of "cont"
would dereference an undefined variable (due to preceding
loop not iterating even once).

15 years agoqemu restore: don't let corrupt input provoke unwarranted OOM
Jim Meyering [Wed, 3 Mar 2010 10:27:16 +0000 (11:27 +0100)]
qemu restore: don't let corrupt input provoke unwarranted OOM

* src/qemu/qemu_driver.c (qemudDomainRestore): A corrupt save file
(in particular, a too-large header.xml_len value) would cause an
unwarranted out-of-memory error.  Do not trust the just-read
header.xml_len.  Instead, merely use that as a hint, and
read/allocate up to that number of bytes from the file.
Also verify that header.xml_len is positive; if it were negative,
passing it to virFileReadLimFD could cause trouble.

15 years agovirFileReadLimFD: diagnose maxlen <= 0, rather than passing it on...
Jim Meyering [Wed, 3 Mar 2010 10:42:11 +0000 (11:42 +0100)]
virFileReadLimFD: diagnose maxlen <= 0, rather than passing it on...

to saferead_lim, which interprets it as a size_t.
* src/util/util.c (virFileReadLimFD): Do not malfunction when
maxlen < -1.  Return -1,EINVAL in that case.  Handle maxlen==0
in the same manner.

15 years agoxen: don't let bogus packets trigger over-allocation and segfault
Jim Meyering [Wed, 3 Mar 2010 15:50:02 +0000 (16:50 +0100)]
xen: don't let bogus packets trigger over-allocation and segfault

* src/xen/proxy_internal.c (xenProxyDomainDumpXML): An invalid packet
could include a too-large "ans.len" value, which would make us allocate
too much memory and then copy data from beyond the end of "ans",
possibly evoking a segfault.  Ensure that the value we use is no
larger than the remaining portion of "ans".
Also, change unnecessary memmove to memcpy (src and dest obviously
do not overlap, so no need to use memmove).
(xenProxyDomainGetOSType): Likewise.
(xenProxyGetCapabilities): Likewise.

15 years agoqemuMonitorTextGetMemoryStats: decrease risk of false positive in parsing
Jim Meyering [Fri, 5 Mar 2010 14:25:48 +0000 (15:25 +0100)]
qemuMonitorTextGetMemoryStats: decrease risk of false positive in parsing

The code erroneously searched the entire "reply" for a comma, when
its intent was to search only that portion after "balloon: actual="
* src/qemu/qemu_monitor_text.c (qemuMonitorTextGetMemoryStats):
Search for "," only starting *after* the BALLOON_PREFIX string.
Otherwise, we'd be more prone to false positives.

15 years agoRelease of libvirt-0.7.7
Daniel Veillard [Fri, 5 Mar 2010 16:10:21 +0000 (17:10 +0100)]
Release of libvirt-0.7.7

* configure.ac libvirt.spec.in: update with new version
* docs/news.html.in: add list of changes in 0.7.7
* po/*po*: updated spanish and russian localisations, rebuilt

15 years agoFix USB passthrough based on product/vendor
Daniel P. Berrange [Thu, 4 Mar 2010 11:48:16 +0000 (11:48 +0000)]
Fix USB passthrough based on product/vendor

Changeset

  commit 5073aa994af460e775cb3e548528e28d7660fcc8
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Mon Jan 11 11:40:46 2010 -0500

Added support for product/vendor based passthrough, but it only
worked at the security driver layer. The main guest XML config
was not updated with the resolved bus/device ID. When the QEMU
argv refactoring removed use of product/vendor, this then broke
launching guests.

THe solution is to move the product/vendor resolution up a layer
into the QEMU driver. So the first thing QEMU does is resolve
the product/vendor to a bus/device and updates the XML config
with this info. The rest of the code, including security drivers
and QEMU argv generated can now rely on bus/device always being
set.

* src/util/hostusb.c, src/util/hostusb.h: Split vendor/product
  resolution code out of usbGetDevice and into usbFindDevice.
  Add accessors for bus/device ID
* src/security/virt-aa-helper.c, src/security/security_selinux.c,
  src/qemu/qemu_security_dac.c: Remove vendor/product from the
  usbGetDevice() calls
* src/qemu/qemu_driver.c: Use usbFindDevice to resolve vendor/product
  into a bus/device ID

15 years agoConvert QEMU driver all hotunplug code from pci_del to device_del
Daniel P. Berrange [Wed, 3 Mar 2010 15:42:53 +0000 (15:42 +0000)]
Convert QEMU driver all hotunplug code from pci_del to device_del

The pci_del command is not being ported to QMP. Convert all the
QEMU hotplug code over to use device_del whenever it is available
to avoid the pci_del problem

* src/qemu/qemu_driver.c: Convert unplug code to device_del

15 years agoSupport hot-unplug for USB devices in QEMU
Daniel P. Berrange [Wed, 3 Mar 2010 15:10:36 +0000 (15:10 +0000)]
Support hot-unplug for USB devices in QEMU

Previously hot-unplug could not be supported for USB devices
in QEMU, since usb_del required the guest visible address
which libvirt never knows. With 'device_del' command we can
now unplug based on device alias, so support that.

* src/qemu/qemu_driver.c: Use device_del to remove USB devices

15 years agoTweak container initialization to make upstart/init happier
Daniel P. Berrange [Thu, 4 Mar 2010 11:23:28 +0000 (11:23 +0000)]
Tweak container initialization to make upstart/init happier

Upstart crashes & burns in a heap if $TERM environment variable
is missing. Presumably the kernel always sets this when booting
init on a real machine, so libvirt should set it for containers
too.

To make a typical inittab / mingetty setup happier, we need to
symlink the primary console /dev/pts/0 to /dev/tty1.

Improve logging in certain scenarios to make troubleshooting
easier

* src/lxc/lxc_container.c: Create /dev/tty1 and set $TERM

15 years agoMisc fixes for LXC cgroups setup
Daniel P. Berrange [Thu, 4 Mar 2010 11:15:42 +0000 (11:15 +0000)]
Misc fixes for LXC cgroups setup

When using the 'ns' cgroup controller, the moment a process calls
'unshare(CLONE_NEWNS)', it will be given a private cgroup tree
under its current location. This really messages up the LXC
controller process, because it ends up creating the containers'
cgroup in the wrong place. The fix is fairly easy, just move
the cgroup setup before the code which calls unshare(). The
'ns' controller will still create extra undesired cgroups, but
they at least won't break libvirt's setup now.

The patch also adds a missing cgroups allow rule for /dev/tty
device node

15 years agoAvoid creating top level cgroups if just querying for existance
Daniel P. Berrange [Thu, 4 Mar 2010 11:01:52 +0000 (11:01 +0000)]
Avoid creating top level cgroups if just querying for existance

When getting the driver/domain cgroup it is possible to specify
whether it should be auto created. If auto-creation was turned
off, libvirt still mistakenly created its own top level cgroup

* src/util/cgroup.c: Honour autocreate flag for top level cgroup

15 years agoweb docs -- macvtap mode explanation
Stefan Berger [Fri, 5 Mar 2010 14:41:38 +0000 (15:41 +0100)]
web docs -- macvtap mode explanation

This adds more information about the different macvtap device modes,
spells out VEPA and adds a link to a pdf at the ieee site.

15 years agoChange default for storage uid/gid from getuid()/getgid() to -1/-1
Laine Stump [Thu, 4 Mar 2010 22:35:27 +0000 (17:35 -0500)]
Change default for storage uid/gid from getuid()/getgid() to -1/-1

This allows the config to have a setting that means "leave it alone",
eg when building a pool where the directory already exists the user
may want the current uid/gid of the directory left intact. This
actually gets us back to older behavior - before recent changes to the
pool building code, we weren't as insistent about honoring the uid/gid
settings in the XML, and virt-manager was taking advantage of this
behavior.

As a side benefit, removing calls to getuid/getgid from the XML
parsing functions also seems like a good idea. And having a default
that is different from a common/useful value (0 == root) is a good
thing in general, as it removes ambiguity from decisions (at least one
place in the code was checking for (perms.uid == 0) to see if a
special uid was requested).

Note that this will only affect newly created pools and volumes. Due
to the way that the XML is parsed, then formatted for newly created
volumes, all existing pools/volumes already have an explicit uid and
gid set.

src/conf/storage_conf.c: Remove calls to setuid/setgid for default values
                         of uid/gid, and set them to -1 instead

src/storage/storage_backend.c:
src/storage/storage_backend_fs.c:
        Make account for the new default values of perms.uid
        and perms.gid.

15 years agobuild: vbox: avoid build failure when linking with --no-add-needed
Diego Elio Pettenò [Thu, 4 Mar 2010 15:48:10 +0000 (16:48 +0100)]
build: vbox: avoid build failure when linking with --no-add-needed

With the recent changes to the linking defaults in Fedora 13 (namely
enabling --no-add-needed behaviour by default), we have to pass the
dlopen()-providing libraries directly at the link of the module; use the
same AC_SEARCH_LIBS function as used before to look for it and add it to
the Makefile.

15 years agobuild: avoid dlopen-related link failure on rawhide/F13
Diego Elio Pettenò [Thu, 4 Mar 2010 15:45:02 +0000 (16:45 +0100)]
build: avoid dlopen-related link failure on rawhide/F13

Instead of using AC_CHECK_LIB and hardcoding -ldl, search for the library
needed to get dlopen() and then use the cached value.

15 years agoSupport VCPU hotplug in QEMU guests
Daniel P. Berrange [Mon, 8 Feb 2010 16:37:17 +0000 (16:37 +0000)]
Support VCPU hotplug in QEMU guests

QEMU has a monitor command 'set_cpu' which allows a specific
CPU to be toggled between online& offline state. libvirt CPU
hotplug does not work in terms of individual indexes CPUs.
Thus to support this, we iteratively toggle the online state
when the total number of vCPUs is adjusted via libvirt

NB, currently untested since QEMU segvs when running this!

* src/qemu/qemu_driver.c: Toggle online state for CPUs when
  doing hotplug
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
  src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
  monitor API for toggling a CPU's online status via 'set_cpu

15 years agoFix parser checking of storage pool device
Daniel P. Berrange [Wed, 3 Mar 2010 18:47:12 +0000 (18:47 +0000)]
Fix parser checking of storage pool device

The storage backend implementations all presume that the XML parser
is validating correctness of the source specification. The check for
a source device was lost at some point. This allowed for a potential
crash in the disk backend. Re-introduce the sanity check

* src/conf/storage_conf.c: Re-add check for source device

15 years agoFix mis-leading error message in pool delete API
Daniel P. Berrange [Wed, 3 Mar 2010 18:46:27 +0000 (18:46 +0000)]
Fix mis-leading error message in pool delete API

When trying to delete a pool the error message claimed the volume
could not be deleted.

* src/storage/storage_driver.c: Error message referred to
  volumes instead of pools

15 years agoFix typo in QEMU migration command name
Daniel P. Berrange [Wed, 3 Mar 2010 17:07:50 +0000 (17:07 +0000)]
Fix typo in QEMU migration command name

The QMP code was running query-migration instead of query-migrate.
This doesn't work so well

* src/qemu/qemu_monitor_json.c: s/query-migration/query-migrate/

15 years agoDon't raise error message from cgroups if QEMU fails to start
Daniel P. Berrange [Wed, 3 Mar 2010 15:48:22 +0000 (15:48 +0000)]
Don't raise error message from cgroups if QEMU fails to start

The code to remove the cgroup after QEMU failed to startup could
be obscuring a real error from earlier on. It is not neccessary
to raise an error in this case, so tell cgroups to keep quiet

* src/qemu/qemu_driver.c: Don't raise cgroups error in QEMU start
  cleanup code.

15 years agoAdd missing device type check in QEMU PCI hotunplug
Daniel P. Berrange [Wed, 3 Mar 2010 15:15:21 +0000 (15:15 +0000)]
Add missing device type check in QEMU PCI hotunplug

The QEMU hotunplug code for PCI devices was looking at host
devices in the guest config without first filtering non
PCI devices. This means it was reading garbage

* src/qemu/qemu_driver.c: Filter out non-PCI devices

15 years agoAdd a define for NFS_SUPER_MAGIC
Chris Lalancette [Wed, 3 Mar 2010 16:42:08 +0000 (11:42 -0500)]
Add a define for NFS_SUPER_MAGIC

Commit 3c12a67b766cce51b47861ccde2be41de369f832 added
a dependency on the NFS_SUPER_MAGIC macro, which is
defined in linux/magic.h.  Unfortunately linux/magic.h
is not available in RHEL-5, and causes a compile error.
Just define it locally, since this is something that
can't change.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
15 years agoMake domain save work on root-squash NFS
Laine Stump [Wed, 3 Mar 2010 16:07:18 +0000 (17:07 +0100)]
Make domain save work on root-squash NFS

Move *all* file operations related to creation and writing of libvirt
header to the domain save file into a hook function that is called by
virFileOperation. First try to call virFileOperation as root. If that
fails with EACCESS, and (in the case of Linux) statfs says that we're
trying to save the file on an NFS share, rerun virFileOperation,
telling it to fork a child process and setuid to the qemu user. This
is the only way we can successfully create a file on a root-squashed
NFS server.

This patch (along with setting dynamic_ownership=0 in qemu.conf)
makes qemudDomainSave work on root-squashed NFS.

* src/qemu/qemu_driver.c: provide new qemudDomainSaveFileOpHook()
  utility, use it in qemudDomainSave() if normal creation of the
  file as root failed, and after checking the filesystem type for
  the storage is NFS. In that case we also bypass the security
  driver, as this would fail on NFS.

15 years agoFix domain restore for files on root-squash NFS
Laine Stump [Wed, 3 Mar 2010 15:38:42 +0000 (16:38 +0100)]
Fix domain restore for files on root-squash NFS

If qemudDomainRestore fails to open the domain save file, create a
pipe, then fork a process that does setuid(qemu_user) and opens the
file, then reads this file and stuffs it into the pipe. the parent
libvirtd process will use the other end of the pipe as its fd, then
reap the child process after it's done reading.

This makes domain restore work on a root-squash NFS share that is only
visible to the qemu user.

* src/qemu/qemu_driver.c: add new qemudOpenAsUID() helper function,
  and use it in qemudDomainRestore() if reading as root directly failed.

15 years agoFix USB/PCI device address aliases in QEMU hotplug driver
Daniel P. Berrange [Mon, 1 Mar 2010 21:06:01 +0000 (21:06 +0000)]
Fix USB/PCI device address aliases in QEMU hotplug driver

The USB/PCI device hotplug code for the QEMU driver was forgetting
to allocate a unique device alias.

* src/qemu/qemu_driver.c: Fill in device alias for USB/PCI devices

15 years agoFix detection of errors in QEMU device_add command
Daniel P. Berrange [Tue, 2 Mar 2010 17:16:30 +0000 (17:16 +0000)]
Fix detection of errors in QEMU device_add command

The code assumed that 'device_add' returned an empty string upon
success. This is not true, it sometimes prints random debug info.
THus we need to check for an explicit fail string

* src/qemu/qemu_monitor_text.c: Fix error checking of the device_add
  monitor command

15 years agoesx: don't ignore failure on close
Eric Blake [Wed, 3 Mar 2010 10:22:46 +0000 (11:22 +0100)]
esx: don't ignore failure on close

Another warning caught by coverity.  Continue to perform best-effort
closing and resource release, but warn the caller about the failure.

* src/esx/esx_driver.c (esxClose): Return an error on failure to close.

15 years agouml: avoid crash on partial read
Eric Blake [Wed, 3 Mar 2010 00:16:05 +0000 (17:16 -0700)]
uml: avoid crash on partial read

Coverity detected a potential dereference of uninitialized memory
if recvfrom got cut short.

* src/uml/uml_driver.c (umlMonitorCommand): Validate complete read
prior to dereferencing res.

15 years agovirsh: silence compiler warning
Eric Blake [Wed, 3 Mar 2010 00:19:01 +0000 (17:19 -0700)]
virsh: silence compiler warning

gcc warns:
virsh.c:1879: warning: '0' flag ignored with '-' flag in gnu_printf format

* tools/virsh.c (cmdDomjobinfo): Delete useless flag.

15 years agoFix safezero()
Jiri Denemark [Tue, 2 Mar 2010 15:11:24 +0000 (16:11 +0100)]
Fix safezero()

Various safezero() implementations used either -1, errno or -errno
return values. This patch fixes them all to return -1 and set errno
appropriately.

There was also a bug in size parameter passed to safewrite() which could
result in an attempt to write gigabytes out of a megabyte buffer.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
15 years agoFix QEMU domain state after a save attempt fails
Daniel P. Berrange [Thu, 4 Feb 2010 17:19:51 +0000 (17:19 +0000)]
Fix QEMU domain state after a save attempt fails

When a VM save attempt failed, the VM would be left in a paused
state. It is neccessary to resume CPU execution upon failure
if it was running originally

* src/qemu/qemu_driver.c: Resume CPUs upon save failure

15 years agoSupport job cancellation in QEMU driver
Daniel P. Berrange [Wed, 3 Feb 2010 19:11:27 +0000 (19:11 +0000)]
Support job cancellation in QEMU driver

This supports cancellation of jobs for the QEMU driver against
the virDomainMigrate, virDomainSave and virDomainCoreDump APIs.
It is not yet supported for the virDomainRestore API, although
it is desirable.

* src/qemu/qemu_driver.c: Issue 'migrate_cancel' command if
  virDomainAbortJob is issued during a migration operation
* tools/virsh.c: Add a domjobabort command

15 years agoRemote driver implementation for the virDomainAbortJob APi
Daniel P. Berrange [Thu, 4 Feb 2010 16:18:57 +0000 (16:18 +0000)]
Remote driver implementation for the virDomainAbortJob APi

This defines the wire protocol for the new API

* src/remote/remote_protocol.x: Wire protocol definition
* src/remote/remote_driver.c,daemon/remote.c: Client and server
  side implementation
* daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
  daemon/remote_dispatch_table.h, src/remote/remote_protocol.c,
  src/remote/remote_protocol.h: Re-generate from remote_protocol.x

15 years agoWire up internal entry points for virDomainAbortJob API
Daniel P. Berrange [Thu, 4 Feb 2010 16:16:35 +0000 (16:16 +0000)]
Wire up internal entry points for virDomainAbortJob API

This provides the internal glue for the driver API

* src/driver.h: Internal API contract
* src/libvirt.c, src/libvirt_public.syms: Connect public API
  to driver API
* src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
  src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
  src/qemu/qemu_driver.c, src/remote/remote_driver.c,
  src/test/test_driver.c src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
  src/xen/xen_driver.c: Stub out entry points

15 years agoIntroduce public API for cancelling async domain jobs
Daniel P. Berrange [Thu, 4 Feb 2010 16:12:01 +0000 (16:12 +0000)]
Introduce public API for cancelling async domain jobs

The new virDomainAbortJob() method provides a way for a second
thread to abort an ongoing job run by another thread. This
extends to any API with  which the virDomainGetJobInfo() API
is intended to work. Cancellation is not guarenteed, rather best
effort on part of the hypervisor and not required to be implmented.

* include/libvirt/libvirt.h.in: Define virDomainAbortJob()