- 29 7月, 2011 6 次提交
-
-
由 Eric Blake 提交于
No need to use a for loop if we know there is exactly one client. Found by: for f in $(sed -n 's/.*Drv[^ ]* \([^;]*\);.*/\1/p' src/xen/xen_driver.h) do git grep "\(\.\|->\)$f\b" src/xen done | cat and looking through the resulting list to see which callback struct members are used exactly once. The next patch will ensure that we don't reintroduce uses of these callbacks. * src/xen/xen_driver.c (xenUnifiedClose): Call close unconditionally, to match xenUnifiedOpen. (xenUnifiedNodeGetInfo, xenUnifiedDomainCreateXML) (xenUnifiedDomainSave, xenUnifiedDomainRestore) (xenUnifiedDomainCoreDump, xenUnifiedDomainUpdateDeviceFlags): Make direct call to lone implementation. * src/xen/xend_internal.h (xenDaemonDomainCoreDump) (xenDaemonUpdateDeviceFlags, xenDaemonCreateXML): Add prototypes. * src/xen/xend_internal.c (xenDaemonDomainCoreDump) (xenDaemonUpdateDeviceFlags, xenDaemonCreateXML): Export.
-
由 Eric Blake 提交于
The callback struct is great when iterating through several possibilities, but when calling a known callback, it's just overhead. We can make the direct call in those cases. * src/xen/xen_driver.c (xenUnifiedOpen, xenUnifiedDomainSuspend) (xenUnifiedDomainResume, xenUnifiedDomainDestroyFlags): Make direct calls instead of going through callback.
-
由 Eric Blake 提交于
Using C99 initializers and xen-specific prefixes will make it so that future patches are less likely to add callback members to the xenUnifiedDriver struct, since the goal is to get rid of the callback struct in the first place. * src/xen/xen_driver.h (xenUnifiedDriver): Rename all struct members, to make it obvious which ones are still in use. * src/xen/xen_driver.c: Update all callers. * src/xen/xen_hypervisor.c (xenHypervisorDriver): Rewrite with C99 initializers. * src/xen/xend_internal.c (xenDaemonDriver): Likewise. * src/xen/xs_internal.c (xenStoreDriver): Likewise. * src/xen/xm_internal.c (xenXMDriver): Likewise. * src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
-
由 Laine Stump 提交于
This failure was introduced by commit dacee3d, which removed listenAddr from the unions in virDomainGraphicsDef in favor of putting it in the address attribute of virDomainGraphicsListenDef.
-
由 Laine Stump 提交于
The domain XML now understands the <listen> subelement of its <graphics> element (including when listen type='network'), and the network driver has an internal API that will turn a network name into an IP address, so the final logical step is to put the glue into the qemu driver so that when it is starting up a domain, if it finds <listen type='network' network='xyz'/> in the XML, it will call the network driver to get an IPv4 address associated with network xyz, and tell qemu to listen for vnc (or spice) on that address rather than the default address (localhost). The motivation for this is that a large installation may want the guests' VNC servers listening on physical interfaces rather than localhost, so that users can connect directly from the outside; this requires sending qemu the appropriate IP address to listen on. But this address will of course be different for each host, and if a guest might be migrated around from one host to another, it's important that the guest's config not have any information embedded in it that is specific to one particular host. <listen type='network.../> can solve this problem in the following manner: 1) on each host, define a libvirt network of the same name, associated with the interface on that host that should be used for listening (for example, a simple macvtap network: <forward mode='bridge' dev='eth0'/>, or host bridge network: <forward mode='bridge'/> <bridge name='br0'/> 2) in the <graphics> element of each guest's domain xml, tell vnc to listen on the network name used in step 1: <graphics type='vnc' port='5922'> <listen type='network'network='example-net'/> </graphics> (all the above also applies for graphics type='spice').
-
由 Laine Stump 提交于
Once it's plugged in, the <listen> element will be an optional replacement for the "listen" attribute that graphics elements already have. If the <listen> element is type='address', it will have an attribute called 'address' which will contain an IP address or dns name that the guest's display server should listen on. If, however, type='network', the <listen> element should have an attribute called 'network' that will be set to the name of a network configuration to get the IP address from. * docs/schemas/domain.rng: updated to allow the <listen> element * docs/formatdomain.html.in: document the <listen> element and its attributes. * src/conf/domain_conf.[hc]: 1) The domain parser, formatter, and data structure are modified to support 0 or more <listen> subelements to each <graphics> element. The old style "legacy" listen attribute is also still accepted, and will be stored internally just as if it were a separate <listen> element. On output (i.e. format), the address attribute of the first <listen> element of type 'address' will be duplicated in the legacy "listen" attribute of the <graphic> element. 2) The "listenAddr" attribute has been removed from the unions in virDomainGRaphicsDef for graphics types vnc, rdp, and spice. This attribute is now in the <listen> subelement (aka virDomainGraphicsListenDef) 3) Helper functions were written to provide simple access (both Get and Set) to the listen elements and their attributes. * src/libvirt_private.syms: export the listen helper functions * src/qemu/qemu_command.c, src/qemu/qemu_hotplug.c, src/qemu/qemu_migration.c, src/vbox/vbox_tmpl.c, src/vmx/vmx.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c Modify all these files to use the listen helper functions rather than directly referencing the (now missing) listenAddr attribute. There can be multiple <listen> elements to a single <graphics>, but the drivers all currently only support one, so all replacements of direct access with a helper function indicate index "0". * tests/* - only 3 of these are new files added explicitly to test the new <listen> element. All the others have been modified to reflect the fact that any legacy "listen" attributes passed in to the domain parse will be saved in a <listen> element (i.e. one of the virDomainGraphicsListenDefs), and during the domain format function, both the <listen> element as well as the legacy attributes will be output.
-
- 28 7月, 2011 16 次提交
-
-
由 Alex Jia 提交于
* tools/virsh.c: fix missing zero value judgement in cmdBlkiotune and correct vshError information. when weight is equal to 0, the cmdBlkiotune will not raise any error information when judge weight value first time, and execute else branch to judge weight value again, strncpy(temp->field, VIR_DOMAIN_BLKIO_WEIGHT, sizeof(temp->field)) will be not executed for ever. However, if and only if param->field is equal to VIR_DOMAIN_BLKIO_WEIGHT, underlying qemuDomainSetBlkioParameters function will check whether weight value is in range [100, 1000]. * how to reproduce? % virsh blkiotune ${guestname} --weight 0 Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
On RHEL 5, with gcc 4.1.2: rpc/virnetsaslcontext.c: In function 'virNetSASLSessionUpdateBufSize': rpc/virnetsaslcontext.c:396: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] * src/rpc/virnetsaslcontext.c (virNetSASLSessionUpdateBufSize): Use a union to work around gcc warning.
-
由 Eric Blake 提交于
qemuMigrationUpdateJobStatus (called in a loop by migration and save tasks) uses qemuDomainObjEnterMonitorWithDriver; however, that function ended up starting a nested job without releasing the driver. Since no one else is making nested calls, we can inline the internal functions to properly track driver_locked. * src/qemu/qemu_domain.h (qemuDomainObjBeginNestedJob) (qemuDomainObjBeginNestedJobWithDriver) (qemuDomainObjEndNestedJob): Drop unused prototypes. * src/qemu/qemu_domain.c (qemuDomainObjEnterMonitorInternal): Reflect driver lock to nested job. (qemuDomainObjBeginNestedJob) (qemuDomainObjBeginNestedJobWithDriver) (qemuDomainObjEndNestedJob): Drop unused functions.
-
由 Michal Privoznik 提交于
As written in virStorageFileGetMetadataFromFD decription, caller must free metadata after use. Qemu driver miss this and therefore leak metadata which can grow to huge mem leak if somebody query for blockInfo a lot.
-
由 Matthias Bolte 提交于
-
由 Michal Privoznik 提交于
Because we do support flags for virDomainSetBlkioParameters and virDomainGetBlkioParameters, update appropriate description as well.
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Alex Jia 提交于
* tools/virsh.c: avoid memory leak in cmdVolPath. * src/libvirt.c: Add doc for virStorageVolGetPath to tell one must free() the returned path after use. * how to reproduce? % dd if=/dev/zero of=/var/lib/libvirt/images/foo.img count=1 bs=10M % virsh pool-refresh default % valgrind -v --leak-check=full virsh vol-path --vol \ /var/lib/libvirt/images/foo.img * actual results: Detected in valgrind run: ==16436== 32 bytes in 1 blocks are definitely lost in loss record 7 of 22 ==16436== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==16436== by 0x386A314B3D: xdr_string (in /lib64/libc-2.12.so) ==16436== by 0x3DF8CD770D: xdr_remote_nonnull_string (remote_protocol.c:3 ==16436== by 0x3DF8CD7EC8: xdr_remote_storage_vol_get_path_ret % virsh pool-refresh default % valgrind -v --leak-check=full virsh vol-path --vol \ /var/lib/libvirt/images/foo.img Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Osier Yang 提交于
The error in getCompressionType will never be reported, change the errors codes into warning (VIR_WARN("%s", _(foo)); doesn't break syntax-check rule), and also improve the docs in qemu.conf to tell user the truth.
-
由 Eric Blake 提交于
* src/qemu/THREADS.txt: Fix problems with typos, grammar, and outdated examples.
-
由 Eric Blake 提交于
* tools/virsh.c (doMigrate): Add --change-protection flag. * tools/virsh.pod (migrate): Document it.
-
由 Matthias Bolte 提交于
Add a new helper remoteFreeTypedParameters and teach the generator to add it to the cleanup section. https://bugzilla.redhat.com/show_bug.cgi?id=725322
-
由 Lai Jiangshan 提交于
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 27 7月, 2011 14 次提交
-
-
由 Jiri Denemark 提交于
This doesn't abort migration job in any phase, yet.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Call qemu monitor command directly within a special job that is only allowed during outgoing migration.
-
由 Jiri Denemark 提交于
Call qemu monitor command directly within a special job that is only allowed during outgoing migration.
-
由 Jiri Denemark 提交于
Like other query commands, this can now be called directly during migration.
-
由 Jiri Denemark 提交于
Like other query commands, this can now be called directly during migration.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Make MIGRATION_OUT use the new helper methods. This also introduces new protection to migration v3 process: the migration job is held from Begin to Confirm to avoid changes to a domain during migration (esp. between Begin and Perform phases). This change is automatically applied to p2p and tunneled migrations. For normal migration, this requires support from a client. In other words, if an old (pre 0.9.4) client starts normal migration of a domain, the domain will not be protected against changes between Begin and Perform steps.
-
由 Jiri Denemark 提交于
Make MIGRATION_IN use the new helper methods.
-
由 Jiri Denemark 提交于
This patch introduces several helper methods to deal with jobs and phases during migration in a simpler manner.
-
由 Eric Blake 提交于
Without this, a configure built by autoconf 2.59 was broken when trying to detect which compiler warning flags were supported. * .gnulib: Update to latest, for warnings.m4 fix. * bootstrap.conf: Add fclose explicitly, to match recent gnulib implicit dependency changes. * src/qemu/qemu_conf.c (includes): Drop unused include. * src/uml/uml_conf.c (include): Likewise. Reported by Daniel P. Berrange.
-
由 Michal Privoznik 提交于
Every DomainNetDef has a bandwidth, as does every portgroup. Whenever a DomainNetDef of type NETWORK is about to be used, a call is made to networkAllocateActualDevice(). This function chooses the "best" bandwidth object and places it in the DomainActualNetDef. From that point on, whenever some code needs to use the bandwidth data for the interface, it's retrieved with virDomainNetGetActualBandwidth(), which will always return the "best" info as determined in the previous step.
-
由 Osier Yang 提交于
Commit b31abc6f introduce commands blockpull and blockjob, but forgot to add the docs meanwhile.
-
由 Cole Robinson 提交于
We only want to raise the special value -2. -1 should return None which tells the bindings to throw an exception.
-
- 26 7月, 2011 4 次提交
-
-
由 Alex Jia 提交于
* tools/virsh.c: format strings display for virsh nodecpustats --percent. * how to reproduce? % virsh nodecpustats --percent usage: 2.0% user : 1.0% system: 1.0% idle : 98.0% iowait: 0.0% * after format strings % virsh nodecpustats --percent usage: 2.0% user: 1.0% system: 1.0% idle: 98.0% iowait: 0.0% Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Stefan Berger 提交于
Fix the build if HAVE_AVAHI is not defined.
-
由 Dave Allan 提交于
The description of the list command seemed to suggest that it could take a set of domains as an argument, which is not correct in the current HEAD. If virsh list is intended to take a list of domains, then this patch should be NAK'd and a bug opened against virsh list. Reported by hachi on #virt v2: Change language to include transient domains Osier pointed out that transient domains are not defined, so what I had originally proposed wasn't quite correct.
-
由 Daniel P. Berrange 提交于
When an incoming RPC message is ready for processing, virNetServerClientDispatchRead() will invoke the 'dispatchFunc' callback. This is set to virNetServerDispatchNewMessage This function puts the message + client in a queue for processing by the thread pool. The thread pool worker function is virNetServerHandleJob The first thing this does is acquire an extra reference on the 'client'. Unfortunately, between the time the message+client are put on the thread pool queue, and the time the worker runs, the client object may have had its last reference removed. We clearly need to add the reference to the client object before putting the client on the processing queue * src/rpc/virnetserverclient.c: Add a reference to the client when invoking the dispatch function * src/rpc/virnetserver.c: Don't acquire a reference to the client when in the worker thread
-