- 08 9月, 2015 6 次提交
-
-
由 Martin Kletzander 提交于
Double semicolons have special meaning in makefiles, but they would have to be combined with other rules witch such separators in order to be used as intended. Since there are no other rules like that, let's clean it up. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Commit 35847860 Added the virFileUnlink function, but failed to add a version for mingw build, causing the following error: Cannot export virFileUnlink: symbol not defined Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1260846 Introduced by 8fedbbdb, if we parse an unordered NUMA cell, will get a segfault. This is because of a check for overlapping @cpus sets we have there. However, since the array to hold guest NUMA cells is allocated upfront and therefore it contains all zeros, an out of order cell will break our assumption that cell IDs have increasing character. At this point we try to access yet NULL bitmap and therefore segfault. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Erik Skultety 提交于
Running valgrind on a very simplistic program consisting only of opening and closing admin connection (virAdmConnect{Open,Close}) shows a leak in remoteAdminPrivNew, because the last reference to privateData is not decremented, thus the object won't be disposed. This patch unrefs the privateData object once we closed the active connection to daemon, making further use of this connection useless. ==24577== at 0x4A089C7: calloc (in /usr/lib64/valgrind/vgpreload_***linux.so) ==24577== by 0x4E8835F: virAllocVar (viralloc.c:560) ==24577== by 0x4EDFA5C: virObjectNew (virobject.c:193) ==24577== by 0x4EDFBD4: virObjectLockableNew (virobject.c:219) ==24577== by 0x4C14DAF: remoteAdminPrivNew (libvirt-admin.c:152) ==24577== by 0x4C1537E: virAdmConnectOpen (libvirt-admin.c:308) ==24577== by 0x400BAD: main (listservers.c:39) ==24577== LEAK SUMMARY: ==24577== definitely lost: 80 bytes in 1 blocks ==24577== indirectly lost: 840 bytes in 6 blocks ==24577== possibly lost: 0 bytes in 0 blocks ==24577== still reachable: 12,179 bytes in 199 blocks ==24577== suppressed: 0 bytes in 0 blocks
-
由 Matthias Bolte 提交于
-
- 07 9月, 2015 4 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1254420Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
Let's move some variables from an inside loop to global function declaration header block. It's going to be easier for next patches. At the same time, order the cleanup calls at the function's end so it's easier to track which variables are freed and which not. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In e755186c we tried to introduce an example demonstrating new virDomainRename API. Unfortunately, in the .gitignore we had a different binary listed. It's 'rename' binary which we want git to ignore, not 'test'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
Commit e755186c added the rename example, but forgot to build some essential files in there as well as add it to the spec file. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 05 9月, 2015 8 次提交
-
-
由 Matthias Bolte 提交于
-
由 John Ferlan 提交于
Remove the need for a couple of sa_asserts.
-
由 John Ferlan 提交于
Coverity claims it could be possible to call virDBusTypeStackFree with *stack == NULL and although the two API's that call it don't appear to allow that - I suppose it's better to be safe than sorry
-
由 John Ferlan 提交于
In virFileNBDDeviceFindUnused if virFileNBDDeviceIsBusy returns 0, then both branches jumped to cleanup, so just use ignore_value since the function returns NULL or some memory and the caller handles the error.
-
由 John Ferlan 提交于
Commit id '692e9fac' used virProcessSetNamespaces instead of inlining the similar functionality; however, Coverity notes that the function prototype expects a size_t value and not an enum and complains. So, just typecast the enum as a size_t to avoid the noise.
-
由 John Ferlan 提交于
Commit id '2e7cea24' added a check for an error from Finish instead of 'unexpected error'; however, if for some reason there wasn't an error, then virGetLastError could return NULL resulting in the NULL pointer deref to err->domain.
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
And in the middle it prints out its name to demonstrate changes in later patch(es). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 04 9月, 2015 9 次提交
-
-
由 Jiri Denemark 提交于
Creating ACL rules is not exactly easy and existing examples are pretty simple. This patch adds a somewhat complex example which defines several roles. Admins can do everything, operators can do basic operations on any domain and several groups of users who act as operators but only on a limited set of domains. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1258361 When attaching a disk, controller, or rng using an address type ccw or s390, we need to ensure the support is provided by both the machine.os and the emulator capabilities (corollary to unconditional setting when address was not provided for the correct machine.os and emulator. For an inactive guest, an addition followed by a start would cause the startup to fail after qemu_command builds the command line and attempts to start the guest. For an active guest, libvirtd would crash.
-
由 John Ferlan 提交于
Rather than have different usages of STR function in order to determine whether the domain is s390-ccw or s390-ccw-virtio, make a single API which will check the machine.os prefix. Then use the function.
-
由 Erik Skultety 提交于
There's no reason why debug initialization could not be made completely hidden, just like readline initialization is. The point of the global initializer vshInit is to make initialization of smaller features transparent to the user/caller.
-
由 Erik Skultety 提交于
Currently, we set interactive mode as default possibly reverting the setting after we parse the command line arguments. There's nothing particulary wrong with that, but a call to vshReadlineInit is performed always in the global initializer just because the default mode is interactive. Rather than moving vshReadlineInit call somewhere else (because another client might want to implement interactive mode only), we could make the decision if we're about to run in interactive mode once the command line is parsed.
-
由 Erik Skultety 提交于
Commit a0b6a36f separated vshInitDebug from the original vshInit (before virsh got split and vshInit became virshInit - commit 834c5720) in order to be able to debug command line parsing. After the parsing is finished, debugging is reinitialized to work properly. There might as well be other features that require re-initialization as the command line could specify parameters that override our defaults which had been set prior to calling vshArgvParse.
-
由 Erik Skultety 提交于
As part of the effort to stay consistent, change the vshInit signature from returning int to returning bool. Moreover, remove the unnecessary error label as there is no cleanup that would make use of it.
-
由 Jim Fehlig 提交于
Remove redundant error reporting in libxlDomainMigrationPerform(). virNetSocketNewConnectTCP() is perfectly capable of reporting sensible errors.
-
由 Pavel Hrdina 提交于
Commit d091518b tried to escape all strings in produced XML, but missed this one. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 03 9月, 2015 4 次提交
-
-
由 Laine Stump 提交于
Before libvirt sets the MAC address of the physdev (the physical ethernet device) linked to a macvtap passthrough device, it always saves the previous MAC address to restore when the guest is finished (following a "leave nothing behind" policy). For a long time it accomplished the save/restore with a combination of ioctl(SIOCGIFHWADDR) and ioctl(SIOCSIFHWADDR), but in commit cbfe38c (first in libvirt 1.2.15) this was changed to use netlink RTM_GETLINK and RTM_SETLINK commands sent to the Physical Function (PF) of any device that was detected to be a Virtual Function (VF). We later found out that this caused problems with any devices using the Cisco enic driver (e.g. vmfex cards) because the enic driver hasn't implemented the function that is called to gather the information in the IFLA_VFINFO_LIST attribute of RTM_GETLINK (ndo_get_vf_config() for those keeping score), so we would never get back a useful response. In an ideal world, all drivers would implement all functions, but it turns out that in this case we can work around this omission without any bad side effects - since all macvtap passthrough <interface> definitions pointing to a physdev that uses the enic driver *must* have a <virtualport type='802.1Qbh'>, and since no other type of ethernet devices use 802.1Qbh, libvirt can change its behavior in this case to use the old-style. ioctl(SIOC[GS]IFHWADDR). That's what this patch does. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1257004
-
由 Laine Stump 提交于
These functions were made static as a part of commit cbfe38c since they were no longer called from outside virnetdev.c. We once again need to call them from another file, so this patch makes them once again public.
-
由 Michal Privoznik 提交于
Well, in 8ad126e6 we tried to fix a memory corruption problem. However, the fix was not as good as it could be. I mean, the commit has one line more than it should. I've noticed this output just recently: # ./run valgrind --leak-check=full --show-reachable=yes ./tools/virsh domblklist gentoo ==17019== Memcheck, a memory error detector ==17019== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==17019== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==17019== Command: /home/zippy/work/libvirt/libvirt.git/tools/.libs/virsh domblklist gentoo ==17019== Target Source ------------------------------------------------ fda /var/lib/libvirt/images/fd.img vda /var/lib/libvirt/images/gentoo.qcow2 hdc /home/zippy/tmp/install-amd64-minimal-20150402.iso ==17019== Thread 2: ==17019== Invalid read of size 4 ==17019== at 0x4EFF5B4: virObjectUnref (virobject.c:258) ==17019== by 0x5038CFF: remoteClientCloseFunc (remote_driver.c:552) ==17019== by 0x5069D57: virNetClientCloseLocked (virnetclient.c:685) ==17019== by 0x506C848: virNetClientIncomingEvent (virnetclient.c:1852) ==17019== by 0x5082136: virNetSocketEventHandle (virnetsocket.c:1913) ==17019== by 0x4ECD64E: virEventPollDispatchHandles (vireventpoll.c:509) ==17019== by 0x4ECDE02: virEventPollRunOnce (vireventpoll.c:658) ==17019== by 0x4ECBF00: virEventRunDefaultImpl (virevent.c:308) ==17019== by 0x130386: vshEventLoop (vsh.c:1864) ==17019== by 0x4F1EB07: virThreadHelper (virthread.c:206) ==17019== by 0xA8462D3: start_thread (in /lib64/libpthread-2.20.so) ==17019== by 0xAB441FC: clone (in /lib64/libc-2.20.so) ==17019== Address 0x139023f4 is 4 bytes inside a block of size 240 free'd ==17019== at 0x4C2B1F0: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17019== by 0x4EA8949: virFree (viralloc.c:582) ==17019== by 0x4EFF6D0: virObjectUnref (virobject.c:273) ==17019== by 0x4FE74D6: virConnectClose (libvirt.c:1390) ==17019== by 0x13342A: virshDeinit (virsh.c:406) ==17019== by 0x134A37: main (virsh.c:950) The problem is, when registering remoteClientCloseFunc(), it's conn->closeCallback which is ref'd. But in the function itself it's conn->closeCallback->conn what is unref'd. This is causing imbalance in reference counting. Moreover, there's no need for the remote driver to increase/decrease conn refcount since it's not used anywhere. It's just merely passed to client registered callback. And for that purpose it's correctly ref'd in virConnectRegisterCloseCallback() and then unref'd in virConnectUnregisterCloseCallback(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Caller is responsible for freeing the result of virStringJoin() when no longer needed: ==10701== 1 bytes in 1 blocks are definitely lost in loss record 1 of 806 ==10701== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==10701== by 0xAADB679: strdup (in /lib64/libc-2.20.so) ==10701== by 0x4F18655: virStrdup (virstring.c:726) ==10701== by 0x4F175AF: virStringJoin (virstring.c:165) ==10701== by 0x131D4D: vshReadlineInit (vsh.c:2572) ==10701== by 0x1322DF: vshInit (vsh.c:2736) ==10701== by 0x1347C1: main (virsh.c:907) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 9月, 2015 7 次提交
-
-
由 John Ferlan 提交于
Commit id '155ca616' added the 'refreshVol' API. In an NFS root-squash environment it was possible that if the just created volume from XML wasn't properly created with the right uid/gid and/or mode, then the followup refreshVol will fail to open the volume in order to get the allocation/ capacity values. This would leave the volume still on the server and cause a libvirtd crash because 'voldef' would be in the pool list, but the cleanup code would free it.
-
由 John Ferlan 提交于
Commit id '7c2d65dd' changed the default value of mode to be -1 if not supplied in the XML, which should cause creation of the volume using the default mode of VIR_STORAGE_DEFAULT_VOL_PERM_MODE; however, the check made was whether mode was '0' or not to use default or provided value. This patch fixes the issue to check if the 'mode' was provided in the XML and use that value.
-
由 John Ferlan 提交于
In an NFS root-squashed environment the 'vol-delete' command will fail to 'unlink' the target volume since it was created under a different uid:gid. This code continues the concepts introduced in virFileOpenForked and virDirCreate[NoFork] with respect to running the unlink command under the uid/gid of the child. Unlike the other two, don't retry on EACCES (that's why we're here doing this now).
-
由 John Ferlan 提交于
This will only be seen when debugging, but in order to help determine whether a virFileOpenForceOwnerMode failed during an NFS root-squash volume/file creation, add an error message from the child.
-
由 Jonathan Toppins 提交于
Adds a new interface type using UDP sockets, this seems only applicable to QEMU but have edited tree-wide to support the new interface type. The interface type required the addition of a "localaddr" (local address), this then maps into the following xml and qemu call. <interface type='udp'> <mac address='52:54:00:5c:67:56'/> <source address='127.0.0.1' port='11112'> <local address='127.0.0.1' port='22222'/> </source> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> QEMU call: -net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222 Notice the xml "local" entry becomes the "localaddr" for the qemu call. reference: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
-
由 Daniel Veillard 提交于
* docs/news.html.in libvirt.spec.in: updated for the release * po/*.po*: regenerated
-
- 31 8月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
Like we are checking for the correct order in SYM_FILES, we should do the same for ADMIN_SYM_FILES. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
It's a generated file, so after 'distclean' it should be gone. But it isn't yet. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-