Re: [PATCH 00/21] qemu: Refactor domstats code to avoid error reporting

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

 



On Mon, Feb 24, 2025 at 09:33:51 +0000, Daniel P. Berrangé wrote:
> On Thu, Feb 20, 2025 at 10:01:13AM +0100, Peter Krempa wrote:
> > The workers of qemuDomainGetStats should not report errors if they can't
> > fetch data; but rather omit the entries. Refactor the code to
> > de-incentivize error reporting.
> 
> Why shouldn't they report errors ?
> 
> Can you give an example of a problem seen with error reporting ? Silently

The API itself allows querying multiple VMs for stats. Now if fetching
just one of the stats fields fails you'll get an error instead of
returning stats for everything else.

> dropping data has the problem that its hard for people to realize that
> anything has gone wrong, and in some cases dropped data will be not
> distinguishable from unimplemented data.

The API explicitly documents this behaviour and was intended from the
beginning:

virConnectGetAllDomainStats:


 * Note that entire stats groups or individual stat fields may be missing from
 * the output in case they are not supported by the given hypervisor, are not
 * applicable for the current state of the guest domain, or their retrieval
 * was not successful.
 *
 * Using 0 for @stats returns all stats groups supported by the given
 * hypervisor.
 *
 * Specifying VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS as @flags makes
 * the function return error in case some of the stat types in @stats were
 * not recognized by the daemon.  However, even with this flag, a hypervisor
 * may omit individual fields within a known group if the information is not
 * available; as an extreme example, a supported group may produce zero
 * fields for offline domains if the statistics are meaningful only for a
 * running domain.
 *




[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]

  Powered by Linux