Re: [PATCHv4 02/10] Implement domainMemoryStats API slot for LXC driver.

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

 



Hi Michal,

thx for further cleaning up, and pushing -

Michal Privoznik wrote:
> >+    if (!virCgroupGetMemoryUsage(priv->cgroup, &mem_usage))
> >+        goto cleanup;
> >+
> >+    ret = 0;
> >+    if (!virDomainObjIsActive(vm))
> >+        goto cleanup;
> 
> I think these two lines (well three), otherwise we don't fail on
> inactive domain, in contrast with qemu driver for instance.
> 
Yeah. Though there are cases (e.g. lxcDomainGetInfo()), where a
stopped domain is not a hard error. I might have been mislead, but was
working under the assumption that get methods (that could return
something sensible, like zero cpu time for a stopped domain) would be
fine to fail more gracefully?

If this is something where some consolidation work would be desirable,
please let me know.

Cheers,

-- Thorsten

Attachment: signature.asc
Description: 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]