- 13 6月, 2013 2 次提交
-
-
由 Stefan Berger 提交于
This patch is in relation to Bug 966449: https://bugzilla.redhat.com/show_bug.cgi?id=966449 This is a patch addressing the coredump. Thread 1 must be calling nwfilterDriverRemoveDBusMatches(). It does so with nwfilterDriverLock held. In the patch below I am now moving the nwfilterDriverLock(driverState) further up so that the initialization, which seems to either take a long time or is entirely stuck, occurs with the lock held and the shutdown cannot occur at the same time. Remove the lock in virNWFilterDriverIsWatchingFirewallD to avoid double-locking. (cherry picked from commit 0ec376c2)
-
由 Christophe Fergeau 提交于
qemu-img resize will fail with "The new size must be a multiple of 512" if libvirt doesn't round it first. This fixes rhbz#951495 Signed-off-by: NChristophe Fergeau <cfergeau@redhat.com> (cherry picked from commit 9a8f39d0)
-
- 12 6月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Typically when you get EOF on a stream, poll will return POLLIN|POLLHUP at the same time. Thus when we deal with stream reads, if we see EOF during the read, we can then clear the VIR_STREAM_EVENT_HANGUP & VIR_STREAM_EVENT_ERROR event bits. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit e7b03829)
-
由 Eric Blake 提交于
Reported by Anthony Messina in https://bugzilla.redhat.com/show_bug.cgi?id=904692 Present since introduction of smartcard support in commit f5fd9baa * src/qemu/qemu_command.c (qemuBuildCommandLine): Match qemu spelling. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args: Fix broken test. (cherry picked from commit 6f7e4ea3)
-
- 25 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
The previous commit was an incomplete backport of commit 83e4c775, and as a result made any attempt to start a domain when cgroups are enabled go into an infinite loop. This fixes the botched backport. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 5月, 2013 3 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=965169 documents a problem starting domains when cgroups are enabled; I was able to reliably reproduce the race about 5% of the time when I added hooks to domain startup by 3 seconds (as that seemed to be about the length of time that qemu created and then closed a temporary thread, probably related to aio handling of initially opening a disk image). The problem has existed since we introduced virCgroupMoveTask in commit 91028296 (v0.10.0). There are some inherent TOCTTOU races when moving tasks between kernel cgroups, precisely because threads can be created or completed in the window between when we read a thread id from the source and when we write to the destination. As the goal of virCgroupMoveTask is merely to move ALL tasks into the new cgroup, it is sufficient to iterate until no more threads are being created in the old group, and ignoring any threads that die before we can move them. It would be nicer to start the threads in the right cgroup to begin with, but by default, all child threads are created in the same cgroup as their parent, and we don't want vcpu child threads in the emulator cgroup, so I don't see any good way of avoiding the move. It would also be nice if the kernel were to implement something like rename() as a way to atomically move a group of threads from one cgroup to another, instead of forcing a window where we have to read and parse the source, then format and write back into the destination. * src/util/vircgroup.c (virCgroupAddTaskStrController): Ignore ESRCH, because a thread ended between read and write attempts. (virCgroupMoveTask): Loop until all threads have moved. Signed-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit 83e4c775) Conflicts: src/util/cgroup.c - refactoring in commit 56f27b3b is too big to take in entirety; but I did inline its changes to the cleanup label
-
由 Daniel P. Berrange 提交于
The code for putting the emulator threads in a separate cgroup would spam the logs with warnings 2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 3 2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 4 2013-02-27 16:08:26.732+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 6 This is because it has only created child cgroups for 3 of the controllers, but was trying to move the processes from all the controllers. The fix is to only try to move threads in the controllers we actually created. Also remove the warning and make it return a hard error to avoid such lazy callers in the future. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 279336c5)
-
由 Daniel P. Berrange 提交于
The QEMU driver has a list of devices nodes that are whitelisted for all guests. The kernel has recently started returning an error if you try to whitelist a device which does not exist. This causes a warning in libvirt logs and an audit error for any missing devices. eg 2013-02-27 16:08:26.515+0000: 29625: warning : virDomainAuditCgroup:451 : success=no virt=kvm resrc=cgroup reason=allow vm="vm031714" uuid=9d8f1de0-44f4-a0b1-7d50-e41ee6cd897b cgroup="/sys/fs/cgroup/devices/libvirt/qemu/vm031714/" class=path path=/dev/kqemu rdev=? acl=rw Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 7f544a4c)
-
- 20 5月, 2013 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Daniel P. Berrange 提交于
When given a CA cert with basic constraints to set non-critical, and key usage of 'key signing', this should be rejected. Version of GNUTLS < 3 do not rejecte it though, so we never noticed the test case was broken Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 0204d6d7)
-
- 16 5月, 2013 1 次提交
-
- 07 5月, 2013 3 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=924501 tracks a problem that occurs if uid 107 is already in use at the time libvirt is first installed. In response that problem, Fedora packaging guidelines were recently updated. This fixes the spec file to comply with the new guidelines: https://fedoraproject.org/wiki/Packaging:UsersAndGroups * libvirt.spec.in (daemon): Follow updated Fedora guidelines. Signed-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit a2584d58) Conflicts: libvirt.spec.in - no backport of c8f79c9b %if reindents
-
由 Jiri Denemark 提交于
When a changelog entry references an RPM macro, % needs to be escaped so that it does not appear expanded in package changelog. Fri Mar 4 2009 is incorrect since Mar 4 was Wednesday. Since libvirt-0.6.1 was released on Mar 4 2009, we should change Fri to Wed. (cherry picked from commit 53657a0a)
-
由 Jiri Denemark 提交于
The macro was made to help installing broken packages that did not use DESTDIR correctly by overriding individual path variables (prefix, sysconfdir, ...). Newer rpm provides fixed make_install macro that calls make install with just the correct DESTDIR, however it is not available everywhere (e.g., RHEL 5 does not have it). On the other hand the make_install macro is simple and straightforward enough for us to use its expansion directly. (cherry picked from commit d45066a5)
-
- 23 4月, 2013 2 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=922186 Commit d04916fa introduced a regression in audit quality - even though the code was computing the proper escaped name for a path, it wasn't feeding that escaped name on to the audit message. As a result, /var/log/audit/audit.log would mention a pair of fields class=path path=/dev/hpet instead of the intended class=path path="/dev/hpet", which in turn caused ausearch to format the audit log with path=(null). * src/conf/domain_audit.c (virDomainAuditCgroupPath): Use constructed encoding. Signed-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit 31c6bf35)
-
由 Atsushi Kumagai 提交于
When virStorageBackendLogicalCreateVol() creates a snapshot for a logical volume with backingStore element, it fails with the message below: 2013-01-17 03:10:18.869+0000: 1967: error : virCommandWait:2345 : internal error Child process (/sbin/lvcreate --name lvm-snapshot -L 51200K -s=/dev/lvm-pool/lvm-volume) unexpected exit status 3: /sbin/lvcreate: invalid option -- '=' Error during parsing of command line. This is because virCommandAddArgPair() uses '=' to connect the two parameters, it's unsuitable for -s option of the lvcreate. Signed-off-by: NAtsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> (cherry picked from commit ffee627a)
-
- 02 4月, 2013 1 次提交
-
-
由 Cole Robinson 提交于
-
- 01 4月, 2013 4 次提交
-
-
由 Matthias Bolte 提交于
Avoid requesting information such as identity or power state when it is not necessary. Lookup virtual machine list with the required fields (configStatus, name, and config.uuid) to make esxVI_GetVirtualMachineIdentity work. No need to call esxVI_GetNumberOfSnapshotTrees. rootSnapshotTreeList can be tested for emptiness by checking it for NULL. esxVI_LookupRootSnapshotTreeList already does the error reporting, don't overwrite it. Check if autostart is enabled at all before looking up the individual autostart setting of a virtual machine. Reorder VIR_EXPAND_N(doms, ndoms, 1) to avoid leaking the result of the call to virGetDomain if VIR_EXPAND_N fails. Replace VIR_EXPAND_N by VIR_RESIZE_N to avoid quadratic scaling, as in the Hyper-V version of the function. If virGetDomain fails it already reports an error, don't overwrite it with an OOM error. All items in doms up to the count-th one are valid, no need to double check before freeing them. Finally, don't leak autoStartDefaults and powerInfoList. (cherry picked from commit 5fc663d8)
-
由 Daniel P. Berrange 提交于
Normally libvirtd should run with a SELinux label system_u:system_r:virtd_t:s0-s0:c0.c1023 If a user manually runs libvirtd though, it is sometimes possible to get into a situation where it is running system_u:system_r:init_t:s0 The SELinux security driver isn't expecting this and can't parse the security label since it lacks the ':c0.c1023' part causing it to complain internal error Cannot parse sensitivity level in s0 This updates the parser to cope with this, so if no category is present, libvirtd will hardcode the equivalent of c0.c1023. Now this won't work if SELinux is in Enforcing mode, but that's not an issue, because the user can only get into this problem if in Permissive mode. This means they can now start VMs in Permissive mode without hitting that parsing error Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 1732c1c6) Conflicts: src/security/security_selinux.c
-
由 Daniel P. Berrange 提交于
Pull the code which parses the current process MCS range out of virSecuritySELinuxMCSFind and into a new method virSecuritySELinuxMCSGetProcessRange. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 4a92fe44) Conflicts: src/security/security_selinux.c
-
由 Daniel P. Berrange 提交于
The body of the loop in virSecuritySELinuxMCSFind would directly 'return NULL' on OOM, instead of jumping to the cleanup label. This caused a leak of several local vars. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit f2d8190c)
-
- 27 3月, 2013 3 次提交
-
-
由 Michal Privoznik 提交于
Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like: qemu: warning: error while loading state section id 2 load of migration failed The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> (cherry picked from commit ceb31795)
-
由 Eric Blake 提交于
Commit c308a9ae was incomplete; it resolved the configure failure, but not a later build failure. * src/util/virnetdevbridge.c: Include pre-req header. * configure.ac (AC_CHECK_HEADERS): Prefer standard in.h over non-standard ip6.h. (cherry picked from commit 1bf661ca)
-
由 Cole Robinson 提交于
I got this scary warning during ./configure on rawhide: checking linux/if_bridge.h usability... no checking linux/if_bridge.h presence... yes configure: WARNING: linux/if_bridge.h: present but cannot be compiled configure: WARNING: linux/if_bridge.h: check for missing prerequisite headers? configure: WARNING: linux/if_bridge.h: see the Autoconf documentation configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be Compiled" configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------------- ## configure: WARNING: ## Report this to libvir-list@redhat.com ## configure: WARNING: ## ------------------------------------- ## checking for linux/if_bridge.h... no * configure.ac (AC_CHECK_HEADERS): Provide struct in6_addr, since linux/if_bridge.h uses it without declaring it. (cherry picked from commit c308a9ae) (cherry picked from commit 7ae53f15)
-
- 23 2月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
If securityselinuxtest was run on a system with newer SELinux policy it would fail, due to using svirt_tcg_t instead of svirt_t. Fixing the domain type to be KVM avoids this issue. (cherry picked from commit 32df483f)
-
由 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 (cherry picked from commit 567779e5)
-
- 03 2月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=905708 Only the first 12 bits should be set in the mask for this range. All addresses between 172.16.0.0 and 172.31.255.255 are private. (cherry picked from commit 6405713f)
-
- 01 2月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=895294 The symptom was that attempts to modify a network device using virDomainUpdateDeviceFlags() would fail if the original device had a <boot> element (e.g. "<boot order='1'/>"), even if the updated device had the same <boot> element. Instead, the following error would be logged: cannot modify network device boot index setting It's true that it's not possible to change boot order (internally known as bootIndex) of a live device; qemuDomainChangeNet checks for that, but the problem was that the information it was checking was incorrect. Explanation: When a complete domain is parsed, a global (to the domain) "bootMap" is passed down to the parse for each device; the bootMap is used to make sure that devices don't have conflicting settings for their boot orders. When a single device is parsed by itself (as in the case of virDomainUpdateDeviceFlags), there is no global bootMap that would be appropriate to send, so NULL is sent instead. However, although the lowest level function that parses just the boot order *does* simply skip the sanity check in that case, the next higher level "virDomainDeviceInfoParseXML" function refuses to call down to the lower "virDomainDeviceBootParseXML" if bootMap is NULL. So, the boot order is never set in the "new" device object, and when it is compared to the original (which does have a boot order), they don't match. The fix is to patch virDomainDeviceInfoParseXML to not care about bootMap, and just always call virDomainDeviceInfoBootParseXML whenever there is a <boot> element. When we are only parsing a single device, we don't care whether or not any specified boot order is consistent with the rest of the domain; we will always do this check later (in the current case, we do it by verifying that the net bootIndex exactly matches the old bootIndex).
-
- 29 1月, 2013 9 次提交
-
-
由 Daniel P. Berrange 提交于
The current SELinux policy only works for KVM guests, since TCG requires the 'execmem' privilege. There is a 'virt_use_execmem' boolean to turn this on globally, but that is unpleasant for users. This changes libvirt to automatically use a new 'svirt_tcg_t' context for TCG based guests. This obsoletes the previous boolean tunable and makes things 'just work(tm)' Since we can't assume we run with new enough policy, I also make us log a warning message (once only) if we find the policy lacks support. In this case we fallback to the normal label and expect users to set the boolean tunable Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 77d3a809)
-
由 Cole Robinson 提交于
(cherry picked from commit 7b97030a)
-
由 Cole Robinson 提交于
There's been a few bugs about an expected error from polkit: https://bugzilla.redhat.com/show_bug.cgi?id=873799 https://bugzilla.redhat.com/show_bug.cgi?id=872166 The error is: Authorization requires authentication but no agent is available. The error means that polkit needs a password, but there is no polkit agent registered in your session. Polkit agents are the bit of UI that pop up and actually ask for your password. Preface the error with the string 'polkit:' so folks can hopefully make more sense of it. (cherry picked from commit 96a108c9)
-
由 Cole Robinson 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=888071 (cherry picked from commit d60c7f75)
-
由 Cole Robinson 提交于
-
由 Richard W.M. Jones 提交于
According to Eric Paris this is slightly more efficient because it only loads the regular expressions in libselinux once. (cherry picked from commit 6159710c) Conflicts: src/security/security_selinux.c
-
由 Daniel P. Berrange 提交于
The virSecurityManager{Set,Restore}AllLabel methods are invoked at domain startup/shutdown to relabel resources associated with a domain. This works fine with QEMU, but with LXC they are in fact both currently no-ops since LXC does not support disks, hostdevs, or kernel/initrd files. Worse, when LXC gains support for disks/hostdevs, they will do the wrong thing, since they run in host context, not container context. Thus this patch turns then into a formal no-op when used with LXC. The LXC controller will call out to specific security manager labelling APIs as required during startup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 89c5a9d0)
-
由 John Ferlan 提交于
Commit id a994ef2d changed the mechanism to store/update the default security label from using disk->seclabels[0] to allocating one on the fly. That change allocated the label, but never saved it. This patch will save the label. The new virDomainDiskDefAddSecurityLabelDef() is a copy of the virDomainDefAddSecurityLabelDef(). (cherry picked from commit 05cc0351) Conflicts: src/conf/domain_conf.h
-
由 Peter Krempa 提交于
This patch resolves CVE-2013-0170: https://bugzilla.redhat.com/show_bug.cgi?id=893450 When reading and dispatching of a message failed the message was freed but wasn't removed from the message queue. After that when the connection was about to be closed the pointer for the message was still present in the queue and it was passed to virNetMessageFree which tried to call the callback function from an uninitialized pointer. This patch removes the message from the queue before it's freed. * rpc/virnetserverclient.c: virNetServerClientDispatchRead: - avoid use after free of RPC messages (cherry picked from commit 46532e3e)
-
- 24 1月, 2013 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=903184 Commit id f8ab364c removed ability to run this driver unprivileged. Coverity detected the check and flagged it. (cherry picked from commit aafe4197) Conflicts: src/nwfilter/nwfilter_driver.c - whitespace changes in 1c04f999 not present
-
- 23 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=903184 Although the nwfilter driver skips startup when running in a session libvirtd, it did not skip reload or shutdown. This caused errors to be reported when sending SIGHUP to libvirtd, and caused an abort() in libdbus on shutdown due to trying to remove a dbus filter that was never added (cherry picked from commit abbec81b) Conflicts: src/nwfilter/nwfilter_driver.c - earlier changes f4ea67f5 and 79b8a569 related to using bool and auto-shutdown of drivers are not backported
-
由 Hu Tao 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=903184 (cherry picked from commit 47e17677)
-