]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't log error for missing optional storage sources on stats
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 9 Nov 2018 09:21:50 +0000 (12:21 +0300)
committerNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 21 Dec 2018 09:13:31 +0000 (12:13 +0300)
commit318d807a0bd3372b634d1952b559c5c627ccfa5b
tree33e545cc3c94f1b0c62c3e18556a41d92a8be6f7
parentdfbd7315c02a6e414d6eb6de5b052a424901e358
qemu: don't log error for missing optional storage sources on stats

Every time we call all domain stats for inactive domain with
unavailable storage source we get error message in logs [1]. It's a bit noisy.
While it's arguable whether we need such message or not for mandatory
disks we would like not to see messages for optional disks. Let's
filter at least for cases of local files. Fixing other cases would
require passing flag down the stack to .backendInit of storage
which is ugly.

Stats for active domain are fine because we either drop disks
with unavailable sources or clean source which is handled
by virStorageSourceIsEmpty in qemuDomainGetStatsOneBlockFallback.

We have these logs for successful stats since 25aa7035d (version 1.2.15)
which in turn fixes 596a13713 (version 1.2.12 )which added substantial
stats for offline disks.

[1] error message example:
qemuOpenFileAs:3324 : Failed to open file '/path/to/optional/disk': No such file or directory

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c