- 30 9月, 2013 3 次提交
-
-
由 Cédric Bosdonnat 提交于
The problem is described by [0] but its effect on libvirt is that starting a container with a full distro running systemd after having stopped it simply fails. The container cleanup now calls the machined Terminate function to make sure that everything is in order for the next run. [0]: https://bugs.freedesktop.org/show_bug.cgi?id=68370
-
由 Oskari Saarenmaa 提交于
mmap's offset must be aligned to page size or mapping will fail. mmap-based safezero is only used if posix_fallocate isn't available. Signed-off-by: NOskari Saarenmaa <os@ohmu.fi>
-
由 Boris Fiuczynski 提交于
Fixed the retrieval of the AdapterId from the AdapterName of the hostdev source so it does return an error instead of leaving the adapter_id uninitialized. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 28 9月, 2013 1 次提交
-
-
由 Doug Goldstein 提交于
The debug message said there was a timeout of 0 pending for -1 ms which made me think this is where a hang was coming from but according to the function comments this case means that there is no timeout pending so make the debug message say that instead of saying there's a -1 ms timeout.
-
- 26 9月, 2013 5 次提交
-
-
由 Daniel P. Berrange 提交于
Normally a lockspace resource is not freed while there are active owners. During initial resource creation though, an OOM error will trigger this scenario. virLockSpaceResourceFree was not freeing the 'owners' field in this case. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If OOM or another error occurs in virJSONValueFromString the parser state object will be leaked. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If OOM occurs in virJSONParserHandleStartMap it will free a variable that is owned by another object. This leads to a later double-free. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If virDBusMessageIterEncode hits an OOM condition it often leaks the memory associated with the dbus iterator object Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The code parsing comments in config files called virConfAddEntry but did not check for failure. This caused the comment string to leak on OOM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 25 9月, 2013 1 次提交
-
-
由 Laszlo Ersek 提交于
The functions - iptablesAddForwardDontMasquerade(), - iptablesRemoveForwardDontMasquerade handle exceptions in the masquerading implemented in the POSTROUTING chain of the "nat" table. Such exceptions should be added as chronologically latest, logically top-most rules. The bridge driver will call these functions beginning with the next patch: some special destination IP addresses always refer to the local subnetwork, even though they don't match any practical subnetwork's netmask. Packets from virbrN targeting such IP addresses are never routed outwards, but the current rules treat them as non-virbrN-destined packets and masquerade them. This causes problems for some receivers on virbrN. Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
-
- 24 9月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virCommandAddEnvPassCommon method ignored the failure to pre-allocate the env variable array with VIR_RESIZE_N. While this is harmless, it confuses the test harness which is trying to validate OOM handling of every individual allocation call. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When the various viralloc.c functions were changed to use the normal error reporting code, the OOM injection code paths were not updated to report errors. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 19 9月, 2013 1 次提交
-
-
由 Jonathan Lebon 提交于
In commit 6d41cb87, the interface for virEventAddHandleFunc was changed. This patch updates the documentation for virEventAddHandle to reflect the new significance of the return value. Also, both functions now mention -1 for failure.
-
- 18 9月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The polkit access driver will want to use the process start time field. This was already set for network identities, but not for the system identity. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Future improvements to the polkit code will require access to the numeric user ID, not merely user name. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 17 9月, 2013 4 次提交
-
-
由 Peter Krempa 提交于
The functionality wasn't originally implemented. This patch adds the ability to modify domain's XML metadata using the API.
-
由 Peter Krempa 提交于
The virDomainGetMetadata function was designed to support also retrieval of app specific metadata from the <metadata> element. This functionality was never implemented originally.
-
由 Peter Krempa 提交于
-
由 Ján Tomko 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1008619 1,003 bytes in 1 blocks are definitely lost in loss record 599 of 635 ==404== by 0x50728A7: virBufferAddChar (virbuffer.c:185) ==404== by 0x50BC466: virSystemdEscapeName (virsystemd.c:67) ==404== by 0x50BC6B2: virSystemdMakeSliceName (virsystemd.c:108) ==404== by 0x50BC870: virSystemdCreateMachine (virsystemd.c:169) ==404== by 0x5078267: virCgroupNewMachine (vircgroup.c:1498)
-
- 16 9月, 2013 4 次提交
-
-
由 Eric Blake 提交于
Bother those kernel developers. In the latest rawhide, kernel and glibc have now been unified so that <netinet/in.h> and <linux/in6.h> no longer clash; but <linux/if_bridge.h> is still not self-contained. Because of the latest header change, the build is failing with: checking for linux/param.h... no configure: error: You must install kernel-headers in order to compile libvirt with QEMU or LXC support with details: In file included from conftest.c:561:0: /usr/include/linux/in6.h:71:18: error: field 'flr_dst' has incomplete type struct in6_addr flr_dst; We need a workaround to avoid our workaround :) * configure.ac (NETINET_LINUX_WORKAROUND): New test. * src/util/virnetdevbridge.c (includes): Use it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The function existed in two identical instances in lxc and qemu. Move it to vircgroup.c and simplify it. Refactor the callers too.
-
由 Peter Krempa 提交于
Semantics of the libvirt helper are more clear. This change also allows to clean up some pieces of code.
-
由 Peter Krempa 提交于
Explicitly state that some parts of the code may require virFileExists to set or preserve a correct errno so that future modifications don't break.
-
- 12 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Debian systems may run the 'systemd-logind' daemon, which causes the /sys/fs/cgroup/systemd mount to be setup, but no other cgroup controllers are created. While the LXC driver considers cgroups to be mandatory, the QEMU driver is supposed to accept them as optional. We detect whether they are present by looking in /proc/mounts for any mounts of type 'cgroups', but this is not sufficient. We need to skip any named mounts (as seen by a name=XXX string in the mount options), so that we only detect actual resource controllers. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721979Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 9月, 2013 3 次提交
-
-
由 Gao feng 提交于
This patch introduces virDBusIsServiceEnabled, we can use this method to get if the service is supported. In one case, if org.freedesktop.machine1 is unavailable on host, we should skip creating machine through systemd. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Daniel P. Berrange 提交于
Some users in Ubuntu/Debian seem to have a setup where all the cgroup controllers are mounted on /sys/fs/cgroup rather than any /sys/fs/cgroup/<controller> name. In the loop which detects which controllers are present for a mount point we were modifying 'mnt_dir' field in the 'struct mntent' var, but not always restoring the original value. This caused detection to break in the all-in-one mount setup. Fix that logic bug and add test case coverage for this mount setup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Oskari Saarenmaa 提交于
Signed-off-by: NOskari Saarenmaa <os@ohmu.fi> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 9月, 2013 1 次提交
-
-
由 Yogesh Tillu 提交于
ARM v7 can operate in either little or big endian modes. Add support for the big-endian version known as armv7b from uname. Signed-off-by: NYogesh Tillu <tillu.yogesh@gmail.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 9月, 2013 3 次提交
-
-
由 Ian Main 提交于
This patch changes virFileLoopDeviceOpen() to use the new loop-control device to allocate a new loop device. If this behavior is unsupported we fall back to the previous method of searching /dev for a free device. With this patch you can start as many image based LXC domains as you like (well almost). Fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=995543
-
由 Daniel P. Berrange 提交于
The VIR_FREE() macro will cast away any const-ness. This masked a number of places where we passed a 'const char *' string to VIR_FREE. Fortunately in all of these cases, the variable was not in fact const data, but a heap allocated string. Fix all the variable declarations to reflect this. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Doug Goldstein 提交于
When virGetUserEnt() and virGetGroupEnt() fail due to the uid or gid not existing on the machine they'll print a message like: $ virsh -c vbox:///session list error: failed to connect to the hypervisor error: Failed to find user record for uid '32655': Success The success at the end is a bit confusing. This changes it to: $ virsh -c vbox:///session list error: failed to connect to the hypervisor error: Failed to find user record for uid '32655'
-
- 04 9月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The @qemunbd variable can be used uninitialized.
-
- 03 9月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, kernel supports up to 8 queues for a multiqueue tap device. However, if user tries to enter a huge number (e.g. one million) the tap allocation fails, as expected. But what is not expected is the log full of warnings: warning : virFileClose:83 : Tried to close invalid fd 0 The problem is, upon error we iterate over an array of FDs (handlers to queues) and VIR_FORCE_CLOSE() over each item. However, the array is pre-filled with zeros. Hence, we repeatedly close stdin. Ouch. But there's more. The queues allocation is done in virNetDevTapCreate() which cleans up the FDs in case of error. Then, its caller, the virNetDevTapCreateInBridgePort() iterates over the FD array and tries to close them too. And so does qemuNetworkIfaceConnect() and qemuBuildInterfaceCommandLine().
-
- 30 8月, 2013 1 次提交
-
-
由 Eric Blake 提交于
FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results of rand() really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: 1. POSIX requires random() to be evenly distributed across exactly 31 bits. glibc also guarantees this for rand(), but the two are unrelated, and POSIX only associates RAND_MAX with rand(). Avoiding RAND_MAX altogether thus avoids a build failure on FreeBSD 10. 2. Concatenating random bits from a PRNG will NOT provide uniform coverage over the larger value UNLESS the period of the original PRNG is at least as large as the number of bits being concatenated. Simple example: suppose that RAND_MAX were 1 with a period of 2**1 (which means that the PRNG merely alternates between 0 and 1). Concatenating two successive rand() calls would then invariably result in 01 or 10, which is a rather non-uniform distribution (00 and 11 are impossible) and an even worse period (2**0, since our second attempt will get the same number as our first attempt). But a RAND_MAX of 1 with a period of 2**2 (alternating between 0, 1, 1, 0) provides sane coverage of all four values, if properly tempered. (Back-to-back calls would still only see half the values if we don't do some tempering). We therefore want to guarantee a period of at least 2**64, preferably larger (as a tempering factor); POSIX only makes this guarantee for random() with 256 bytes of info. * src/util/virrandom.c (virRandomBits): Use constants that are accurate for the PRNG we are using, not an unrelated PRNG. (randomState): Ensure the period of our PRNG exceeds our usage. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 8月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Re-arrange the code so that the returned bitmap is always initialized to NULL even on early failures and return an error message as some callers are already expecting it. Fix up the rest not to shadow the error.
-
由 Roman Bogorodskiy 提交于
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
-
- 19 8月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
On hosts that don't have the DBus service running or installed the new systemd cgroups code failed with hard error instead of falling back to "manual" cgroup creation. Use the new helper to check for the system bus and use the fallback code in case it isn't available.
-
由 Peter Krempa 提交于
Some systems may not use DBus in their system. Add a method to check if the system bus is available that doesn't print error messages so that code can later check for this condition and use an alternative approach.
-
- 16 8月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The virBitmapParse function was calling virBitmapIsSet() function that requires the caller to check the bounds of the bitmap without checking them. This resulted into crashes when parsing a bitmap string that was exceeding the bounds used as argument. This patch refactors the function to use virBitmapSetBit without checking if the bit is set (this function does the checks internally) and then counts the bits in the bitmap afterwards (instead of keeping track while parsing the string). This patch also changes the "parse_error" label to a more common "error". The refactor should also get rid of the need to call sa_assert on the returned variable as the callpath should allow coverity to infer the possible return values. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=997367 Thanks to Alex Jia for tracking down the issue. This issue is introduced by commit 0fc89098.
-
由 Eric Blake 提交于
* src/util/virnetdevvportprofile.c: Fix typo. * src/conf/domain_conf.c: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-