libvirt/60acb38-revert-curmem-inactive-dom.patch
James Fehlig 8af0df1210 Accepting request 327805 from home:jfehlig:branches:Virtualization
Add fixes from SLE12 SP1 to Factory libvirt package.

- Replace local libxl patches with upstream variants
  Dropped:
  0003-libxl-fix-ref-counting-of-libxlMigrationDstArgs.patch
  0004-libxl-don-t-attempt-to-resume-domain-when-suspend-fa.patch
  0005-libxl-acquire-a-job-when-receiving-a-migrating-domai.patch
  Added:
  44a54eb0-libxl-fix-refcnt-MigrationDstArgs.patch
  15120b8c-libxl-no-resume-on-suspend-fail.patch
  e80b84a7-libxl-acquire-job-on-migrate.patch
  bsc#936185
- Added another virt-aa-helper upstream patch
  52970dec-virt-aa-helper-improve-valid-path.patch
  lp#1483071
- Added upstream patch to fix libvirt-tck memory balloon test
  failure on Xen
  60acb38-revert-curmem-inactive-dom.patch

- Fix generated apparmor profile to allow access to ovmf and nvram.
  26c5fa3a-virt-aa-helper-missing-doc.patch
  2f01cfdf-virt-aa-helper-allow-ovmf.patch
  91fdcefa-virt-aa-helper-allow-nvram.patch
  d25a5e08-virt-aa-helper-simplify-restriction-logic.patch
  lp#1483071

OBS-URL: https://build.opensuse.org/request/show/327805
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=479
2015-08-28 20:30:35 +00:00

54 lines
2.0 KiB
Diff

commit 60acb38abbee1636a9cddf8d296f700d115c8f77
Author: Jim Fehlig <jfehlig@suse.com>
Date: Mon Aug 10 12:49:55 2015 -0600
Revert "LXC: show used memory as 0 when domain is not active"
This reverts commit 1ce7c1d20cfd5afb26d2dbc88201085d52415d0e,
which introduced a significant semantic change to the
virDomainGetInfo() API. Additionally, the change was only
made to 2 of the 15 virt drivers.
Conflicts:
src/qemu/qemu_driver.c
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-1.2.18/src/lxc/lxc_driver.c
===================================================================
--- libvirt-1.2.18.orig/src/lxc/lxc_driver.c
+++ libvirt-1.2.18/src/lxc/lxc_driver.c
@@ -597,7 +597,7 @@ static int lxcDomainGetInfo(virDomainPtr
if (!virDomainObjIsActive(vm)) {
info->cpuTime = 0;
- info->memory = 0;
+ info->memory = vm->def->mem.cur_balloon;
} else {
if (virCgroupGetCpuacctUsage(priv->cgroup, &(info->cpuTime)) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
Index: libvirt-1.2.18/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.2.18.orig/src/qemu/qemu_driver.c
+++ libvirt-1.2.18/src/qemu/qemu_driver.c
@@ -2641,13 +2641,13 @@ qemuDomainGetInfo(virDomainPtr dom,
goto cleanup;
}
- if (virDomainObjIsActive(vm)) {
- if (VIR_ASSIGN_IS_OVERFLOW(info->memory, vm->def->mem.cur_balloon)) {
- virReportError(VIR_ERR_OVERFLOW, "%s",
- _("Current memory size too large"));
- goto cleanup;
- }
+ if (VIR_ASSIGN_IS_OVERFLOW(info->memory, vm->def->mem.cur_balloon)) {
+ virReportError(VIR_ERR_OVERFLOW, "%s",
+ _("Current memory size too large"));
+ goto cleanup;
+ }
+ if (virDomainObjIsActive(vm)) {
if (qemuGetProcessInfo(&(info->cpuTime), NULL, NULL, vm->pid, 0) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("cannot read cputime for domain"));