Re: [PATCH] qemu: don't error out when cgroups don't exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/09/2014 10:15 AM, Martin Kletzander wrote:
> When creating cgroups for vcpu and emulator threads whilst starting a
> domain, we explicitly skip creating those cgroups in case priv->cgroup
> is NULL (cgroups not supported) because SetAffinity() serves the same
> purpose.  If the host supports only some cgroups (the ones we need are
> either unmounted or disabled in qemu.conf), we error out with weird
> message even though we could continue starting the domain.

Yet this patch does not change the error message.

> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1097028
> 
> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_cgroup.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
> index 3394c68..0af6ac5 100644
> --- a/src/qemu/qemu_cgroup.c
> +++ b/src/qemu/qemu_cgroup.c
> @@ -949,7 +949,11 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
>          virCgroupFree(&cgroup_vcpu);
>      }
> 
> -    return -1;
> +    if (period || quota)
> +        return -1;
> +
> +    virResetLastError();
> +    return 0;
>  }
> 

This also resets OOM errors and errors that happen when these controllers are
mounted.

Can't we just check upfront if the needed controllers are available?

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]