- 23 2月, 2013 13 次提交
-
-
由 Michal Privoznik 提交于
If a migration fails, we need to stop all block jobs running so qemu doesn't try to send data to destination over and over again.
-
由 Michal Privoznik 提交于
At the end of migration, it is important to stop NBD server and thus release all allocated resources.
-
由 Michal Privoznik 提交于
This function does the source part of NBD magic. It invokes drive-mirror on each non shared and RW disk with a source and wait till the mirroring process completes. When it does we can proceed with migration. Currently, an active waiting is done: every 500ms libvirt asks qemu if block-job is finished or not. However, once the job finishes, qemu doesn't report its progress so we can only assume if the job finished successfully or not. The better solution would be to listen to the event which is sent as soon as the job finishes. The event does contain the result of job.
-
由 Michal Privoznik 提交于
We need to start NBD server and feed it with all non-<shared/>, RW and source-full disks. Moreover, with new virPortAllocator we must ensure the borrowed port for NBD server will be returned if either migration completes or qemu process is torn down.
-
由 Michal Privoznik 提交于
This will be used after all migration work is done to stop NBD server running on destination. It doesn't take any arguments, just issues a command.
-
由 Michal Privoznik 提交于
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches.
-
由 Michal Privoznik 提交于
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches.
-
由 Michal Privoznik 提交于
This migration cookie is meant for two purposes. The first is to be sent in begin phase from source to destination to let it know we support new implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can start NBD server. Then, the second purpose is, destination can let us know, on which port the NBD server is running.
-
由 Michal Privoznik 提交于
This just keeps track whether qemu knows nbd-server-* commands so we can use it during migration or not.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
As a side effect, this also fixes reporting disk migration process. It was added to memory migration progress, which was wrong. Disk progress has dedicated fields in virDomainJobInfo structure.
-
由 Jiri Denemark 提交于
-
- 22 2月, 2013 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=896685 points out a regression caused by commit 38c4a9cc - libvirt only labels the backing chain if the backing chain cache is populated, but the code to populate the cache was only conditionally performed if cgroup labeling was necessary. * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Hoist cache setup... * src/qemu/qemu_process.c (qemuProcessStart): ...earlier into caller, where it is now unconditional.
-
- 21 2月, 2013 13 次提交
-
-
由 Peter Krempa 提交于
Change the error label to "error" and simplify some error paths.
-
由 Jiri Denemark 提交于
Since closeCallbacks were turned into virObjectLockable, we can no longer call virQEMUCloseCallbacks APIs from within a registered close callback.
-
由 Jiri Denemark 提交于
To avoid having to hold the qemu driver lock while iterating through close callbacks and calling them. This fixes a real deadlock when a domain which is being migrated from another host gets autodestoyed as a result of broken connection to the other host.
-
由 Guannan Ren 提交于
The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which leads to the off-by-one error in the following for loop. # virsh cpu-stats guest --start 1 error: Failed to virDomainGetCPUStats() error: internal error cpuacct parse error
-
由 Osier Yang 提交于
Found by John Ferlan (coverity script)
-
由 John Ferlan 提交于
-
由 Michal Privoznik 提交于
Currently, if lzop decompression binary produces a warning, it doesn't exit with zero status but 2 instead. Terrifying, but true. However, warnings may be ignored using '--ignore-warn' command line argument. Moreover, in which case, the exit status will be zero.
-
由 Osier Yang 提交于
For both AttachDevice and UpdateDevice APIs, if the disk device is 'cdrom' or 'floppy', the operations could be ejecting, updating, and inserting. For either ejecting or updating, the shared disk entry of the original disk src has to be removed, because it's not useful anymore. And since the original disk def will be changed, new disk def passed as argument will be free'ed in qemuDomainChangeEjectableMedia, so we need to copy the orignal disk def before qemuDomainChangeEjectableMedia, to use it for qemuRemoveSharedDisk.
-
由 Osier Yang 提交于
The disk def could be free'ed by qemuDomainChangeEjectableMedia, which can thus cause crash if we reference the disk pointer. On the other hand, we have to remove the added shared disk entry from the table on error codepath.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
The hash entry is changed from "ref" to {ref, @domains}. With this, the caller can simply call qemuRemoveSharedDisk, without afraid of removing the entry belongs to other domains. qemuProcessStart will obviously benifit from it on error codepath (which calls qemuProcessStop to do the cleanup).
-
由 Osier Yang 提交于
Based on moving various checking into qemuAddSharedDisk, this avoids the caller using it in wrong ways. Also this adds two new checking for qemuCheckSharedDisk (disk device not 'lun' and kernel doesn't support unpriv_sgio simply returns 0).
-
由 Osier Yang 提交于
This moves the various checking into the helpers, to avoid the callers missing the checking.
-
- 20 2月, 2013 3 次提交
-
-
由 Jiri Denemark 提交于
Due to "feature"/"features" nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that formats mandatory features in migration cookie: for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) { if (mig->flagsMandatory & (1 << i)) virBufferAsprintf(buf, " <feature name='%s'/>\n", qemuMigrationCookieFlagTypeToString(i)); }
-
由 Ján Tomko 提交于
Some functions were using virDomainDeviceInfo where virDevicePCIAddress would suffice. Some were only using integers for slots and functions, assuming the bus numbers are always 0. Switch from virDomainDeviceInfoPtr to virDevicePCIAddressPtr: qemuPCIAddressAsString qemuDomainPCIAddressCheckSlot qemuDomainPCIAddressReserveAddr qemuDomainPCIAddressReleaseAddr Switch from int slot to virDevicePCIAddressPtr: qemuDomainPCIAddressReserveSlot qemuDomainPCIAddressReleaseSlot qemuDomainPCIAddressGetNextSlot Deleted functions (they would take the same parameters as ReserveAddr/ReleaseAddr do now.) qemuDomainPCIAddressReserveFunction qemuDomainPCIAddressReleaseFunction
-
由 Jiri Denemark 提交于
-
- 19 2月, 2013 2 次提交
-
-
由 Guido Günther 提交于
so we don't try to change uid/git to 0 when probing capabilities.
-
由 Doug Goldstein 提交于
The conversion to qemuCaps dropped the ability with qemu{,-kvm} 1.2 and newer to set the lost tick policy for the PIT. While the -no-kvm-pit-reinjection option is depreacated, it is still supported at least through 1.4, it is better to not lose the functionality.
-
- 14 2月, 2013 2 次提交
-
-
由 Laine Stump 提交于
The qemu driver had been calling virSecurityManagerSetProcessLabel() from a "pre-exec hook" function that is run after the child is forked, but before exec'ing qemu. This is problematic because the uid and gid of the child are set by the security driver, but capabilities are dropped by virCommand - such separation doesn't work; the two operations must be done together or the capabilities do not transfer properly to the child process. This patch switches to using virSecurityManagerSetChildProcessLabel(), which is called prior to virCommandRun() (rather than being called *during* virCommandrun() by the hook function), and doesn't set the UID/GID/security label directly, but instead merely informs virCommand what it should set them all to when the time is appropriate. This lets virCommand choose to do the uid/gid and caps dropping all at the same time if it wants (it does *want* to, but isn't doing so yet; that's for an upcoming patch).
-
由 Laine Stump 提交于
Setting the uid/gid of the child process was the only thing done by the hook function in this case, and that can now be done more simply with virCommandSetUID/GID.
-
- 13 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
With the majority of fields in the virQEMUDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the QEMU driver lock. Only a handful of helper APIs in qemu_conf.c now need it
-
- 12 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The hook scripts used by virCommand must be careful wrt accessing any mutexes that may have been held by other threads in the parent process. With the recent refactoring there are 2 potential flaws lurking, which will become real deadlock bugs once the global QEMU driver lock is removed. Remove use of the QEMU driver lock from the hook function by passing in the 'virQEMUDriverConfigPtr' instance directly. Add functions to the virSecurityManager to be invoked before and after fork, to ensure the mutex is held by the current thread. This allows it to be safely used in the hook script in the child process. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 2月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
Currently the APIs for managing the shared disk list take a virHashTablePtr as the primary argument. This is bad because it requires the caller to deal with locking of the QEMU driver. Switch the APIs to take the full virQEMUDriverPtr instance Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add locking to virSecurityManagerXXX APIs, so that use of the security drivers is internally serialized. This avoids the need to rely on the global driver locks to achieve serialization Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To enable locking to be introduced to the security manager objects later, turn virSecurityManager into a virObjectLockable class Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 09 2月, 2013 1 次提交
-
-
由 Laine Stump 提交于
From qemu's point of view these are still just tap devices, so there's no reason they shouldn't work with vhost-net; as a matter of fact, Raja Sivaramakrishnan <srajag00@yahoo.com> verified on libvir-list that at least the qemu_command.c part of this patch works: https://www.redhat.com/archives/libvir-list/2012-December/msg01314.html (the hotplug case is extrapolation on my part).
-