- 21 12月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
There is one problem that causes various errors in the daemon. When domain is waiting for a job, it is unlocked while waiting on the condition. However, if that domain is for example transient and being removed in another API (e.g. cancelling incoming migration), it get's unref'd. If the first call, that was waiting, fails to get the job, it unref's the domain object, and because it was the last reference, it causes clearing of the whole domain object. However, when finishing the call, the domain must be unlocked, but there is no way for the API to know whether it was cleaned or not (unless there is some ugly temporary variable, but let's scratch that). The root cause is that our APIs don't ref the objects they are using and all use the implicit reference that the object has when it is in the domain list. That reference can be removed when the API is waiting for a job. And because each domain doesn't do its ref'ing, it results in the ugly checking of the return value of virObjectUnref() that we have everywhere. This patch changes qemuDomObjFromDomain() to ref the domain (using virDomainObjListFindByUUIDRef()) and adds qemuDomObjEndAPI() which should be the only function in which the return value of virObjectUnref() is checked. This makes all reference counting deterministic and makes the code a bit clearer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 12月, 2014 1 次提交
-
-
由 Eric Blake 提交于
When requested in a later patch, the QMP command results are now examined recursively. As qemu_driver will eventually have to read items out of the hash table as stored by this patch, the computation of backing alias string is done in a shared location. * src/qemu/qemu_domain.h (qemuDomainStorageAlias): New prototype. * src/qemu/qemu_domain.c (qemuDomainStorageAlias): Implement it. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetOneBlockStatsInfo) (qemuMonitorJSONBlockStatsUpdateCapacityOne): Perform recursion. (qemuMonitorJSONGetAllBlockStatsInfo) (qemuMonitorJSONBlockStatsUpdateCapacity): Update callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 12月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Thanks to that we don't need to drag the pointer everywhere and future code will get cleaner. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 04 12月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Move entering the job into the thread to simplify the program flow. Also as the code holds a separate reference to the domain object some conditions can be simplified. After this patch qemuDomainObjTransferJob is no longer needed so this patch removes it.
-
- 28 11月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1160084 As of b6d4dad1 (1.2.5) we are trying to keep the status of FSFreeze in the guest. Even though I've tried to fixed couple of corner cases (6ea54769), it occurred to me just recently, that the approach is broken by design. Firstly, there are many other ways to talk to qemu-ga (even through libvirt) that filesystems can be thawed (e.g. qemu-agent-command) without libvirt noticing. Moreover, there are plenty of ways to thaw filesystems without even qemu-ga noticing (yes, qemu-ga keeps internal track of FSFreeze status). So, instead of keeping the track ourselves, or asking qemu-ga for stale state, it's the best to let qemu-ga deal with that (and possibly let guest kernel propagate an error). Moreover, there's one bug with the following approach, if fsfreeze command failed, we've executed fsthaw subsequently. So issuing domfsfreeze in virsh gave the following result: virsh # domfsfreeze gentoo Froze 1 filesystem(s) virsh # domfsfreeze gentoo error: Unable to freeze filesystems error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance virsh # domfsfreeze gentoo Froze 1 filesystem(s) virsh # domfsfreeze gentoo error: Unable to freeze filesystems error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 11月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
New qemu added a new event that is emitted when a virtio serial channel is opened in the guest OS. This allows us to update the state of the port in the output-only XML element. This patch implements the monitor callbacks and necessary handlers to update the state in the definition.
-
- 07 10月, 2014 1 次提交
-
-
由 Laine Stump 提交于
NIC_RX_FILTER_CHANGED is sent by qemu any time a NIC driver in the guest modified the NIC's RX Filter (for example, if the MAC address of the NIC is changed by the guest). This patch doesn't do anything useful with that event; it just sets up all the plumbing to get news of the event into a worker thread with all proper locking/reference counting, and provide an easy place to add in desired functionality. See src/qemu/EVENTHANDLERS.txt for information/instructions on adding a libvirt-internal handler for a qemu event (using NIC_RX_FILTER_CHANGED as an example).
-
- 24 9月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Request erroring out from the backing chain traveller and drop qemu's internal backing chain integrity tester. The backing chain traveller reports errors by itself with possibly more detail than qemuDiskChainCheckBroken ever could. We also need to make sure that we reconnect to existing qemu instances even at the cost of losing the backing chain info (this really should be stored in the XML rather than reloaded from disk, but that needs some work).
-
由 Peter Krempa 提交于
Reuse virStorageSourceIsEmpty and rename "force" argument to "force_probe".
-
- 19 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Mimic the "Disk" processing for 'rawio', but for a scsi_host hostdev lun device.
-
- 16 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Add new 'niothreadpids' and 'iothreadpids' to mimic the 'ncpupids' and 'vcpupids' that already exist.
-
- 10 9月, 2014 3 次提交
-
-
由 Jiri Denemark 提交于
Total time of a migration and total downtime transfered from a source to a destination host do not count with the transfer time to the destination host and with the time elapsed before guest CPUs are resumed. Thus, source libvirtd remembers when migration started and when guest CPUs were paused. Both timestamps are transferred to destination libvirtd which uses them to compute total migration time and total downtime. Obviously, this requires the time to be synchronized between the two hosts. The reported times are useless otherwise but they would be equally useless if we didn't do this recomputation so don't lose anything by doing it. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
virDomainGetJobStats gains new VIR_DOMAIN_JOB_STATS_COMPLETED flag that can be used to fetch statistics of a completed job rather than a currently running job. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Job statistics data were tracked in several structures and variables. Let's make a new qemuDomainJobInfo structure which can be used as a single source of statistics data as a preparation for storing data about completed a job. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 08 9月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Be consistent with naming of private defines. Also line up code correctly in few places where the macro is used.
-
- 14 8月, 2014 1 次提交
-
-
由 Sam Bobroff 提交于
During a QEMU live migration several warning messages about job handling could be written to syslog on the destination host: "entering monitor without asking for a nested job is dangerous" The messages are written because the job handling during migration uses hard coded asyncJob values in several places that are incorrect. This patch passes the required asyncJob value around and prevents the warnings as well as any issues that the warnings may be referring to. https://bugzilla.redhat.com/show_bug.cgi?id=1130089Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 08 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Add a wrapper that determines the correct uid and gid for a certain storage file and domain.
-
- 25 6月, 2014 1 次提交
-
-
由 Julio Faracco 提交于
As we are doing with the enum structures, a cleanup in "src/qemu/" directory was done now. All the enums that were defined in the header files were converted to typedefs in this directory. This patch includes all the adjustments to remove conflicts when you do this kind of change. "Enum-to-typedef"'s conversions were made in "src/qemu/qemu_{capabilities, domain, migration, hotplug}.h". Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
- 21 6月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Just code movement and rename.
-
- 03 6月, 2014 1 次提交
-
-
由 Julio Faracco 提交于
In "src/conf/domain_conf.h" there are many enum declarations. The cleanup in this header filer was started, but it wasn't enough and there are many other files that has enum variables declared. So, the commit was starting to be big. This commit finish the cleanup in this header file and in other files that has enum variables, parameters, or functions declared. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 6月, 2014 1 次提交
-
-
由 Jiri Denemark 提交于
Currently, we don not acquire any job when removing a device after DEVICE_DELETED event was received from QEMU. This means that if there is another API running at the time DEVICE_DELETED is delivered and the API acquired a job, we may happily change the definition of the domain the API is working with whenever it unlocks the domain object (e.g., to talk with its monitor). That said, we have to acquire a job before finishing device removal to make things safe. However, doing so in the main event loop would cause a deadlock so we need to move most of the event handler into a separate thread. Another good reason for both acquiring a job and handling the event in a separate thread is that we currently remove a device backend immediately after removing its frontend while we should only remove the backend once we already received DEVICE_DELETED event. That is, we will have to talk to QEMU monitor from the event handler. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 14 5月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
It's only used within qemu_domain.c. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Roman Bogorodskiy 提交于
Introduce new files (domain_addr.[ch]) to provide an API for domain device handling that could be shared across the drivers. A list of data types were extracted and moved there: qemuDomainPCIAddressBus -> virDomainPCIAddressBus qemuDomainPCIAddressBusPtr -> virDomainPCIAddressBusPtr _qemuDomainPCIAddressSet -> virDomainPCIAddressSet qemuDomainPCIAddressSetPtr -> virDomainPCIAddressSetPtr qemuDomainPCIConnectFlags -> virDomainPCIConnectFlags Also, move the related definitions and macros.
-
- 07 5月, 2014 1 次提交
-
-
由 Tomoki Sekiyama 提交于
Adds 'quiesced' status into qemuDomainObjPrivate that tracks whether FSFreeze is requested in the domain. It modifies error code from qemuDomainSnapshotFSFreeze and qemuDomainSnapshotFSThaw, so that a caller can know whether the command is actually sent to the guest agent. If the error is caused before sending a freeze command, a counterpart thaw command shouldn't be sent either, not to confuse fsfreeze status tracking. Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 4月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
The function isn't used in any other source file. Move it so that it doesn't need a declaration.
-
- 18 3月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Eliminate all the code re-use which checks for priv->agentError or priv->agent. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 2月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, there's just one place where we care if hook script is changing the domain XML: migration hook for incoming migration. In all other places where a hook script is executed, we don't read the XML back from the script. Anyway, the hook script can alter domain XML and hence we should taint it if the script did. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 2月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
The code took into account only the global permissions. The domains now support per-vm DAC labels and per-image DAC labels. Use the most specific label available.
-
- 07 2月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Couple of codepaths shared the same code which can be moved out to a function and on one of such places, qemuMigrationConfirmPhase(), the domain was resumed even if it wasn't running before the migration started. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1057407Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 10 12月, 2013 1 次提交
-
-
由 Cédric Bosdonnat 提交于
The virDomainEvent class is kept as it indicates what meta informations are valid for the children classes. This may be useful in the future.
-
- 18 10月, 2013 1 次提交
-
-
由 Wang Yufei 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1019053 When we migrate vms concurrently, there's a chance that libvirtd on destination assigns the same port for different migrations, which will lead to migration failure during prepare phase on destination. So we use virPortAllocator here to solve the problem. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 11 10月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=994364 Whenever we check for ABI stability, we have new xml (e.g. provided by user, or obtained from snapshot, whatever) which we compare to old xml and see if ABI won't break. However, if the new xml was produced via virDomainGetXMLDesc(..., VIR_DOMAIN_XML_MIGRATABLE) it lacks some devices, e.g. 'pci-root' controller. Hence, the ABI stability check fails even though it is stable. Moreover, we can't simply fix virDomainDefCheckABIStability because removing the correct devices is task for the driver. For instance, qemu driver wants to remove the usb controller too, while LXC driver doesn't. That's why we need special qemu wrapper over virDomainDefCheckABIStability which removes the correct devices from domain XML, produces MIGRATABLE xml and calls the check ABI stability function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 8月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
This function is to guess the correct limit for maximal memory usage by qemu for given domain. This can never be guessed correctly, not to mention all the pains and sleepless nights this code has caused. Once somebody discovers algorithm to solve the Halting Problem, we can compute the limit algorithmically. But till then, this code should never see the light of the release again.
-
- 01 8月, 2013 1 次提交
-
-
由 Guannan Ren 提交于
*src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to check if its chain is broken
-
- 20 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
In case libvirtd is asked to unplug a device but the device is actually unplugged later when libvirtd is not running, we need to detect that and remove such device when libvirtd starts again and reconnects to running domains.
-
- 18 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 08 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 03 7月, 2013 2 次提交
- 13 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Convert input XML to migratable before using it in qemuDomainSaveImageOpen. XML in the save image is migratable, i.e. doesn't contain implicit controllers. If these controllers were in a non-default order in the input XML, the ABI check would fail. Removing and re-adding these controllers fixes it. https://bugzilla.redhat.com/show_bug.cgi?id=834196
-