-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
What
When the exporter tries to collect Nova metadata for instances, it always calls:
metadata, err := dom.GetMetadata(
libvirt.DOMAIN_METADATA_ELEMENT,
"http://openstack.org/xmlns/libvirt/nova/1.0",
libvirt.DOMAIN_AFFECT_LIVE,
)
If the domain is not running, this fails with:
virError(Code=55, Domain=20, Message='Requested operation is not valid: domain is not running')
This causes noisy error logs like:
time=2025-09-25T08:42:35.323Z level=ERROR source=/go/src/app/collectors/domain_stats.go:458 msg="Failed to get Nova metadata" err="virError(Code=55, Domain=20, Message='Requested operation is not valid: domain is not running')"
Steps to Reproduce
- Run
libvirtd_exporter
on a host with at least oneshut off
instance. - Observe the logs during metrics collection.
Expected behavior:
Exporter should gracefully handle inactive domains. Metadata should still be retrieved from the persistent config if the VM is not running, instead of logging errors.
Proposed fix
Fallback to DOMAIN_AFFECT_CONFIG
if DOMAIN_AFFECT_LIVE
fails.
Metadata
Metadata
Assignees
Labels
No labels