[Pkg-libvirt-maintainers] Bug#566180: Bug#566180: virsh can define lxc domain but does not list nor properly start it
Peter Palfrader
weasel at debian.org
Fri Oct 15 15:33:31 UTC 2010
On Thu, 14 Oct 2010, Guido Günther wrote:
> The file missing is memory.limit_in_bytes which needs
>
> CONFIG_RESOURCE_COUNTERS=y
> CONFIG_CGROUP_MEM_RES_CTLR=y
>
> wich we don't have in Squeeze. This fixes it by ignoring errors due to
> memory limit setting:
>
> --- libvirt-0.8.3.orig/src/util/cgroup.c
> +++ libvirt-0.8.3/src/util/cgroup.c
> @@ -870,6 +870,8 @@ int virCgroupGetMemoryUsage(virCgroupPtr
> "memory.usage_in_bytes", &usage_in_bytes);
> if (ret == 0)
> *kb = (unsigned long) usage_in_bytes >> 10;
> + else
> + *kb = 0;
> return ret;
> }
>
> --- libvirt-0.8.3.orig/src/lxc/lxc_driver.c
> +++ libvirt-0.8.3/src/lxc/lxc_driver.c
> @@ -516,7 +516,6 @@ static int lxcDomainGetInfo(virDomainPtr
> if (virCgroupGetMemoryUsage(cgroup, &(info->memory)) < 0) {
> lxcError(VIR_ERR_OPERATION_FAILED,
> "%s", _("Cannot read memory usage for domain"));
> - goto cleanup;
> }
> }
>
> --- libvirt-0.8.3.orig/src/lxc/lxc_controller.c
> +++ libvirt-0.8.3/src/lxc/lxc_controller.c
> @@ -107,7 +107,6 @@ static int lxcSetContainerResources(virD
> virReportSystemError(-rc,
> _("Unable to set memory limit for domain %s"),
> def->name);
> - goto cleanup;
> }
>
> rc = virCgroupDenyAllDevices(cgroup);
Any chance to get this fix included in squeeze? Would be kinda nice.
cheers,
weasel
--
| .''`. ** Debian GNU/Linux **
Peter Palfrader | : :' : The universal
http://www.palfrader.org/ | `. `' Operating System
| `- http://www.debian.org/
More information about the Pkg-libvirt-maintainers
mailing list