From 5a7283a670ec4105d6cb902860f595f5b6261c8d Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Fri, 4 Oct 2024 14:56:26 -0400 Subject: [PATCH] fingerprint: fix unit and adjust attribute names for clarity The `driver.virt.inactive` attribute was being incorrectly suffixed with "bytes". The names of the fingerprinted fields for the number of active and inactive domains are potentially confusing, as they don't refer to what about the driver is active or inactive. Adjust the name to include `domains` in such a way that active and inactive domains will sort together. --- virt/driver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/driver.go b/virt/driver.go index 437706d..a664b77 100644 --- a/virt/driver.go +++ b/virt/driver.go @@ -288,8 +288,8 @@ func (d *VirtDriverPlugin) buildFingerprint() *drivers.Fingerprint { attrs["driver.virt"] = structs.NewBoolAttribute(true) attrs["driver.virt.libvirt.version"] = structs.NewIntAttribute(int64(virtInfo.LibvirtVersion), "") attrs["driver.virt.emulator.version"] = structs.NewIntAttribute(int64(virtInfo.EmulatorVersion), "") - attrs["driver.virt.active"] = structs.NewIntAttribute(int64(virtInfo.RunningDomains), "") - attrs["driver.virt.inactive"] = structs.NewIntAttribute(int64(virtInfo.InactiveDomains), "bytes") + attrs["driver.virt.domains.active"] = structs.NewIntAttribute(int64(virtInfo.RunningDomains), "") + attrs["driver.virt.domains.inactive"] = structs.NewIntAttribute(int64(virtInfo.InactiveDomains), "") d.networkController.Fingerprint(attrs)