- 18 12月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
GNUTLS uses gcrypt for its crypto functions. gcrypt requires that the app/library initializes threading before using it. We don't want to force apps using libvirt to know about gcrypt, so we make virInitialize init threading on their behalf. This location also ensures libvirtd has initialized it correctly. This initialization is required even if libvirt itself were only using one thread, since another non-libvirt library (eg GTK-VNC) could also be using gcrypt from another thread * src/libvirt.c: Register thread functions for gcrypt * configure.in: Add -lgcrypt to linker flags
-
由 Daniel P. Berrange 提交于
* src/storage/storage_driver.c: Fix IsPersistent() and IsActivE() methods on storage pools to use 'storagePrivateData' instead of 'privateData'. Also fix naming convention of objects
-
- 16 12月, 2009 7 次提交
-
-
由 Jim Meyering 提交于
* src/esx/esx_vi.c (esxVI_List_CastFromAnyType): For invalid inputs, fail right away. Do not "goto failure" where a NULL input pointer would be dereferenced.
-
由 Jim Meyering 提交于
* src/esx/esx_util.c (esxUtil_ParseDatastoreRelatedPath): Return right away for invalid inputs, rather than using them (which would dereference NULL pointers) in clean-up code.
-
由 Matthias Bolte 提交于
This also fixes a NULL-deref of virtualDev in esxVMX_ParseSCSIController found by Jim Meyering.
-
由 Matthias Bolte 提交于
-
由 Jim Meyering 提交于
The virFileResolveLink utility function relied on the POSIX guarantee that stat.st_size of a symlink is the length of the value. However, on some types of file systems, it is invalid, so do not rely on it. Use gnulib's areadlink module instead. * bootstrap (modules): Add areadlink. * src/util/util.c: Include "areadlink.h". Let areadlink perform the readlink and malloc. * configure.in (AC_CHECK_FUNCS): Remove readlink. No need, since it's presence is guaranteed by gnulib.
-
由 Jim Meyering 提交于
* src/xen/xm_internal.c (xenXMConfigGetULong): Remove useless and misleading test (always false) for val->str == NULL before code that always dereferences val->str. "val" comes from virConfGetValue, and at that point, val->str is guaranteed to be non-NULL. (xenXMConfigGetBool): Likewise. * src/util/conf.c (virConfSetValue): Ensure that vir->str is never NULL, not even if someone tries to set such a value via virConfSetValue.
-
由 Jim Meyering 提交于
* src/libvirt.c (virDomainGetVcpus): Describe new, stronger requirement on "maplen"s relationship to "cpumaps".
-
- 15 12月, 2009 4 次提交
-
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (doNonTunnelMigrate): Don't let a NULL "uri_out" provoke a NULL-dereference in doNativeMigrate: supply omitted goto-after-qemudReportError.
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudDomainMigratePrepareTunnel): Upon an out of memory error, we would end up with unixfile==NULL and attempt to unlink(NULL). Skip the unlink when it's NULL.
-
由 Jim Meyering 提交于
* src/remote/remote_driver.c (remoteIOReadMessage): ...rather than zeroing out priv->saslDecodedLength twice.
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Set "event" to NULL after qemuDomainEventQueue frees it, so a subsequent free (after endjob label) upon qemuMonitorStartCPUs failure does not cause a double free.
-
- 14 12月, 2009 15 次提交
-
-
由 Jim Meyering 提交于
* src/node_device/node_device_driver.c (update_driver_name): The previous code would write one byte beyond the end of the 4KiB stack buffer when presented with a symlink value of exactly that length (very unlikely). Remove the automatic buffer and use virFileResolveLink in place of readlink. Suggested by Daniel Veillard.
-
由 Laine Stump 提交于
* src/storage/storage_backend_fs.c: virStorageBackendFileSystemDelete was incorrectly calling unlink() in an attempt to remove a directory. It should be calling rmdir() instead.
-
由 Jiri Denemark 提交于
src/node_device/node_device_udev.c was using a function available only on the daemon code, fix this and use the function available globally * src/node_device/node_device_udev.c: replace use of virEventAddHandleImpl by virEventAddHandle
-
由 Matthew Booth 提交于
* src/qemu/qemu_driver.c: #undef LOOKUP_PTYS after use in qemudFindCharDevicePTYsMonitor()
-
由 Cole Robinson 提交于
Provides the CDROM label for current media. Only implemented for the udev backend.
-
由 Dave Allan 提交于
exposes the relationships between physical and virtual functions on SR IOV capable devices.
-
由 Paolo Bonzini 提交于
If there are no references remaining to the object, vm is set to NULL and vm->persistent cannot be accessed. Fixed by this trivial patch. * src/qemu/qemu_driver.c (qemudDomainCoreDump): Avoid possible NULL pointer dereference on --crash dump.
-
由 Paolo Bonzini 提交于
This is trivial for QEMU since you just have to not stop the vm before starting the dump. And for Xen, you just pass the flag down to xend. * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): Add VIR_DUMP_LIVE. * src/qemu/qemu_driver.c (qemudDomainCoreDump): Support live dumping. * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support live dumping. * tools/virsh.c (opts_dump): Add --live. (cmdDump): Map it to VIR_DUMP_LIVE.
-
由 Paolo Bonzini 提交于
This patch adds the --crash option (already present in "xm dump-core") to "virsh dump". virDomainCoreDump already has a flags argument, so the API/ABI is untouched. * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): New flag for CoreDump * src/test/test_driver.c (testDomainCoreDump): Do not crash after dump unless VIR_DUMP_CRASH is given. * src/qemu/qemu_driver.c (qemudDomainCoreDump): Shutdown the domain instead of restarting it if --crash is passed. * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support --crash. * tools/virsh.c (opts_dump): Add --crash. (cmdDump): Map it to flags for virDomainCoreDump and pass them.
-
由 Paolo Bonzini 提交于
1) qemuMigrateToCommand uses ">>" so we have to truncate the file before starting the migration; 2) the command wasn't updated to chown the driver and set/restore the security lavels; 3) the VM does not have to be resumed if migration fails; 4) the file is not removed when migration fails. * src/qemu/qemu_driver.c (qemuDomainCoreDump): Truncate file before dumping, set/restore ownership and security labels for the file.
-
由 Daniel Veillard 提交于
Those were pointed by DanB in his review but not yet fixed * src/qemu/qemu_driver.c: qemudWaitForMonitor() use EnterMonitorWithDriver() and ExitMonitorWithDriver() there * src/qemu/qemu_monitor_text.c: checking fro strdu failure and hash table add error in qemuMonitorTextGetPtyPaths()
-
由 Matthew Booth 提交于
This change makes the QEMU driver get pty paths from the output of the monitor 'info chardev' command. This output is structured, and contains both the name of the device and the path on the same line. This is considerably more reliable than parsing the startup log output, which requires the parsing code to know which order QEMU will print pty information in. Note that we still need to parse the log output as the monitor itself may be on a pty. This should be rare, however, and the new code will replace all pty paths parsed by the log output method once the monitor is available. * src/qemu/qemu_monitor.(c|h) src/qemu_monitor_text.(c|h): Implement qemuMonitorGetPtyPaths(). * src/qemu/qemu_driver.c: Get pty path information using qemuMonitorGetPtyPaths().
-
由 Matthew Booth 提交于
* src/qemu/qemu_driver.c: Parse pty devices for channels
-
由 Matthew Booth 提交于
Change -monitor, -serial and -parallel output to use -chardev if it is available. * src/qemu/qemu_conf.c: Update qemudBuildCommandLine to use -chardev where available. * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/: Add -chardev equivalents for all current serial and parallel tests.
-
由 Ryota Ozaki 提交于
Even if qemudStartVMDaemon suceeds, an error was logged such as 'qemuRemoveCgroup:1778 : internal error Unable to find cgroup for'. This is because qemudStartVMDaemon calls qemuRemoveCgroup to ensure that old cgroup does not remain. This workaround makes sense but leaving an error message may confuse users. * src/qemu/qemu_driver.c: a an option to the function to suppress the error being logged
-
- 11 12月, 2009 5 次提交
-
-
由 Matthias Bolte 提交于
-
由 Paolo Bonzini 提交于
This patch fixes the bug where paused/running state is not transmitted during migration. As a result, in the QEMU driver for example the machine was always started on the destination end. In order to do so, just read the state and if it is appropriate and set the VIR_MIGRATE_PAUSED flag. * src/libvirt.c (virDomainMigrateVersion1, virDomainMigrateVersion2): Automatically add VIR_MIGRATE_PAUSED when appropriate. * src/xen/xend_internal.c (xenDaemonDomainMigratePerform): Give a nicer error message when migration of paused domains is attempted.
-
由 Paolo Bonzini 提交于
This adds a new flag, VIR_MIGRATE_PAUSED, that mandates pausing the migrated VM before starting it. * include/libvirt/libvirt.h.in (virDomainMigrateFlags): Add VIR_MIGRATE_PAUSED. * src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Handle VIR_MIGRATE_PAUSED. * tools/virsh.c (opts_migrate): Add --suspend. (cmdMigrate): Handle it. * tools/virsh.pod (migrate): Document it.
-
由 Paolo Bonzini 提交于
This makes a small change on the failed-migration path. Up to now, all VMs that failed non-live migration after the "stop" command were restarted. This must not be done when the VM was paused in the first place. * src/qemu/qemu_driver.c (qemudDomainMigratePerform): Do not restart a paused VM that fails migration. Set paused state after "stop", reset it after failure.
-
由 Richard Jones 提交于
See also: https://bugzilla.redhat.com/show_bug.cgi?id=545400#c1
-
- 10 12月, 2009 5 次提交
-
-
由 Mark McLoughlin 提交于
We don't use this method of reloading rules anymore, so we can just kill the code. This simplifies things a lot because we no longer need to keep a table of the rules we've added. * src/util/iptables.c: kill iptablesReloadRules()
-
由 Mark McLoughlin 提交于
Long ago we tried to use Fedora's lokkit utility in order to register our iptables rules so that 'service iptables restart' would automatically load our rules. There was one fatal flaw - if the user had configured iptables without lokkit, then we would clobber that configuration by running lokkit. We quickly disabled lokkit support, but never removed it. Let's do that now. The 'my virtual network stops working when I restart iptables' still remains. For all the background on this saga, see: https://bugzilla.redhat.com/227011 * src/util/iptables.c: remove lokkit support * configure.in: remove --enable-lokkit * libvirt.spec.in: remove the dirs used only for saving rules for lokkit * src/Makefile.am: ditto * src/libvirt_private.syms, src/network/bridge_driver.c, src/util/iptables.h: remove references to iptablesSaveRules
-
由 Mark McLoughlin 提交于
This is the expected behaviour, I think - reloading libvirtd should be a subset of restarting it. Note, we reload the rules after we've determined which networks are active (because we only add the rules for active networks) and before we start autostart networks (to avoid re-adding the rules). * src/network/bridge_driver.c: reload iptables rules on startup
-
由 Mark McLoughlin 提交于
Currently, when we add iptables rules, we keep them on a list so that we can easily reload them on e.g. 'service libvirtd reload'. However, we don't save this list to disk, so if libvirtd is restarted we lose the ability to reload the rules. The fix is simple - just re-add the damn things on reload. Note, we delete the rules before re-adding them, just like the current behaviour of iptRulesReload(). * src/network/bridge_driver.c: re-add the iptables rules on reload.
-
由 Matthias Bolte 提交于
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
-
- 09 12月, 2009 2 次提交
-
-
由 Jim Fehlig 提交于
xen-unstable changesets 20321 and 20521 added support for description in xend domain config. This patch extends that support in xend backend. * src/xen/xend_internal.c: add parse and output of domain description
-
由 Daniel P. Berrange 提交于
The QEMU 0.10.0 release (and possibly other 0.10.x) has a bug where it sometimes/often forgets to display the initial monitor greeting line, soley printing a (qemu). This in turn confuses the text console parsing because it has a '(qemu)' it is not expecting. The confusion results in a negative malloc. Bad things follow. This re-writes the text console handling to be more robust. The key idea is that it should only look for a (qemu), once it has seen the original command echo'd back. This ensures it'll skip the bogus stray (qemu) with broken QEMUs. * src/qemu/qemu_monitor.c: Add some (disabled) debug code * src/qemu/qemu_monitor_text.c: Re-write way command replies are detected
-