- 13 2月, 2014 4 次提交
-
-
由 Eric Blake 提交于
The counterpart to the server RPC additions; here, a single function can serve both old and new calls, while incoming events must be serviced by two different functions. Again, some wise choices in our XDR made it easier to share code managing similar events. While this only supports lifecycle events, it covers the harder part of how Register and RegisterAny interact; the remaining 15 events will be a mechanical change in a later patch. For Register, we now have a callbackID locally for more efficient cleanup if the RPC fails; we also prefer to use the newer RPC where we know it is supported (the older RPC must be used if we don't know if RegisterAny is supported). * src/remote/remote_driver.c (remoteEvents): Register new RPC event handler. (remoteDomainBuildEventLifecycle): Move guts... (remoteDomainBuildEventLifecycleHelper): ...here. (remoteDomainBuildEventCallbackLifecycle): New function. (remoteConnectDomainEventRegister) (remoteConnectDomainEventDeregister) (remoteConnectDomainEventRegisterAny) (remoteConnectDomainEventDeregisterAny): Use new RPC when supported.
-
由 Eric Blake 提交于
We want to convert over to server-side events, even for older APIs. To do that, the client side of the remote driver wants to distinguish between legacy virConnectDomainEventRegister and normal virConnectDomainEventRegisterAny, while knowing the client callbackID and the server's serverID for both types of registration. The client also needs to probe whether the server supports server-side filtering. However, for ease of review, we don't actually use the new RPCs until a later patch. * src/conf/object_event_private.h (virObjectEventStateCallbackID): Add parameter. * src/conf/object_event.c (virObjectEventCallbackListAddID) (virObjectEventStateRegisterID): Separate legacy from callbackID. (virObjectEventStateCallbackID): Pass through parameter. (virObjectEventCallbackLookup): Let legacy and global domain lifecycle events share a common remoteID. * src/conf/network_event.c (virNetworkEventStateRegisterID): Update caller. * src/conf/domain_event.c (virDomainEventStateRegister) (virDomainEventStateRegisterID, virDomainEventStateDeregister): Likewise. (virDomainEventStateRegisterClient) (virDomainEventStateCallbackID): Implement new functions. * src/conf/domain_event.h (virDomainEventStateRegisterClient) (virDomainEventStateCallbackID): New prototypes. * src/remote/remote_driver.c (private_data): Add field. (doRemoteOpen): Probe server feature. (remoteConnectDomainEventRegister) (remoteConnectDomainEventRegisterAny): Use new function. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
This patch adds some new RPC call numbers, but for ease of review, they sit idle until a later patch adds the client counterpart to drive the new RPCs. Also for ease of review, I limited this patch to just the lifecycle event; although converting the remaining 15 domain events will be quite mechanical. On the server side, we have to have a function per RPC call, largely with duplicated bodies (the key difference being that we store in our callback opaque pointer whether events should be fired with old or new style); meanwhile, a single function can drive multiple RPC messages. With a strategic choice of XDR struct layout, we can make the event generation code for both styles fairly compact. I debated about adding a tri-state witness variable per connection (values 'unknown', 'legacy', 'modern'). It would start as 'unknown', move to 'legacy' if any RPC call is made to a legacy event call, and move to 'modern' if the feature probe is made; then the event code could issue an error if the witness state is incorrect (a legacy RPC call while in 'modern', a modern RPC call while in 'unknown' or 'legacy', and a feature probe while in 'legacy' or 'modern'). But while it might prevent odd behavior caused by protocol fuzzing, I don't see that it would prevent any security holes, so I considered it bloat. Note that sticking @acl markers on the new RPCs generates unused functions in access/viraccessapicheck.c, because there is no new API call that needs to use the new checks; however, having a consistent .x file is worth the dead code. * src/libvirt_internal.h (VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK): New feature. * src/remote/remote_protocol.x (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY) (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY) (REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE): New RPCs. * daemon/remote.c (daemonClientCallback): Add field. (remoteDispatchConnectDomainEventCallbackRegisterAny) (remoteDispatchConnectDomainEventCallbackDeregisterAny): New functions. (remoteDispatchConnectDomainEventRegisterAny) (remoteDispatchConnectDomainEventDeregisterAny): Mark legacy use. (remoteRelayDomainEventLifecycle): Change message based on legacy or new use. (remoteDispatchConnectSupportsFeature): Advertise new feature. * src/remote_protocol-structs: Regenerate. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
This patch continues the earlier conversion made for network events, with a goal of introducing server-side event filtering in a later patch. Actual behavior is unchanged without further RPC changes. * daemon/libvirtd.h (daemonClientPrivate): Alter the tracking of domain events. * daemon/remote.c (remoteClientInitHook, remoteClientFreeFunc) (remoteRelayDomainEvent*) (remoteDispatchConnectDomainEventRegister) (remoteDispatchConnectDomainEventRegisterAny): Track domain callbacks dynamically.
-
- 12 2月, 2014 10 次提交
-
-
由 Michael Chapman 提交于
virGetStorageVol can return NULL on out-of-memory. If it does, cleanly abort the volume clone operation. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Ján Tomko 提交于
This reverts commit af1fb38f. With it, creating new logical volumes fails: https://www.redhat.com/archives/libvir-list/2014-February/msg00658.html In the storage driver, we expect CreateVol to fill out the volume key, but the LVM backend fills the key with the uuid reported by lvs after the logical volume is created.
-
由 Cédric Bosdonnat 提交于
Two unused global variables, and DBUS_TYPE_INVALID used as a const char*. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
The security driver expects /etc/apparmor.d/libvirt/TEMPLATE but we installed it to /etc/apparmor.d/libvirtd/TEMPLATE. Move the template to the expected place since that code was here long before.
-
由 Oleg Strikov 提交于
Openstack Nova calls virConnectBaselineCPU() during initialization of the instance to get a full list of CPU features. This patch adds a stub to aarch64-specific code to handle this request (no actual work is done). That's enough to have this stub with limited functionality because qemu/kvm backend supports only 'host-passthrough' cpu mode on aarch64. Signed-off-by: NOleg Strikov <oleg.strikov@canonical.com>
-
由 Jim Fehlig 提交于
Update the function's comment, which was missed when removing use of the driver lock everywhere.
-
由 Jim Fehlig 提交于
A small fix for the possiblitiy of jumping to an error path before registering for domain events, preventing receiving important ones like shutdown and death.
-
由 Jim Fehlig 提交于
libxlDomEventsRegister better reflects its purpose: register for domain events from libxl.
-
- 11 2月, 2014 14 次提交
-
-
由 Ján Tomko 提交于
This shadows the index function on some systems (RHEL-6.4, FreeBSD 9): ../../src/conf/capabilities.c: In function 'virCapabilitiesGetCpusForNode': ../../src/conf/capabilities.c:1005: warning: declaration of'index' shadows a global declaration [-Wshadow] /usr/include/strings.h:57: warning: shadowed declaration is here [-Wshadow]
-
由 Pradipta Kr. Banerjee 提交于
This test creates a Fake NUMA topology with non-sequential cell ids to check if libvirt properly handles the same Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com>
-
由 Pradipta Kr. Banerjee 提交于
On some platforms like IBM PowerNV the NUMA node numbers can be non-sequential. For eg. numactl --hardware o/p from such a machine looks as given below node distances: node 0 1 16 17 0: 10 40 40 40 1: 40 10 40 40 16: 40 40 10 40 17: 40 40 40 10 The NUMA nodes are 0,1,16,17 Libvirt uses sequential index as NUMA node numbers and this can result in crash or incorrect results. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com>
-
由 Peter Krempa 提交于
Extract the metadata setting code into a separate function for future use.
-
由 Martin Kletzander 提交于
Add a new backend for any character device. This backend uses channel in spice connection. This channel is similar to spicevmc, but all-purpose in contrast to spicevmc. Apart from spicevmc, spiceport-backed chardev will not be formatted into the command-line if there is no spice to use (with test for that as well). For this I moved the def->graphics counting to the start of the function so its results can be used in rest of the code even in the future. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This patch is here just to ease the code review and make related changes look more sensible. Apart from removing the condition this is merely a whitespace (indentation) change. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Limiting ourselves to qemu without QEMU_CAPS_DEVICE capability, we used '-serial none' only if there was no serial device defined in the domain XML. This means that if we want to have a possibility of the device being defined in XML, but not used in the command-line (e.g. when it's pointless), we'll fail to attach '-serial none' to the command-line (when skipping the device's command-line building and the device being the only one). Since there is no such device, this patch doesn't actually do anything, but enables easier future additions in this manner. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Add a new character device backend called 'spiceport' that uses spice's channel for communications and apart from spicevmc can be used as a backend for any character device from libvirt's point of view. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Wido den Hollander 提交于
This new RBD format supports snapshotting and cloning. By having libvirt create images in format 2 end-users of the created images can benefit from the new RBD format. Older versions of libvirt can work with this new RBD format as long as librbd supports format 2. RBD format is supported by librbd since version 0.56 (Ceph Bobtail). Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
由 Joel SIMOES 提交于
When restarting sheepdog pool, all volumes are missing. This patch add automatically all volume from the added pool. Adding last Daniel P. Berrange's syntaxes correction. Adding vol on separeted function 'inspired' from parallels_storage : parallelsAddDiskVolume
-
由 Laine Stump 提交于
In order to make a client-only build successful on RHEL4 (yes, you read that correctly!), commit 3ed2e545 modified src/util/virnetdev.c so that the functional version of virNetDevGetVLanID() was only compiled if GET_VLAN_VID_CMD was defined. However, it is *never* defined, but is only an enum value, so the proper version was no longer compiled even on platforms that support it. This resulted in the vlan tag not being properly set for guest traffic on VEPA mode guest macvtap interfaces that were bound to a vlan interface (that's the only place that libvirt currently uses virNetDevGetVLanID) Since there is no way to compile conditionally based on the presence of an enum value, this patch modifies configure.ac to check for said enum value with AC_CHECK_DECLS(), which #defines HAVE_DECL_GET_VLAN_VID_CMD to 1 if it's successful compiling a test program that uses GET_VLAN_VID_CMD (and still #defines it, but to 0, if it's not successful). We can then make the compilation of virNetDevGetVLanID() conditional on the value of HAVE_DECL_GET_VLAN_VID_CMD.
-
由 Chen Hanxiao 提交于
Some grammar fixes. s/namespace,set/namespace, set s/container being allowed/container are allowed s/the <code>uid/The <code>uid Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
由 Yuri Myasoedov 提交于
Reset line numbering on each input file in check-aclrules.pl. Otherwise it reports wrong line numbers in its error messages. Signed-off-by: NYuri Myasoedov <ymyasoedov@yandex.ru> Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
In the network status XML we may have the <floor/> element with the 'sum' attribute. The attribute represents sum of all 'floor'-s of computed over each interface connected to the network (this is needed to guarantee certain bandwidth for certain domain). The sum is therefore a number. However, if the number was mangled (e.g. by an user's interference to network status file), we've just ignored it without refusing to parse such file. This was all due to 'goto error' missing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 2月, 2014 5 次提交
-
-
由 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.
-
由 Michal Privoznik 提交于
The lack of debug printings might be frustrating in the future. Moreover, this function doesn't follow the usual pattern we have in the rest of the code: int ret = -1; /* do some work */ ret = 0; cleanup: /* some cleanup work */ return ret; Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Add a new <timer> for the HyperV reference time counter enlightenment and the iTSC reference page for Windows guests. This feature provides a paravirtual approach to track timer events for the guest (similar to kvmclock) with the option to use real hardware clock on systems with a iTSC with compensation across various hosts.
-
由 Peter Krempa 提交于
According to the documentation various timer options are only supported by certain timer types. Add a post parse check to verify that the user didn't specify invalid options. Also fix the qemu command line parsing function to set correct default values for the kvmclock timer so that it passes the new check.
-
由 Peter Krempa 提交于
According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the "track" attribute. - tsc: only one to support "frequency" and "mode" attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported Additionally the attributes of the <catchup> element for tickpolicy='catchup' are optional according to the parsing code. Express this in the XML and fix a spurious space added while formatting the <catchup> element and add tests for it.
-
- 08 2月, 2014 1 次提交
-
-
由 Felix Geyer 提交于
Tested on Debian unstable. The profile updates are partly taken from the Ubuntu trusty libvirt package. Signed-off-by: NGuido Günther <agx@sigxcpu.org>
-
- 07 2月, 2014 6 次提交
-
-
由 John Ferlan 提交于
Coverity complains about "USE_AFTER_FREE" due to how virPCIDeviceSetStubDriver "could" return either -1, 0, or 1 from the VIR_STRDUP() and then possibly makes a call to virPCIDeviceDetach(). The only way this could happen is if NULL were passed as the "driver" name and virStrdup() returned 0. Since the calling functions check < 0 on the initial function call, the 0 possibility causes Coverity to complain. To fix this - enforce that the second parameter is not NULL using ATTRIBUTE_NONNULL(2) for the function prototype, then in virPCIDeviceDetach add an sa_assert(dev->stubDriver). This will result in Coverity not complaining any more.
-
由 Christophe Fergeau 提交于
If it's not present in this list, we won't be able to get only glusterfs pools when using virConnectListAllStoragePools.
-
由 Christophe Fergeau 提交于
LIBGLUSTER_LIBS is emptied before gluster is enabled/disabled, but nothing else sets/uses this variable, so it can be removed.
-
由 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>
-
由 Jim Fehlig 提交于
libxlDomainRestoreFlags acquires the driver lock while reading the domain config from the save file and adding it to libxlDriverPrivatePtr->domains. But virDomainObjList provides self-locking APIs, so remove the needless driver locking. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
If available, let libxl handle reaping any children it creates by specifying libxl_sigchld_owner_libxl_always_selective_reap. This feature was added to improve subprocess handling in libxl when used in an application that does not install a SIGCHLD handler like libvirt http://lists.xen.org/archives/html/xen-devel/2014-01/msg01555.html Prior to this patch, it is possible to hit asserts in libxl when reaping subprocesses, particularly during simultaneous operations on multiple domains. With this patch, and the corresponding changes to libxl, I no longer see the asserts. Note that the libxl changes will be included in Xen 4.4.0. Previous Xen versions will be susceptible to hitting the asserts even with this patch applied to the libvirt libxl driver. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-