- 06 1月, 2014 1 次提交
-
-
由 Eric Blake 提交于
No need to use an int that only ever stores 0 and 1. * src/conf/object_event_private.h (_virObjectEventCallback): Change deleted to bool. * src/conf/object_event.c (virObjectEventDispatchMatchCallback): Switch return type to bool. (virObjectEventCallbackListMarkDeleteID): Update client. * src/conf/domain_event.c (virDomainEventCallbackListMarkDelete): Likewise.
-
- 04 1月, 2014 2 次提交
-
-
由 Eric Blake 提交于
Any file with access to object_event_private.h also has access to the internals of virObjectEvent, without needing an accessor function. Not to mention the accessor function was doing type checks that would always succeed. * src/conf/object_event_private.h (virObjectEventGetEventID): Drop. * src/conf/object_event.c (virObjectEventGetEventID): Drop. (virObjectEventDispatchMatchCallback): Simplify caller. * src/conf/domain_event.c (virDomainEventDispatchDefaultFunc): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
While working on events, I found a number of minor issues; I'm hoisting these to the front rather than doing it piecemeal in the patches where I first noticed bad or missing documentation. * src/conf/object_event.c: Fix grammar, document all parameters of public functions, wrap some long lines. * src/conf/object_event.h: Likewise. * src/conf/network_event.c: Likewise. * src/conf/domain_event.c: Likewise (except for the large number of event creation functions). * src/libvirt_private.cyms (conf/object_event.h): Split... (conf/network_event.h): ...to account for new file. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 31 12月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1046337 The <driver> name attribute of an interface is interpreted in two different ways depending on the <interface> type - if the interface is type='hostdev', then the driver name describes which backend to use for the hostdev device assignment (vfio or kvm), but if the interface is any emulated type *and* the model type is "virtio", then the driver name can be "vhost" or "qemu", telling which backend qemu should use to communicate with the emulated device. The problem comes when someone has defined a an interface like this (which is accepted by the parser as long as no <driver name='xxx'/> is specified): <interface type='hostdev'> ... <model type='virtio'/> ... </interface> As libvirt storing this definition in the domain's status, the driver name is automatically filled in with the backend that was automatically decided by libvirt, so it stores this in the status: <interface type='hostdev'> ... <driver name='vfio'/> ... <model type='virtio'/> ... </interface> This isn't noticed until the next time libvirtd is restarted - as it is reading the status of all domains, it encounters the above interface definition, logs an error: internal error: Unknown interface <driver name='vfio'> has been specified and fails to reload the domain status, so the domain is marked as inactive. The solution is to stop the parser from interpreting <driver> attributes as if the device was an emulated virtio device, when it is actually a hostdev. (Although the bug has existed since vfio support was added, it has just recently become more apparent because libvirt previously didn't automatically set the driver name for hostdev interfaces in the domain status to vfio/kvm as it does since commit f094aa, first appearing in v1.1.4.)
-
- 23 12月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1045002 If a domain has an <interface type='hostdev'> or an <interface type='network'> where the network itself is a pool of hostdev devices, then libvirt will internally keep that device on both the interface list *and* the hostdev list for the domain. One of the places this comes in handy is when a new device is being added and libvirt wants to find a unique "alias" name for it - it just scans through the hostdev array and makes sure it picks a name that doesn't match the alias of any device in that array. However, when libvirtd was restarted, if there was an <interface type='network'> with the network being a hostdev pool, the device would not be added to the reconstructed internal hostdev array, so its alias would not be found during a scan of the hostdev array, thus attempts to add a new hostdev (or <interface type='hostdev'> or <interface type='network'>) would result in a message like this: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'hostdev0' for device This patch simply fixes the existing code in the domain XML parser that fixes up the hostdev array in the case of <interface type='hostdev'> to do the same thing in the case of <interface type='network'> with a hostdev network. This bug has existed since the very first addition of hostdev networks to libvirt (0.10.0).
-
- 21 12月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Commit id '4313fead' added a call to virDomainPanicCheckABIStability() which did not check whether the panic device existed before making a call to virDomainDeviceInfoCheckABIStability() which ended up segfaulting: Thread 1 (Thread 0x7f5332837700 (LWP 10964)): (src=<optimized out>, dst=<optimized out>) at conf/domain_conf.c:13007 (dst=<optimized out>, src=<optimized out>) at conf/domain_conf.c:13712 (src=<optimized out>, dst=<optimized out>) at conf/domain_conf.c:14056 (domain=domain@entry=0x7f53000057c0, vm=vm@entry=0x7f53000036d0, defptr=defptr@entry=0x7f5332836978, snap=snap@entry=0x7f5332836970, update_current=update_current@entry=0x7f5332836962, flags=flags@entry=1) at conf/snapshot_conf.c:1230 (domain=0x7f53000057c0, xmlDesc=<optimized out>, flags=1) at qemu/qemu_driver.c:12719 (domain=domain@entry=0x7f53000057c0, xmlDesc=0x7f53000081d0 "<domainsnapshot>\n <name>snap2</name>\n <description>new-desc</description>\n <state>running</state>\n <parent>\n <name>snap1</name>\n </parent>\n <creationTime>1387487268</creationTime>\n <memory s"..., flags=1) at libvirt.c:19695 ... (gdb) up 3 (gdb) print *other->def->dom $2 = {virtType = 2, id = -1, .. ... rng = 0x0, panic = 0x0, namespaceData = 0x0,... ... (gdb) print *def->dom $3 = {virtType = 2, id = -1, ... ... rng = 0x0, panic = 0x0, namespaceData = 0x0,... ... (gdb) Also seen using following sequence: virsh save $dom $file virsh save-image-edit $file add (or remove) a <panic/> line <devices> ... <panic> <address type='isa' iobase='0x505'/> </panic> ... </devices>
-
- 19 12月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Recent addition of the gluster pool type omitted fixing the virsh and virConnectListAllStoragePool filters. A typecast of the converting function in virsh showed that also the sheepdog pool was omitted in the command parser. This patch adds gluster pool filtering support and fixes virsh to properly convert all supported storage pool types. The added typecast should avoid doing such mistakes in the future.
-
- 14 12月, 2013 5 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The event namespace concept is mostly redundant information. With the re-written dispatcher, the namespace is only used for equality comparisons between event IDs. This can be solved by just comparing virClassPtr instances instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of having the object event code have to know about each type of event and their dispatch functions, associate a dispatch function with the object instance. The dispatch code can thus be significantly simplified. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Inject a virNetworkEvent class between virObjectEvent and virNetworkEventLifecycle to mirror virDomainEvent. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
While the public API & wire protocol included the 'detail' arg for network lifecycle events, the internal event handling code did not process it. This meant that if a future libvirtd server starts sending non-0 'detail' args, the current libvirt client will not process them. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 12月, 2013 3 次提交
-
-
由 Nehal J Wani 提交于
While running objecteventtest, it was found that valgrind pointed out the following memory leak: ==13464== 5 bytes in 1 blocks are definitely lost in loss record 7 of 134 ==13464== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==13464== by 0x341F485E21: strdup (strdup.c:42) ==13464== by 0x4CAE28F: virStrdup (virstring.c:554) ==13464== by 0x4CF3CBE: virObjectEventCallbackListAddID (object_event.c:286) ==13464== by 0x4CF49CA: virObjectEventStateRegisterID (object_event.c:729) ==13464== by 0x4CF73FE: virDomainEventStateRegisterID (domain_event.c:1424) ==13464== by 0x4D7358F: testConnectDomainEventRegisterAny (test_driver.c:6032) ==13464== by 0x4D600C8: virConnectDomainEventRegisterAny (libvirt.c:19128) ==13464== by 0x402409: testDomainStartStopEvent (objecteventtest.c:232) ==13464== by 0x403451: virtTestRun (testutils.c:138) ==13464== by 0x402012: mymain (objecteventtest.c:395) ==13464== by 0x403AF2: virtTestMain (testutils.c:593) ==13464==
-
由 Hu Tao 提交于
panic device is a device that enables libvirt to receive notification of guest panic event. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Hu Tao 提交于
For example: <address type='isa' iobase='0x505' irq='0x1'/> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 12 12月, 2013 3 次提交
-
-
由 Gao feng 提交于
The throttle blkio cgroup will reuse this struct. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
virDomainBlkioDeviceWeightParseXML will be used to parse the xml element read_bps, write_bps, read_iops, write_iops. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 11 12月, 2013 3 次提交
-
-
由 Cédric Bosdonnat 提交于
Hitting this should be pretty rare, but at least developers will know that they are providing a weird event ID. Otherwise for namespace that are added in the normal way, gcc will raise a warning about unhandled case in the switch.
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
Define the public API for (de-)registering network events and the callbacks for receiving lifecycle events. The lifecycle event includes a 'detail' parameter to match the domain lifecycle event data, but this is currently unused. The network events related code goes into its own set of internal files src/conf/network_event.[ch]
-
- 10 12月, 2013 19 次提交
-
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
Each unique event ID will thus be composed by 1 byte for the namespace and 1 byte for a namespace-specific ID. The namespace for domain event needs to be 0 for compatibility reasons.
-
由 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.
-
由 Cédric Bosdonnat 提交于
RIP virDomainEvent union. All data are now stored in each virObjectEvent subclass.
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
This change may be confusing at first, but provides a much more consistent naming scheme for the virObjectEvent children construction functions.
-
由 Cédric Bosdonnat 提交于
This aims at providing some consistency with other domain events
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
Added a parent class virObjectEvent for future event types
-
由 Cédric Bosdonnat 提交于
Keep virDomainEventStateRegisterID as a convenience wrapper around this new function.
-