- 15 8月, 2011 7 次提交
-
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
The core of these two functions is very similar and most of it is even exactly the same. Factor out the core functionality into a separate function to remove code duplication and make further changes easier.
-
由 Jiri Denemark 提交于
This patch allows owner's UID to be changed as well.
-
由 Jiri Denemark 提交于
So that callers can change the default value.
-
由 Daniel P. Berrange 提交于
* src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virNetSocketDupFD() * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add virNetClientDupFD() and virNetClientGetFD()
-
The function stop() was always returning 0 (OK) from killproc() even in case of error.
-
由 Osier Yang 提交于
This is introduced by commit df0b57a9, which forgot to add signal handler for SIGHUP. A simple reproduce method: 1) Create a domain XML under /etc/libvirt/qemu 2) % kill -SIGHUP $(pidof libvirtd) 3) % virsh list --all (the new created domain XML is not listed)
-
- 13 8月, 2011 10 次提交
-
-
由 Eric Blake 提交于
* .dir-locals.el: Add nxml-mode preferences.
-
由 Philipp Hahn 提交于
In preparation for storing the domain description with the snapshot, swap the order of declaration. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Eric Blake 提交于
With gcc 4.5.1: util/virpidfile.c: In function 'virPidFileAcquirePath': util/virpidfile.c:308:66: error: nested extern declaration of '_gl_verify_function2' [-Wnested-externs] Then in tests/commandtest.c, the new virPidFile APIs need to be used. * src/util/virpidfile.c (virPidFileAcquirePath): Move verify to top level. * tests/commandtest.c: Use new pid APIs.
-
由 Daniel P. Berrange 提交于
Remove the current libvirtd pidfile handling code, in favour of calling out to the new APIs. This ensures libvirtd's pidfile handling is crashsafe This also means that the non-root libvirtd instances (for handling qemu:///session URIs) can now safely use pidfiles without racing * daemon/libvirtd.c: Switch to use virPidFileAcquire and virPidFileRelease
-
由 Daniel P. Berrange 提交于
In daemons using pidfiles to protect against concurrent execution there is a possibility that a crash may leave a stale pidfile on disk, which then prevents later restart of the daemon. To avoid this problem, introduce a pair of APIs which make use of virFileLock to ensure crash-safe & race condition-safe pidfile acquisition & releae * src/libvirt_private.syms, src/util/virpidfile.c, src/util/virpidfile.h: Add virPidFileAcquire and virPidFileRelease
-
由 Daniel P. Berrange 提交于
In some cases the caller of virPidFileRead might like extra checks to determine whether the pid just read is really the one they are expecting. This adds virPidFileReadIfAlive which will check whether the pid is still alive with kill(0, -1), and (on linux only) will look at /proc/$PID/path * libvirt_private.syms, util/virpidfile.c, util/virpidfile.h: Add virPidFileReadIfValid and virPidFileReadPathIfValid * network/bridge_driver.c: Use new APIs to check PID validity
-
由 Daniel P. Berrange 提交于
The functions for manipulating pidfiles are in util/util.{c,h}. We will shortly be adding some further pidfile related functions. To avoid further growing util.c, this moves the pidfile related functions into a dedicated virpidfile.{c,h}. The functions are also all renamed to have 'virPidFile' as their name prefix * util/util.h, util/util.c: Remove all pidfile code * util/virpidfile.c, util/virpidfile.h: Add new APIs for pidfile handling. * lxc/lxc_controller.c, lxc/lxc_driver.c, network/bridge_driver.c, qemu/qemu_process.c: Add virpidfile.h include and adapt for API renames
-
由 Daniel P. Berrange 提交于
Add some simple wrappers around the fcntl() discretionary file locking capability. * src/util/util.c, src/util/util.h, src/libvirt_private.syms: Add virFileLock and virFileUnlock APIs
-
由 Eric Blake 提交于
Two copy-and-paste bugs in a row. :( * tools/virsh.c (cmdUndefine): Also avoid dead store.
-
由 Eric Blake 提交于
Bug introduced in commit 9a0ec363. * tools/virsh.c (cmdUndefine): Add missing line.
-
- 12 8月, 2011 10 次提交
-
-
由 Eric Blake 提交于
We forgot to add virDomainUndefineFlags for a couple of hypervisors. This wires up trivial versions (since neither hypervisor supports managed save yet, they do not need to support any flags). * src/vbox/vbox_tmpl.c (vboxDomainCreateXML): Update caller. (vboxDomainUndefine): Move guts... (vboxDomainUndefineFlags): ...to new function. * src/xenapi/xenapi_driver.c (xenapiDomainUndefine) (xenapiDomainUndefineFlags): Likewise.
-
由 Eric Blake 提交于
The public API documents that undefine may be used to transition a running persistent domain into a transient one. Many drivers still do not support this usage, but virsh shouldn't be getting in the way of those that do support it. This also drops a redundant conditional; vshCommandOptString guaranteed that name was non-NULL. * tools/virsh.c (cmdUndefine): Allow undefine on active domains; the drivers may still reject it, but it is a valid API usage. * tests/undefine (error): Fix the test to match.
-
由 Philipp Hahn 提交于
Currently only tabs and blanks are used for tokenizing the description, which breaks when a term is at the end of a line or has () appended to it. 1. Use also other white space characters such as new-lines and carriage return for splitting. 2. Remove some common non-word characters from the token before lookup. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Daniel P. Berrange 提交于
* remote.html.in: Remove obsolete notes about internals of the RPC protocol * internals/rpc.html.in: Extensive docs on RPC protocol/API * sitemap.html.in: Add new page
-
由 Philipp Hahn 提交于
When the description of an entry is too long and needs multiple lines, all other table cells of the same row are currently vertically aligned on center. Without row borders or different background colors for alternating rows this is hard to read. Change the style-sheet to align the table cells of a row on top. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Peter Krempa 提交于
Fix of output of detailed volume list. BZ #727088
-
由 Peter Krempa 提交于
Fix internals of libvirt for new storage volume type. Libvirt reported an invalid type of the volume. BZ #727088
-
由 Eric Blake 提交于
Down the road, I want to add virDomainSnapshotGetParent, and use the new API rather than xml scraping; but this virsh command can be implemented even without the new API. * tools/virsh.c (cmdSnapshotParent): New command. * tools/virsh.pod (snapshot-parent): Document it.
-
由 Eric Blake 提交于
Our logic throws off analyzer tools: ptr var = NULL; if (flags == 0) flags = live ? _LIVE : _CONFIG; if (flags & _LIVE) do stuff if (flags & _CONFIG) var = non-null; if (flags & _LIVE) do more stuff else if (flags & _CONFIG) use var the tools keep thinking that var can still be NULL in the last if clause, adding the hint shuts them up. * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Add a static analysis hint.
-
由 Laine Stump 提交于
While the first encountered dns host record is being parsed, it's possible for virNetworkDef::hosts to point to memory that has been allocated, but virNetworkDef::nhosts to still be 0. If there is a failure during that time, virNetworkDef::hosts will be leaked. Although this isn't currently the case for virNetworkDef::txtrecords, it could become that way through future re-factoring, and it hurts nothing to restructure the freeing of txtrecord data to match that of hosts data.
-
- 11 8月, 2011 7 次提交
-
-
由 Stefan Berger 提交于
When instantiating a filter, a VM may disappear and remove its tap interfaces. Tolerate this case and don't report an error.
-
由 Cole Robinson 提交于
The following XML: <serial type='udp'> <source mode='connect' service='9999'/> </serial> is accepted by domain_conf.c but maps to the qemu command line: -chardev udp,host=127.0.0.1,port=2222,localaddr=(null),localport=(null) qemu can cope with everything omitting except the connection port, which seems to also be the intent of domain_conf validation, so let's not generate bogus command lines for that case. The defaults are empty strings for addresses and 0 for the localport Additionally, tweak the qemu cli parsing to handle omitted host parameters for -serial udp
-
由 Laine Stump 提交于
Someone in an IRC channel or an email pointed out a few days ago that the examples of IPv6 addresses in the libvirt documentation were not in the officially reserved "documentation" range. This addresses their concern.
-
由 Eric Blake 提交于
Sometimes, full XML is too much; since most snapshot commands operate on a snapshot name, there should be an easy way to get at the current snapshot's name. For example: virsh snapshot-revert dom `virsh snapshot-current dom --name` * tools/virsh.c (cmdSnapshotCurrent): Add an option. * tools/virsh.pod (snapshot-current): Document it.
-
由 Eric Blake 提交于
Found this working on the next patch to use xpath to parse arbitrary names back out. * tools/virsh.c (cmdSnapshotCreateAs): Escape user input.
-
由 Eric Blake 提交于
Transient domains reject attempts to set autostart, and using virDomainCreate to restart a domain only works on persistent domains. Therefore, managed save makes no sense on transient domains, and should be rejected up front rather than creating an otherwise unrecoverable managed save file. Besides, transient domains imply that a lot more management is being done by the upper layer; this includes the assumption that the upper layer is okay managing the saved state file created by virDomainSave, and does not need to use managed save. * src/libvirt.c: Document that transient domains are incompatible with managed save. * src/qemu/qemu_driver.c (qemuDomainManagedSave): Enforce it. * src/libxl/libxl_driver.c (libxlDomainManagedSave): Likewise.
-
由 Laine Stump 提交于
This should have been done with the rest of the patch for virtual switch / network device abstraction. If documents the new elements (and new usage of existing elements) in the <network> XML to support libvirt networks that use existing host bridges and macvtap direct connections, as well as the new <portgroup> element.
-
- 10 8月, 2011 3 次提交
-
-
由 Juerg Haefliger 提交于
-
由 Eric Blake 提交于
I noticed some inconsistent use of 'else'. * src/qemu/qemu_driver.c (qemuCPUCompare) (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot) (qemuDomainSnapshotDiscard): Match coding conventions.
-
由 Philipp Hahn 提交于
If a snapshot with the name already exists, virDomainSnapshotAssignDef() just returns NULL, in which case the snapshot definition is leaked. Currently this leak is not a big problem, since qemuDomainSnapshotLoad() is only called once during initial startup of libvirtd. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 08 8月, 2011 3 次提交
-
-
由 Eric Blake 提交于
* .gnulib: Update to latest, for largefile fix.
-
由 Daniel P. Berrange 提交于
A previous commit gave the LXC driver the ability to mount block devices for the container filesystem. Through use of the loopback device functionality, we can build on this to support use of plain file images for LXC filesytems. By setting the LO_FLAGS_AUTOCLEAR flag we can ensure that the loop device automatically disappears when the container dies / shuts down * src/lxc/lxc_container.c: Raise error if we see a file based filesystem, since it should have been turned into a loopback device already * src/lxc/lxc_controller.c: Rewrite any filesystems of type=file, into type=block, by binding the file image to a free loop device
-
由 Daniel P. Berrange 提交于
* src/lxc/lxc_controller.c: s/PYT/PTY/
-