- 08 4月, 2014 15 次提交
-
-
由 Daniel P. Berrange 提交于
Use a syntax-check rule to force PCI, USB and SCSI instead of Pci, Usb and Scsi. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, PCI should always be fully capitalized or full lower case, never Pci. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, USB should always be fully capitalized or full lower case, never Usb. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since it is an abbreviation, SCSI should always be fully capitalized or full lower case, never Scsi. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove the virsystemdmock.la library and instead make use of the shared virmockdbus.la library Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A number of test suites want to mock the DBus APIs. To avoid re-inventing the wheel create a re-usable virmockdbus.la library for LD_PRELOAD usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce virmock.h which provides some macros to assist in creation of LD_PRELOAD overrides. When these are used, the LD_PRELOAD code simply has some stubs which forward to a wrapper function inside the main test case. This means that logic for the test no longer has to be split between the virXXXtest.c and virXXXmock.c files. It will also make it possible to provide some common reusable modules for mocking code like DBus. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Wangrui (K) 提交于
Functions virNetDevRestoreMacAddress() and virNetDevRestoreMacAddress() allocate memory for variable @path using virAsprintf(), but they haven't freed that memory before returning out. Signed-off-by: NZhang bo <oscar.zhangbo@huawei.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
At the beginning of the function we gain a reference to the driver capabilities. Then, we call format function (*) which if failed, unref over caps is called. Then, at the end another unref occurs. * - Moreover, the format was not called over gained caps, but over privconn->caps directly which is not allowed anymore. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The driver passed as the only argument to the function should never be NULL so there's no need to check it. After removing it, the whole function collapses to a single line doing ref over driver capabilities. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Since b15a2bbd we have the new bhyve_capabilities.[ch] files. However, the copyright is held by both Roman and Semihalf. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Guido Günther 提交于
As observed when building in a chroot and QEMU_USER doesn't exist
-
由 Guido Günther 提交于
to avoid CCLD storagevolxml2argvtest /usr/bin/ld: ../src/.libs/libvirt_driver_storage_impl.a(libvirt_driver_storage_impl_la-storage_backend.o): undefined reference to symbol 'xmlFreeDoc@@LIBXML2_2.4.30' //usr/lib/x86_64-linux-gnu/libxml2.so.2: error adding symbols: DSO missing from command line
-
由 Eric Blake 提交于
I noticed that the apparmor code could request metadata even for a cdrom with no media, which would cause a memory leak of the hash table used to look for loops in the backing chain. But even before that, we blindly dereferenced the path for printing a debug statement, so it is just better to enforce that this is only used on non-NULL names. * src/util/virstoragefile.c (virStorageFileGetMetadata): Assume non-NULL path. * src/util/virstoragefile.h: Annotate this. * src/security/virt-aa-helper.c (get_files): Fix caller. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
-
- 07 4月, 2014 9 次提交
-
-
由 Wojciech Macek 提交于
Implement support for connectCompareCPU.
-
由 Wojciech Macek 提交于
- Move all capabilities functions to separate file - Add initCPU
-
由 Wojciech Macek 提交于
Implement bhyveConnectBaselineCPU to support OpenStack/Nova
-
由 Laine Stump 提交于
Other drivers in libvirt (e.g. network, qemu) will automatically return the "inactive" (persistent configuration) XML of an object when that object is inactive. The netcf backend of the interface driver would always try to return the live status XML of the interface, even when it was down. Although netcf does return valid XML in that case, for bond interfaces it is missing almost all of its content, including the <bond> subelement itself, leading to this error message from "virsh iface-dumpxml" of a bond interface that is inactive: error: XML error: bond interface misses the bond element (this is because libvirt's validation of the XML returned by netcf always requires a <bond> element be present). This patch modifies the interface driver netcf backend to check if the interface is inactive, and in that case always return the inactive XML (which will always have a <bond> element, thus eliminating the error message, as well as making operation more in line with other drivers. This fixes the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=878394
-
由 Eric Blake 提交于
I almost wrote a hash value free function that just called VIR_FREE, then realized I couldn't be the first person to do that. Sure enough, it was worth factoring into a common helper routine. * src/util/virhash.h (virHashValueFree): New function. * src/util/virhash.c (virHashValueFree): Implement it. * src/util/virobject.h (virObjectFreeHashData): New function. * src/libvirt_private.syms (virhash.h, virobject.h): Export them. * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit): Use common function. * src/qemu/qemu_capabilities.c (virQEMUCapsCacheNew): Likewise. * src/qemu/qemu_command.c (qemuDomainCCWAddressSetCreate): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorGetBlockInfo): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/util/virclosecallbacks.c (virCloseCallbacksNew): Likewise. * src/util/virkeyfile.c (virKeyFileParseGroup): Likewise. * tests/qemumonitorjsontest.c (testQemuMonitorJSONqemuMonitorJSONGetBlockInfo): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jincheng Miao 提交于
Commit d7c4e003 assumed all SELinux tests depended upon securityselinuxhelper need xattr support, but forgot to move viridentitytest under WITH_ATTR. Reported-by: NNehal J Wani <nehaljw.kkd1@gmail.com> Signed-off-by: NJincheng Miao <jmiao@redhat.com>
-
由 Peter Krempa 提交于
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible.
-
由 Guido Günther 提交于
At least Debian uses dash to run the init scripts
-
由 Antoni S. Puimedon 提交于
Up until now the traffic control filters for the vNIC QoS were matching only ip traffic. For egress traffic that was unnoticed because the unmatched traffic would just go to the default htb class and be shaped anyway. For ingress, though, since the policing of the rate is done by the filter itself. The problem is solved by changing protocol to all and making anything match the filter. Bug-Url: https://bugzilla.redhat.com/1084444Signed-off-by: NAntoni S. Puimedon <asegurap@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 4月, 2014 6 次提交
-
-
由 Roman Bogorodskiy 提交于
-
由 Roman Bogorodskiy 提交于
nmdm is a FreeBSD driver which allows to create a pair of tty devices one of which is passed to the guest and second is used by the client. This patch adds new 'nmdm' character device type. Its definition looks this way: <serial type='nmdm'> <source master='/dev/nmdm0A' slave='/dev/nmdm0B'/> </serial> Master is passed to the hypervisior and slave is used for client connection. Also implement domainOpenConsole() for bhyve driver based on that.
-
由 David Shane Holden 提交于
Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
由 Eric Blake 提交于
Right now, virStorageFileMetadata tracks bool backingStoreIsFile for whether the backing string specified in metadata can be resolved as a file (covering both block and regular file resources) or is treated as a network protocol. But when merging this struct with virStorageSource, it will be easier to just actually track which type of resource it is, as well as have a reserved value for the case where the resource type is unknown (or had an error during probing). * src/util/virstoragefile.h (virStorageType): Add a placeholder value, swap order to match similar public enum. * src/util/virstoragefile.c (virStorage): Update string mapping. * src/conf/domain_conf.c (virDomainDiskSourceParse) (virDomainDiskDefParseXML, virDomainDiskDefFormat) (virDomainDiskSourceFormat): Adjust clients. * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML): Likewise. * src/qemu/qemu_driver.c (qemuDomainSnapshotPrepareDiskExternalBackingInactive) (qemuDomainSnapshotPrepareDiskExternalOverlayActive) (qemuDomainSnapshotPrepareDiskExternalOverlayInactive) (qemuDomainSnapshotPrepareDiskInternal) (qemuDomainSnapshotCreateSingleDiskActive): Likewise. * src/qemu/qemu_command.c (qemuGetDriveSourceString): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I'm about to add fields to virStorageFileMetadata, which means also adding fields to the testFileData struct in virstoragetest. Alas, adding even one pointer on an x86_64 machine gave me a dreaded compiler error: virstoragetest.c:712:1: error: the frame size of 4208 bytes is larger than 4096 bytes [-Werror=frame-larger-than=] After some experimentation, I realized that each test was creating yet another testChainData (which contains testFileData) on the stack; forcing the reuse of one of these structures instead of creating a fresh one each time drastically reduces the size requirements. While at it, I also got rid of a lot of intermediate structs, with some macro magic that lets me directly build up the destination chains inline. For a bit more insight into what this patch does: The old code uses an intermediate variable as a fixed-size array of structs: testFileData chain[] = { a, b }; data.files = chain; In the new code, the use of VIR_FLATTEN_* allows the TEST_CHAIN() macro to still take a single argument for each chain, but now of the form '(a, b)', where it is turned into the var-args 'a, b' multiple arguments understood by TEST_ONE_CHAIN(). Thus, the new code avoids an intermediate variable, and directly provides the list of pointers to be assigned into array elements: data.files = { &a, &b }; * tests/virstoragetest.c (mymain): Rewrite TEST_ONE_CHAIN to reuse the same struct for each test, and to take the data inline rather than via intermediate variables. (testChainData): Use bounded array of pointers instead of unlimited array of struct. (testStorageChain): Reflect struct change. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Writing this test with C99 initializers will make it easier to test additions and deletions to struct members as I refactor the code. * tests/virstoragetest.c (mymain): Rewrite initializers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 4月, 2014 3 次提交
-
-
由 John Ferlan 提交于
Commit id '18642d10' refactored the call to virCommandRunRegex() inside a new function virStorageBackendFileSystemNetFindNFSPoolSources(), but the cut-n-paste didn't remove the "&state". Now that state is passed by reference, it results in a libvirtd core with a messages entry: "...internal error: unknown storage pool type Unknow"
-
由 Olivia Yin 提交于
For example, the file /proc/cpuinfo for 24 cores PowerPC platform is larger than the previous maximum size 2KB. It will fail to start libvirtd with the error message as below: virFileReadAll: Failed to read file '/proc/cpuinfo': Value too large for defined data type virSysinfoRead: internal error Failed to open /proc/cpuinfo This patch defines CPUINFO_FILE_LEN as 10KB which is enough for most architectures. Signed-off-by: NOlivia Yin <Hong-Hua.Yin@freescale.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Nehal J Wani 提交于
Fixes leak introduced by e562e82f ==4937== 64 bytes in 1 blocks are definitely lost in loss record 270 of 405 ==4937== at 0x4A06BE0: realloc (vg_replace_malloc.c:662) ==4937== by 0x6FA41C4: __vasprintf_chk (vasprintf_chk.c:90) ==4937== by 0x50C8D29: virVasprintfInternal (stdio2.h:199) ==4937== by 0x50C8E3A: virAsprintfInternal (virstring.c:362) ==4937== by 0x11D01A: main (libvirtd.c:1170) Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 03 4月, 2014 7 次提交
-
-
由 Stefan Bader 提交于
The XML config for a CDROM device can be without a source path, indicating that there is no media present. Without this change the libxl driver fails to start a guest in that case because the libxl library checks for the LIBXL_DISK_FORMAT_EMPTY format type and tries to stat the NULL pointer that gets passed on. > libxl: error: libxl_device.c:265:libxl__device_disk_set_backend: > Disk vdev=hdc failed to stat: (null): Bad address Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
由 Stefan Bader 提交于
There is a domain id in the virDomain structure as well as in the virDomainObj structure. While the former can become stale the latter is kept up to date. So it is safer to always (virDomainObjPtr)->def->id internally. This will fix issues seen when managing Xen guests through libvirt from virt-manager (not being able to get domain info after define or reboot). This was caused both though libxlDomainGetInfo() only but there were a lot of places that might potentially cause issues, too. Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
由 Ján Tomko 提交于
Check the bus, type of the source device (tcp vs. spicevmc) and the device address visible in the guest. https://bugzilla.redhat.com/show_bug.cgi?id=1035128
-
由 Ján Tomko 提交于
Without this, building an XFS pool on a formatted partition fails with --overwrite. https://bugzilla.redhat.com/show_bug.cgi?id=927172
-
由 Li Yang 提交于
For now 'virsh quit' action like this: -------------------------------- [root@localhost /]# virsh quit [root@localhost /]# -------------------------------- And 'virsh exit' action: -------------------------------- [root@localhost /]# virsh exit [root@localhost /]# -------------------------------- There is a small difference('/n') between them. According to manual said: quit, exit quit this interactive terminal And in the code they all called cmdQuit func, They should get same actions. Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
由 Martin Kletzander 提交于
Commit 5b3492fa aimed to fix this and caught one error but exposed another one. When agent command is being executed and the thread waiting for the reply is woken up by an event (e.g. EOF in case of shutdown), the command finishes with no data (rxObject == NULL), but no error is reported, since this might be desired by the caller (e.g. suspend through agent). However, in other situations, when the data are required (e.g. getting vCPUs), we proceed to getting desired data out of the reply, but none of the virJSON*() functions works well with NULLs. I chose the way of a new parameter for qemuAgentCommand() function that specifies whether reply is required and behaves according to that. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1058149Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ján Tomko 提交于
When looking up a net device by a MAC and PCI address, it is possible that we've got a match on the MAC address but failed to match the PCI address. In that case, outputting just the MAC address can be confusing. Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=872028
-