Skip to content

Commit

Permalink
fingerprint: fix unit and adjust attribute names for clarity
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgross committed Oct 4, 2024
1 parent d73ca85 commit 5a7283a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virt/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 5a7283a

Please sign in to comment.