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