- 21 2月, 2013 10 次提交
-
-
由 Jim Fehlig 提交于
The libxl driver was setting the backend field of libxl_device_disk structure to LIBXL_DISK_BACKEND_TAP when the driver element of disk configuration was not specified. This needlessly forces the use of blktap driver, which may not be loaded in dom0 https://bugzilla.redhat.com/show_bug.cgi?id=912488 Ian Campbell suggested that LIBXL_DISK_BACKEND_UNKNOWN is a better default in this case https://www.redhat.com/archives/libvir-list/2013-February/msg01126.html
-
由 John Ferlan 提交于
-
由 Michal Privoznik 提交于
Currently, if lzop decompression binary produces a warning, it doesn't exit with zero status but 2 instead. Terrifying, but true. However, warnings may be ignored using '--ignore-warn' command line argument. Moreover, in which case, the exit status will be zero.
-
由 Sergey Fionov 提交于
Commit 18937c3a introduced the memory leak when client->msg.fds is copied to thecall->msg and then never freed.
-
由 Osier Yang 提交于
For both AttachDevice and UpdateDevice APIs, if the disk device is 'cdrom' or 'floppy', the operations could be ejecting, updating, and inserting. For either ejecting or updating, the shared disk entry of the original disk src has to be removed, because it's not useful anymore. And since the original disk def will be changed, new disk def passed as argument will be free'ed in qemuDomainChangeEjectableMedia, so we need to copy the orignal disk def before qemuDomainChangeEjectableMedia, to use it for qemuRemoveSharedDisk.
-
由 Osier Yang 提交于
The disk def could be free'ed by qemuDomainChangeEjectableMedia, which can thus cause crash if we reference the disk pointer. On the other hand, we have to remove the added shared disk entry from the table on error codepath.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
The hash entry is changed from "ref" to {ref, @domains}. With this, the caller can simply call qemuRemoveSharedDisk, without afraid of removing the entry belongs to other domains. qemuProcessStart will obviously benifit from it on error codepath (which calls qemuProcessStop to do the cleanup).
-
由 Osier Yang 提交于
Based on moving various checking into qemuAddSharedDisk, this avoids the caller using it in wrong ways. Also this adds two new checking for qemuCheckSharedDisk (disk device not 'lun' and kernel doesn't support unpriv_sgio simply returns 0).
-
由 Osier Yang 提交于
This moves the various checking into the helpers, to avoid the callers missing the checking.
-
- 20 2月, 2013 10 次提交
-
-
由 Eric Blake 提交于
Automating a sorting check is the only way to ensure we don't regress. Suggested by Dan Berrange. * src/check-symsorting.pl (check_sorting): Add a parameter, validate that groups are in order, and that files exist. * src/Makefile.am (check-symsorting): Adjust caller. * src/libvirt_private.syms: Fix typo. * src/libvirt_linux.syms: Fix file name. * src/libvirt_vmx.syms: Likewise. * src/libvirt_xenxs.syms: Likewise. * src/libvirt_sasl.syms: Likewise. * src/libvirt_libssh2.syms: Likewise. * src/libvirt_esx.syms: Mention file name. * src/libvirt_openvz.syms: Likewise.
-
由 Jiri Denemark 提交于
Due to "feature"/"features" nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that formats mandatory features in migration cookie: for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) { if (mig->flagsMandatory & (1 << i)) virBufferAsprintf(buf, " <feature name='%s'/>\n", qemuMigrationCookieFlagTypeToString(i)); }
-
由 Ján Tomko 提交于
Some functions were using virDomainDeviceInfo where virDevicePCIAddress would suffice. Some were only using integers for slots and functions, assuming the bus numbers are always 0. Switch from virDomainDeviceInfoPtr to virDevicePCIAddressPtr: qemuPCIAddressAsString qemuDomainPCIAddressCheckSlot qemuDomainPCIAddressReserveAddr qemuDomainPCIAddressReleaseAddr Switch from int slot to virDevicePCIAddressPtr: qemuDomainPCIAddressReserveSlot qemuDomainPCIAddressReleaseSlot qemuDomainPCIAddressGetNextSlot Deleted functions (they would take the same parameters as ReserveAddr/ReleaseAddr do now.) qemuDomainPCIAddressReserveFunction qemuDomainPCIAddressReleaseFunction
-
由 Guannan Ren 提交于
Specifying ':' to suppress the error messages printed by getopt(). Then, distinguish the two types of errors. Before: # virsh -c virsh: option requires an argument -- 'c' error: unsupported option '-?'. See --help. After: # virsh -c error: option '-c' requires an argument # virsh -x error: unsupported option '-x'. See --help.
-
由 Eric Blake 提交于
Purely mechanical (roughly, s/\n/~/; s/~~/\n/; sort by line; s/~/\n/) * src/libvirt_private.syms: Sort sections by header file name.
-
由 Eric Blake 提交于
Recent renames were not reflected into the comments of libvirt_private.syms; furthermore, since we mix private headers from several directories into this file, knowing where the file lives can be helpful. * src/libvirt_private.sym: Reflect recent names.
-
由 Natanael Copa 提交于
We pass over the address/port start/end values many times so we put them in structs. Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org> Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Natanael Copa 提交于
Let users set the port range to be used for forward mode NAT: ... <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> ... Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org> Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Natanael Copa 提交于
Support setting which public ip to use for NAT via attribute address in subelement <nat> in <forward>: ... <forward mode='nat'> <address start='1.2.3.4' end='1.2.3.10'/> </forward> ... This will construct an iptables line using: '-j SNAT --to-source <start>-<end>' instead of: '-j MASQUERADE' Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org> Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Jiri Denemark 提交于
-
- 19 2月, 2013 6 次提交
-
-
由 Jiri Denemark 提交于
We need to drop the server lock before calling virObjectUnlock(client) since in case we had the last reference to the client, its dispose callback would be called and that could possibly try to lock the server and cause a deadlock. This is exactly what happens when there is only one QEMU domain running and it is marked to be autodestroyed when the connection dies. This results in qemuProcessAutoDestroy -> qemuProcessStop -> virNetServerRemoveShutdownInhibition call sequence, where the last function locks the server.
-
由 Jiri Denemark 提交于
The function does not report any errors so there should be no need too reset an existing error first. Moreover, virTypedParamsFree is mostly called in cleanup phase where it has the potential to reset any useful reported earlier.
-
由 Jiri Denemark 提交于
It doesn't make sense to print the unit (B) only with Ki, Mi, ... prefixes. Even those poor bytes under 1 KiB are still bytes :-)
-
由 Eric Blake 提交于
Gcc lets you do: int ATTRIBUTE_NONNULL(1) foo(void *param); int foo(void *param) ATTRIBUTE_NONNULL(1); int ATTRIBUTE_NONNULL(1) foo(void *param) { ... } but chokes on: int foo(void *param) ATTRIBUTE_NONNULL(1) { ... } However, since commit eefb881d, we have intentionally been disabling ATTRIBUTE_NONNULL because of lame gcc handling of the attribute (that is, gcc doesn't do decent warning reporting, then compiles code that mysteriously fails if you break the contract of the attribute, which is surprisingly easy to do), leaving it on only for Coverity (which does a much better job of improved static analysis when the attribute is present). But completely eliding the macro makes it too easy to write code that uses the fourth syntax option, if you aren't using Coverity. So this patch forces us to avoid syntax errors, even when not using the attribute under gcc. It also documents WHY we disable the warning under gcc, rather than forcing you to find the commit log. * src/internal.h (ATTRIBUTE_NONNULL): Expand to empty attribute, rather than nothing, when on gcc.
-
由 Guido Günther 提交于
so we don't try to change uid/git to 0 when probing capabilities.
-
由 Doug Goldstein 提交于
The conversion to qemuCaps dropped the ability with qemu{,-kvm} 1.2 and newer to set the lost tick policy for the PIT. While the -no-kvm-pit-reinjection option is depreacated, it is still supported at least through 1.4, it is better to not lose the functionality.
-
- 18 2月, 2013 2 次提交
-
-
由 Doug Goldstein 提交于
udevIfaceListAllInterface() used the udev_device after it had its ref count decremented which results in a use after free issue.
-
由 Doug Goldstein 提交于
/src/lxc/lxc_protocol.[ch] is autogenerated so add it to .gitignore
-
- 16 2月, 2013 12 次提交
-
-
由 John Ferlan 提交于
Coverity found the DACGenLabel was checking for mgr == NULL after a possible dereference; however, in order to get into the function the virSecurityManagerGenLabel would have already dereferenced sec_managers[i] so the check was unnecessary. Same check is made in SELinuxGenSecurityLabel.
-
由 John Ferlan 提交于
Coverity found that commit '41b5e845' had a possible NULL dereference on arg->data processing
-
由 John Ferlan 提交于
Changes from commit '3178df9a' removed the need for the sa_assert(infd).
-
由 John Ferlan 提交于
-
由 John Ferlan 提交于
-
由 Stefan Berger 提交于
Between revision 65fb9d49 and before this patch, an upgrade of libvirt while VMs are running and instantiating iptables filtering rules due to nwfilter rules, may leave stray iptables rules behind when shutting VMs down. Left-over iptables rules may look like this: Chain FP-vnet0 (1 references) target prot opt source destination DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp spt:122 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 [...] Chain libvirt-out (1 references) target prot opt source destination FO-vnet0 all -- 0.0.0.0/0 0.0.0.0/0 [goto] PHYSDEV match --physdev-out vnet0 The reason is that the recent nwfilter code only removed filtering rules in the libvirt-out chain that contain the --physdev-is-bridged parameter. Older rules didn't match and were not removed. Note that the user-defined chain FO-vnet0 could not be removed due to the reference from the rule in libvirt-out. Often the work around may be done through service iptables restart kill -SIGHUP $(pidof libvirtd) This patch now also removes older libvirt versions' iptables rules. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Eric Blake 提交于
Testing our backing chain handling will make it much easier to ensure that we avoid issues in the future. If only I had written this test before I first caused several regressions... * tests/virstoragetest.c: New test. * tests/Makefile.am (test_programs): Build it. * .gitignore: Ignore new files.
-
由 Eric Blake 提交于
If you have a qcow2 file /path1/to/file pointed to by symlink /path2/symlink, and pass qemu /path2/symlink, then qemu treats a relative backing file in the qcow2 metadata as being relative to /path2, not /path1/to. Yes, this means that it is possible to create a qcow2 file where the choice of WHICH directory and symlink you access its contents from will then determine WHICH backing file (if any) you actually find; the results can be rather screwy, but we have to match what qemu does. Libvirt and qemu default to creating absolute backing file names, so most users don't hit this. But at least VDSM uses symlinks and relative backing names alongside the --reuse-external flags to libvirt snapshot operations, with the result that libvirt was failing to follow the intended chain of backing files, and then backing files were not granted the necessary sVirt permissions to be opened by qemu. See https://bugzilla.redhat.com/show_bug.cgi?id=903248 for more gory details. This fixes a regression introduced in commit 82507838. I tested this patch by creating the following chain: ls /home/eblake/Downloads/Fedora.iso # raw file for base cd /var/lib/libvirt/images qemu-img create -f qcow2 \ -obacking_file=/home/eblake/Downloads/Fedora.iso,backing_fmt=raw one mkdir sub cd sub ln -s ../one onelink qemu-img create -f qcow2 \ -obacking_file=../sub/onelink,backing_fmt=qcow2 two mv two .. ln -s ../two twolink qemu-img create -f qcow2 \ -obacking_file=../sub/twolink,backing_fmt=qcow2 three mv three .. ln -s ../three threelink then pointing my domain at /var/lib/libvirt/images/sub/threelink. Prior to this patch, I got complaints about missing backing files; afterwards, I was able to verify that the backing chain (and hence DAC and SELinux relabels) of the entire chain worked. * src/util/virstoragefile.h (_virStorageFileMetadata): Add directory member. * src/util/virstoragefile.c (absolutePathFromBaseFile): Drop, replaced by... (virFindBackingFile): ...better function. (virStorageFileGetMetadataInternal): Add an argument. (virStorageFileGetMetadataFromFD, virStorageFileChainLookup) (virStorageFileGetMetadata): Update callers.
-
由 Eric Blake 提交于
Prior to this patch, we had the callchains: external users \-> virStorageFileGetMetadataFromFD \-> virStorageFileGetMetadataFromBuf virStorageFileGetMetadataRecurse \-> virStorageFileGetMetadataFromFD \-> virStorageFileGetMetadataFromBuf However, a future patch wants to add an additional parameter to the bottom of the chain, for use by virStorageFileGetMetadataRecurse, without affecting existing external callers. Since there is only a single caller of the internal function, we can repurpose it to fit our needs, with this patch giving us: external users \-> virStorageFileGetMetadataFromFD \-> virStorageFileGetMetadataInternal virStorageFileGetMetadataRecurse / \-> virStorageFileGetMetadataInternal * src/util/virstoragefile.c (virStorageFileGetMetadataFromFD): Move most of the guts... (virStorageFileGetMetadataFromBuf): ...here, and rename... (virStorageFileGetMetadataInternal): ...to this. (virStorageFileGetMetadataRecurse): Use internal helper.
-
由 Eric Blake 提交于
virStorageFileGetMetadataFromFD is the only caller of virStorageFileGetMetadataFromBuf; and it doesn't care about the difference between a return of 0 (total success) or 1 (metadata was inconsistent, but pointer was populated as best as possible); only about a return of -1 (could not read metadata or out of memory). Changing the return type, and normalizing the variable names used, will make merging the functions easier in the next commit. * src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf): Change return value, and rename some variables. (virStorageFileGetMetadataFromFD): Rename some variables.
-
由 Eric Blake 提交于
No semantic change; done so the next patch doesn't need a forward declaration of a static function. * src/util/virstoragefile.c (virStorageFileProbeFormatFromBuf): Hoist earlier.
-
由 Eric Blake 提交于
More mingw build failures: CCLD libvirt-lxc.la /usr/lib64/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld: cannot find libvirt_lxc.def: No such file or directory CC virportallocatortest-virportallocatortest.o ../../tests/virportallocatortest.c: In function 'main': ../../tests/virportallocatortest.c:195:1: error: implicit declaration of function 'setenv' [-Werror=implicit-function-declaration] * src/Makefile.am (GENERATED_SYM_FILES): Also generate libvirt_lxc.def. * bootstrap.conf (gnulib_modules): Import setenv.
-