TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.56k stars 244 forks source link

OS-8428 sysinfo may fail on strings "sanitized" by smbios but are toxic to json (fix CPU_Type) #1068

Closed bahamat closed 1 year ago

pfmooney commented 1 year ago

I encountered this on a machine running recently-updated qemu/kvm/ovmf bits, which seems to emit bogus SMBIOS data for the guest:

1024  67   SMB_TYPE_PROCESSOR (type 4) (processor)

  Manufacturer: \x01
  Version: \x01
  Asset Tag: AMD
  Location Tag: \x01

The data for Manufacturer would land in the sysinfo field for CPU Type, causing vminfod and friends to be upset over the invalid json.

With this fix in place (caching now-valid data), vminfod would run again.

danmcd commented 1 year ago

Also adding IA because you have noted your tests in the ticket.