- 12 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The detection of the maximum number of cpus used incorrect ioctl argument value. This flaw caused that on kvm hosts this returns always "160" as the maximum. This is just a recommended maximum value. The real value is higher than that. This patch tweaks the detection function to behave as described by the kernel docs: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/virtual/kvm/api.txt?id=refs/tags/v3.9-rc2#n199
-
- 11 3月, 2013 5 次提交
-
-
由 Hu Tao 提交于
Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Ján Tomko 提交于
Properly check the return value of vshCommandOptStringReq for xmlfile: * error out on incorrect input (--xmlfile '') * use default XML <domainsnapshot/> with no --xmlfile specified (Broken by commit b2e85855) Bug: https://bugzilla.redhat.com/show_bug.cgi?id=919826
-
由 Guido Günther 提交于
these were missed by 63f18f37
-
由 Guido Günther 提交于
otherwise we crash with #0 virUSBDeviceListFind (list=0x0, dev=dev@entry=0x8193d70) at util/virusb.c:526 #1 0xb1a4995b in virLXCPrepareHostdevUSBDevices (driver=driver@entry=0x815d9a0, name=0x815dbf8 "debian-700267", list=list@entry=0x81d8f08) at lxc/lxc_hostdev.c:88 #2 0xb1a49fce in virLXCPrepareHostUSBDevices (def=0x8193af8, driver=0x815d9a0) at lxc/lxc_hostdev.c:261 #3 virLXCPrepareHostDevices (driver=driver@entry=0x815d9a0, def=0x8193af8) at lxc/lxc_hostdev.c:328 #4 0xb1a4c5b1 in virLXCProcessStart (conn=0x817d3f8, driver=driver@entry=0x815d9a0, vm=vm@entry=0x8190908, autoDestroy=autoDestroy@entry=false, reason=reason@entry=VIR_DOMAIN_RUNNING_BOOTED) at lxc/lxc_process.c:1068 #5 0xb1a57e00 in lxcDomainStartWithFlags (dom=dom@entry=0x815e460, flags=flags@entry=0) at lxc/lxc_driver.c:1014 #6 0xb1a57fc3 in lxcDomainStart (dom=0x815e460) at lxc/lxc_driver.c:1046 #7 0xb79c8375 in virDomainCreate (domain=domain@entry=0x815e460) at libvirt.c:8450 #8 0x08078959 in remoteDispatchDomainCreate (args=0x81920a0, rerr=0xb65c21d0, client=0xb0d00490, server=<optimized out>, msg=<optimized out>) at remote_dispatch.h:1066 #9 remoteDispatchDomainCreateHelper (server=0x80c4928, client=0xb0d00490, msg=0xb0d005b0, rerr=0xb65c21d0, args=0x81920a0, ret=0x815d208) at remote_dispatch.h:1044 #10 0xb7a36901 in virNetServerProgramDispatchCall (msg=0xb0d005b0, client=0xb0d00490, server=0x80c4928, prog=0x80c6438) at rpc/virnetserverprogram.c:432 #11 virNetServerProgramDispatch (prog=0x80c6438, server=server@entry=0x80c4928, client=0xb0d00490, msg=0xb0d005b0) at rpc/virnetserverprogram.c:305 #12 0xb7a300a7 in virNetServerProcessMsg (msg=<optimized out>, prog=<optimized out>, client=<optimized out>, srv=0x80c4928) at rpc/virnetserver.c:162 #13 virNetServerHandleJob (jobOpaque=0xb0d00510, opaque=0x80c4928) at rpc/virnetserver.c:183 #14 0xb7924f98 in virThreadPoolWorker (opaque=opaque@entry=0x80a94b0) at util/virthreadpool.c:144 #15 0xb7924515 in virThreadHelper (data=0x80a9440) at util/virthreadpthread.c:161 #16 0xb7887c39 in start_thread (arg=0xb65c2b70) at pthread_create.c:304 #17 0xb77eb78e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130 when adding a domain with a usb device. This is Debian bug http://bugs.debian.org/700267
-
由 Michal Privoznik 提交于
By current implementation, network inbound is required in order to use 'floor' for guaranteeing minimal throughput. This is so, because we want user to tell us the maximal throughput of the network instead of finding out ourselves (and detect bogus values in case of virtual interfaces). However, we are nowadays requiring this only on documentation level. So if user starts a domain with 'floor' set on one its interfaces, we silently ignore the setting. We should error out instead.
-
- 10 3月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The function is marked as unused and breaks compilation on RHEL4. Remove it from the tree until a new use case can be found.
-
由 Peter Krempa 提交于
The commit originally fixed code that isn't being used. Revert it and remove the unused code as a real fix. This reverts commit a66b32d9.
-
- 09 3月, 2013 2 次提交
-
-
由 Dusty Mabe 提交于
'virsh capabilities' will now include a new <memory> element per <cell> of the topology, as in: <topology> <cells num='2'> <cell id='0'> <memory unit='KiB'>12572412</memory> <cpus num='12'> ... </cell> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Guido Günther 提交于
This fixes the build on Debian Wheezy which otherwise fails with: CC libvirt_driver_lxc_impl_la-lxc_process.lo lxc/lxc_process.c: In function 'virLXCProcessGetNsInode': lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration] lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs] cc1: all warnings being treated as errors
-
- 08 3月, 2013 15 次提交
-
-
由 Michal Privoznik 提交于
When there are two concurrent threads, we may dereference a NULL pointer, even though it has been checked before: 1. Thread1: starts executing qemuDomainBlockStatsFlags() with nparams != 0. It finds given disk and successfully pass check for disk->info.alias not being NULL. 2. Thread2: starts executing qemuDomainDetachDeviceFlags() on the very same disk as Thread1 is working on. 3. Thread1: gets to qemuDomainObjBeginJob() where it sets a job on a domain. 4. Thread2: also tries to set a job. However, we are not guaranteed which thread wins. So assume it's Thread2 who can continue. 5. Thread2: does the actual detach and frees disk->info.alias 6. Thread2: quits the job 7. Thread1: now successfully acquires the job, and accesses a NULL pointer.
-
由 Guannan Ren 提交于
Rename AppArmorSetImageFDLabel to AppArmorSetFDLabel which could be used as a common function for *ALL* fd relabelling in Linux. In apparmor profile for specific vm with uuid cdbebdfa-1d6d-65c3-be0f-fd74b978a773 Path: /etc/apparmor.d/libvirt/libvirt-cdbebdfa-1d6d-65c3-be0f-fd74b978a773.files The last line is for the tapfd relabelling. # DO NOT EDIT THIS FILE DIRECTLY. IT IS MANAGED BY LIBVIRT. "/var/log/libvirt/**/rhel6qcow2.log" w, "/var/lib/libvirt/**/rhel6qcow2.monitor" rw, "/var/run/libvirt/**/rhel6qcow2.pid" rwk, "/run/libvirt/**/rhel6qcow2.pid" rwk, "/var/run/libvirt/**/*.tunnelmigrate.dest.rhel6qcow2" rw, "/run/libvirt/**/*.tunnelmigrate.dest.rhel6qcow2" rw, "/var/lib/libvirt/images/rhel6u3qcow2.img" rw, "/dev/tap45" rw,
-
由 Daniel P. Berrange 提交于
To allow the efficient correlation of container audit messages with host hosts, include the pid namespace inode in audit messages.
-
由 Daniel P. Berrange 提交于
By using a loopback device, disks backed by plain files can be made available to LXC containers. We make no attempt to auto-detect format if <driver type="raw"/> is not set, instead we unconditionally treat that as meaning raw. This is to avoid the security issues inherent with format auto-detection Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Minor re-factoring of code for setting up loop devices in the LXC controller Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The current QEMU code for skipping log messages only skips over 'debug' message, switch to virLogProbablyLogMessage to make sure it skips over all of them
-
由 Daniel P. Berrange 提交于
Currently we rely on a VIR_ERROR message being logged by the virRaiseError function to report LXC startup errors. This gives the right message, but is rather ugly and can be truncated if lots of log messages are written. Change the LXC controller to explicitly print any virErrorPtr message to stderr. Then change the driver to skip over anything that looks like a log message. The result is that this error: Failed to start domain busy error: internal error guest failed to start: 2013-03-04 19:46:42.846+0000: 1734: info : libvirt version: 1.0.2 2013-03-04 19:46:42.846+0000: 1734: error : virFileLoopDeviceAssociate:600 : Unable to open /root/disk.raw: No such file or directory changes to error: Failed to start domain busy error: internal error guest failed to start: Unable to open /root/disk.raw: No such file or directory Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When reading log output from QEMU/LXC we need to skip over any libvirt log messages. Currently the QEMU driver checks for a fixed string, but this is better done with a regex. Add a method virLogProbablyLogMessage to do a regex check Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In the LXC container startup code when switching stdio streams, we call VIR_FORCE_CLOSE on all FDs. This triggers a huge number of warnings, but we don't see them because stdio is closed at this point. strace() however shows them which can confuse people debugging the code. Switch to VIR_MASS_CLOSE to avoid this Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
RHEL4 vintage libxml2 header files are missing xmlSaveToBuffer despite the symbol existing in the binary Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virNetDevSetupControlFull function was protected by a conditional on SIOCBRADDBR, which is bogus since it does not use that symbol. Update the conditionals around all callers to do stricter checks to ensure we always build succesfully Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The RHEL4 vintage header files do not define GET_VLAN_VID_CMD. Conditionally define it in our source, since the kernel can raise a runtime error if it isn't supported Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The loop.h on RHEL4 is broken and cannot be imported. We already detect this in configure as a side-effect of looking for whether LO_FLAGS_AUTOCLEAR is available. We protected the impl with HAVE_DECL_LO_FLAGS_AUTOCLEAR, but not the header import Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To avoid a clash with daemon() libc API, rename the 'daemon' param in the header file to 'binary'. The source file already uses the name 'binary'. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
On RHEL-4 vintage one of the header files is polluted causing a clash between the clone() syscall and the 'clone' parameter in a libvirt driver API Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 3月, 2013 5 次提交
-
-
由 Eric Blake 提交于
Commit 0df3e896 only touched the header, but the .c file had the same shadowing potential. * src/util/viralloc.c (virDeleteElementsN): s/remove/toremove/ to match the header.
-
由 Eric Blake 提交于
This matches the documentation of commit 4932ef45, and the C code changes of commit 75e656a3. * docs/schemas/domaincommon.rng: Allow default entry.
-
由 Eric Blake 提交于
Make the same fix as in commit de53effe. * src/util/viralloc.h (virDeleteElementsN): Cater to old glibc.
-
由 Daniel P. Berrange 提交于
Code that validates the whitelist for the RNG device filename didn't account for fact that filename may be NULL. This led to a NULL reference crash. This wasn't caught since the test suite was not covering this XML syntax Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 John Ferlan 提交于
Resolves the following valgrind error from qemuxml2argvtest: ==20393== 5 bytes in 1 blocks are definitely lost in loss record 2 of 60 ==20393== at 0x4A0883C: malloc (vg_replace_malloc.c:270) ==20393== by 0x38D690A167: __vasprintf_chk (in /usr/lib64/libc-2.16.so) ==20393== by 0x4CB0D97: virVasprintf (stdio2.h:210) ==20393== by 0x4CB0E53: virAsprintf (virutil.c:2017) ==20393== by 0x428DC5: qemuAssignDeviceAliases (qemu_command.c:791) ==20393== by 0x41DF93: testCompareXMLToArgvHelper (qemuxml2argvtest.c:151) ==20393== by 0x41F53F: virtTestRun (testutils.c:157) ==20393== by 0x41DA9B: mymain (qemuxml2argvtest.c:885) ==20393== by 0x41FB7A: virtTestMain (testutils.c:719) ==20393== by 0x38D6821A04: (below main) (in /usr/lib64/libc-2.16.so) ==20393== From qemu_command.c/line 791: if (def->rng) { if (virAsprintf(&def->rng->info.alias, "rng%d", 0) < 0) goto no_memory; }
-
- 06 3月, 2013 6 次提交
-
-
由 Jiri Denemark 提交于
This patch plugs two memory leaks, removes some useless and confusing constructs and renames renames "cleanup" label as "error" since it is only used for error path rather then being common for both success and error paths.
-
由 John Ferlan 提交于
Change the various "return -1" to "break". Avoids Coverity error and perhaps other/future analyzer issues.
-
由 John Ferlan 提交于
1. The virObjectLock() call was unconditional, but Unlock was conditional on vm being valid. Removed the check 2. A call to virDomainEventNewFromObj() isn't guaranteed to return an event - that check needs to be made prior to libxlDomainEventQueue() of the event. Did not add libxlDriverLock/Unlock around the call since some callers already have lock taken 3. Need to initialize fd = -1 in libxlDoDomainSave() since we can jump to cleanup before it's set. 4. Missing break;'s in libxlDomainModifyDeviceFlags() for case LIBXL_DEVICE_UPDATE. The default: case would report an error
-
由 John Ferlan 提交于
-
由 Guannan Ren 提交于
virsh subcommand memtune forgot updating domain live xml after setting cgroup value.
-
由 Guannan Ren 提交于
A value which is equal to a integer maximum such as LLONG_MAX is a valid integer value. The patch fix the following error: 1, virsh memtune vm --swap-hard-limit -1 2, virsh start vm In debug mode, it shows error like: virScaleInteger:1813 : numerical overflow:\ value too large: 9007199254740991KiB
-
- 05 3月, 2013 4 次提交
-
-
由 Peter Krempa 提交于
This patch adds proper error reporting if parsing of cputune parameters fails due to incorrect values provided by the user. Previously no errors were reported in such a case and the failure was silently ignored.
-
由 Peter Krempa 提交于
Make the iterator function usable in the next patches. Also refactor some parts to avoid strcmp if not necessary. This commit tweaks and shadows the change that was done in commit babe7dad and was needed after the support for multiple console devices was added. Historically the first <console> element is alias for the <serial> device.
-
由 Peter Krempa 提交于
This patch changes many unrelated places to simplify the code or update code style. This patch should not have any semantic impact on the code.
-
由 Peter Krempa 提交于
Help script creators by not having to parse the names from the table.
-