You need to sign in or sign up before continuing.
- 29 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Rather mechanical in nature. * src/driver.h: Use newer virTypedParameter API names. * src/libvirt.c: Likewise. * daemon/remote.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/test/test_driver.c: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise.
-
- 28 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 27 5月, 2011 1 次提交
-
-
由 Hu Tao 提交于
drivers implementing domainSetSchedulerParametersFlags should check flags themselves.
-
- 25 5月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainMigrateFinish3 method signature attempts to distinguish two types of errors, by allowing return with ret== 0, but ddomain == NULL, to indicate a failure to start the guest. This is flawed, because when ret == 0, there is no way for the virErrorPtr details to be sent back to the client. Change the signature of virDomainMigrateFinish3 so it simply returns a virDomainPtr, in the same way as virDomainMigrateFinish2 The disk locking code will protect against the only possible failure mode this doesn't account for (loosing conenctivity to libvirtd after Finish3 starts the CPUs, but before the client sees the reply for Finish3). * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Change virDomainMigrateFinish3 to return a virDomainPtr instead of int * src/remote/remote_driver.c, src/remote/remote_protocol.x, daemon/remote.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c: Update for API change
-
由 Daniel P. Berrange 提交于
When doing migration, if an error occurs in Perform, it must not be overwritten during Finish/Confirm steps. If an error occurs in Finish, it must not be overwritten in Confirm. Previous commit a9d12c24 added code to qemudDomainMigrateFinish2 to preserve the error. This is not the right place, because it is not applicable in non-p2p migration. The src/libvirt.c virDomainMigrateV2/3 methods need code to preserve errors for non-p2p migration, while the doPeer2PeerMigrate2 and doPeer2PeerMigrate3 methods contain code to preverse errors for p2p migration. Remove the bogus error preservation from qemudDomainMigrateFinish2 and qemudDomainMigrateFinish3. Fix virDomainMigrateV3 and doPeer2PeerMigrate3 so that they preserve any error hit during the Finish3 step, before invoking Confirm3. Finally if qemuMigrationFinish fails to resume the CPUs, it must preserve the error before tearing down the VM, so that VM cleanup doesn't overwrite it. * src/libvirt.c: Preserve error before invoking Confirm3 * src/qemu/qemu_driver.c: Remove bogus error preservation code in qemudDomainMigrateFinish2/qemudDomainMigrateFinish3 * src/qemu/qemu_migration.c: Preserve error before invoking Confirm3 and after resume fails in qemuMigrationFinish.
-
由 Daniel P. Berrange 提交于
* src/libvirt.c: Add further debug lines in helper APIs for migration * src/qemu/qemu_migration.c: Add debug lines for all internal migration API parameters
-
由 Daniel P. Berrange 提交于
There are two pieces of information which are desirable for migration, which cannot be supplied by applications - The explicit QEMU migration URI, while using Peer2Peer migration - An override for the target VM XML This introduces two new public APIs to support these extra parameters. There is no need for extra wire protocool changes, since this is supported by the v3 migration enhancements * include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_public.syms: Add virDomainMigrate2 and virDomainMigrateToURI2
-
由 Daniel P. Berrange 提交于
The virDomainMigratePerform3 currently has a single URI parameter whose meaning varies. It is either - A QEMU migration URI (normal migration) - A libvirtd connection URI (peer2peer migration) Unfortunately when using peer2peer migration, without also using tunnelled migration, it is possible that both URIs are required. This adds a second URI parameter to the virDomainMigratePerform3 method, to cope with this scenario. Each parameter how has a fixed meaning. NB, there is no way to actually take advantage of this yet, since virDomainMigrate/virDomainMigrateToURI do not have any way to provide the 2 separate URIs * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add the second URI parameter to perform3 message * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Add the second URI parameter to Perform3 method * src/libvirt_internal.h, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Update to handle URIs correctly
-
由 Daniel P. Berrange 提交于
This extends the v3 migration protocol such that the virDomainMigrateBegin3 and virDomainMigratePerform3 methods accept an application supplied XML config for the target VM. If the 'xmlin' parameter is NULL, then Begin3 uses the current guest XML as normal. A driver implementing the Begin3 method should either reject all non-NULL 'xmlin' parameters, or strictly validate that the app supplied XML does not change guest ABI. The Perform3 method also needed the xmlin parameter to cope with the Peer2Peer migration sequence. NB it is not yet possible to use this capability since neither of the public virDomainMigrate/virDomainMigrateToURI methods have a way to pass in XML. * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add 'remote_string xmlin' parameter to begin3/perform3 RPC messages * src/libvirt.c, src/driver.h, src/libvirt_internal.h: Add 'const char *xmlin' parameter to Begin3/Perform3 methods * src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Pass xmlin parameter around migration methods
-
- 19 5月, 2011 7 次提交
-
-
由 Daniel P. Berrange 提交于
The internal virDomainMigratePeer2Peer and virDomainMigrateDirect helper methods were not checking whether the target supports the v3 migration protocol. * src/libvirt.c: Use v3 migration protocol for p2p/direct migration if available.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Improve invalid argument checks in the size query case. The drivers already relied on this unchecked behavior. Relax the implementation of virDomainGet(Memory|Blkio)MemoryParameters in the drivers and allow to pass more memory than necessary for all parameters.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Add invalid argument checks for params and nparams to the public API and remove them from the drivers (e.g. xend). Add subset handling to libxl and test drivers.
-
由 Matthias Bolte 提交于
params and nparams are essential and cannot be NULL. Check this in libvirt.c and remove redundant checks from the drivers (e.g. xend). Instead of enforcing that nparams must point to exact same value as returned by virDomainGetSchedulerType relax this to a lower bound check. This is what some drivers (e.g. xen hypervisor and esx) already did. Other drivers (e.g. xend) didn't check nparams at all and assumed that there is enough space in params. Unify the behavior in all drivers to a lower bound check and update nparams to the number of valid values in params on success.
-
由 Matthias Bolte 提交于
Some drivers assumed it can be NULL (e.g. qemu and lxc) and check it before assigning to it, other drivers assumed it must be non-NULL (e.g. test and esx) and just assigned to it. Unify this to nparams being optional and document it.
-
- 17 5月, 2011 3 次提交
-
-
由 Hu Tao 提交于
This new function allows aditional flags to be passed into from the virsh command line.
-
由 Matthias Bolte 提交于
virStreamNew needs to dispatch the error that virGetStream reports on failure. remoteCreateClientStream can fail due to virStreamNew or due to VIR_ALLOC. Report OOM error for VIR_ALLOC failure to report errors in all error cases. Remove OOM error reporting from remoteCreateClientStream callers.
-
由 Jiri Denemark 提交于
virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in virEventRegisterDefaultImpl() since that is the first call that touches (resets) virLastErr. I have no idea what lucky coincidence made this bug visible but I was able to reproduce it in 100% cases but only in one specific environment which included building in sandbox.
-
- 16 5月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
The v2 migration protocol was accidentally missing out the finish step, when prepare succeeded, but returned an invalid URI * src/libvirt.c: Teardown VM if prepare returns invalid URI
-
由 Daniel P. Berrange 提交于
Migration just seems to go from bad to worse. We already had to introduce a second migration protocol when adding the QEMU driver, since the one from Xen was insufficiently flexible to cope with passing the data the QEMU driver required. It turns out that this protocol still has some flaws that we need to address. The current sequence is * Src: DumpXML - Generate XML to pass to dst * Dst: Prepare - Get ready to accept incoming VM - Generate optional cookie to pass to src * Src: Perform - Start migration and wait for send completion - Kill off VM if successful, resume if failed * Dst: Finish - Wait for recv completion and check status - Kill off VM if unsuccessful The problems with this are: - Since the first step is a generic 'DumpXML' call, we can't add in other migration specific data. eg, we can't include any VM lease data from lock manager plugins - Since the first step is a generic 'DumpXML' call, we can't emit any 'migration begin' event on the source, or have any hook that runs right at the start of the process - Since there is no final step on the source, if the Finish method fails to receive all migration data & has to kill the VM, then there's no way to resume the original VM on the source This patch attempts to introduce a version 3 that uses the improved 5 step sequence * Src: Begin - Generate XML to pass to dst - Generate optional cookie to pass to dst * Dst: Prepare - Get ready to accept incoming VM - Generate optional cookie to pass to src * Src: Perform - Start migration and wait for send completion - Generate optional cookie to pass to dst * Dst: Finish - Wait for recv completion and check status - Kill off VM if failed, resume if success - Generate optional cookie to pass to src * Src: Confirm - Kill off VM if success, resume if failed The API is designed to allow both input and output cookies in all methods where applicable. This lets us pass around arbitrary extra driver specific data between src & dst during migration. Combined with the extra 'Begin' method this lets us pass lease information from source to dst at the start of migration Moving the killing of the source VM out of Perform and into Confirm, means we can now recover if the dst host can't successfully Finish receiving migration data.
-
由 Daniel P. Berrange 提交于
Fix some driver names: s/virDrvCPUCompare/virDrvCompareCPU/ s/virDrvCPUBaseline/virDrvBaselineCPU/ s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/ s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/ s/virDrvSecretListSecrets/virDrvListSecrets/ And some driver struct field names: s/getFreeMemory/nodeGetFreeMemory/
-
由 Jiri Denemark 提交于
-
- 13 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
* src/libvirt.c: new function virDomainScreenshot
-
- 12 5月, 2011 4 次提交
-
-
由 Eric Blake 提交于
The public API and RPC over-the-wire format have no flags argument, so neither should the internal callback API. This simplifies the RPC generator. * src/driver.h (virDrvNWFilterDefineXML): Drop argument that does not match public API. * src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise. * src/libvirt.c (virNWFilterDefineXML): Likewise. * daemon/remote_generator.pl: Drop special case.
-
由 Eric Blake 提交于
* src/libvirt.c (VIR_DOMAIN_DEBUG_1): Convert to single statement. Suggested by Jiri Denemark.
-
由 Eric Blake 提交于
This one's tricker than the VIR_DEBUG0() removal, but the end result is still C99 compliant, and reasonable with enough comments. * src/libvirt.c (VIR_ARG10, VIR_HAS_COMMA) (VIR_DOMAIN_DEBUG_EXPAND, VIR_DOMAIN_DEBUG_PASTE): New macros. (VIR_DOMAIN_DEBUG): Rewrite to handle one argument, moving multi-argument guts to... (VIR_DOMAIN_DEBUG_1): New macro. (VIR_DOMAIN_DEBUG0): Rename to VIR_DOMAIN_DEBUG_0.
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 11 5月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
This matches the public API and helps to get rid of some special case code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included outside of the remote generator.
-
由 Lai Jiangshan 提交于
-
- 10 5月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
assert() is forbidden in libvirt code, and these two cases would in fact never execute due to earlier error checks. * src/libvirt.c: Remove assert() usage
-
- 26 4月, 2011 1 次提交
-
-
由 Mark Wu 提交于
They don't make any sense when used together.
-
- 21 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Remove the artificial minimum of 4096 KB for guest memory. It's drivers' job to set the limit if needed.
-
- 17 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
And from all related macros and functions.
-
- 09 4月, 2011 3 次提交
-
-
由 Taku Izumi 提交于
This patch implements the code to support virDomainSetMaxMemory API, and to support VIR_DOMAIN_MEM_MAXIMUM flag in qemudDomainSetMemoryFlags function. As a result, we can change the maximum memory size of inactive QEMU guests. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Taku Izumi 提交于
This patch introduces VIR_DOMAIN_MEM_MAXIMUM flag. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Jean-Baptiste Rouault 提交于
Move "returns" keyword from beginning of API doc lines when it does not describe return values. Maybe the API doc extractor could be changed to look for "returns: " to avoid such confusion.
-
- 08 4月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch introduces VIR_DOMAIN_MEM_CURRENT flag and modifies virDomainSetMemoryFlags function to support it. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 05 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Removes multiple 4kb stack allocations. Removes TODO comments as suggested by Daniel P. Berrange.
-
- 01 4月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
-