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

Thorsten Behrens tbehrens at suse.com
Thu Feb 20 21:04:50 UTC 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140220/9a9ea891/attachment-0001.sig>


More information about the libvir-list mailing list