Page MenuHomeFreeBSD

Improve hostid handling.
ClosedPublic

Authored by delphij on Jan 10 2015, 1:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 10:22 AM
Unknown Object (File)
Sep 18 2024, 7:39 PM
Unknown Object (File)
Sep 15 2024, 8:56 PM
Unknown Object (File)
Jul 17 2024, 12:26 PM
Unknown Object (File)
Apr 26 2024, 6:38 AM
Unknown Object (File)
Apr 26 2024, 6:23 AM
Unknown Object (File)
Feb 24 2024, 4:45 AM
Unknown Object (File)
Feb 2 2024, 12:45 PM
Subscribers
None

Details

Reviewers
emaste
delphij
pjd
Summary
  • Always update hostid file in hostid_save when it does not match record.
  • Generate uuid when the system UUID is known bad or malformed. A known bad blacklist is included.
  • Quote ${uuid} in [ context.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

delphij retitled this revision from to Improve hostid handling..
delphij updated this object.
delphij edited the test plan for this revision. (Show Details)
delphij added a reviewer: pjd.
etc/rc.d/hostid
58

Probably worth a comment explaining where some of the invalid ones come from. I can see how all-zeros might happen and some of them are obviously manually entered dummy values. It isn't clear where some of them come from, such as 8e275844-178f.... Presumably these have been observed in the field from various manufacturers with broken schemes.

Googling found a list at https://capawiki.capasystems.com/display/CI51DOC/Non-Unique+UUID, which has some other entries not included here.

In D1476#4, @emaste wrote:

Probably worth a comment explaining where some of the invalid ones come from. I can see how all-zeros might happen and some of them are obviously manually entered dummy values. It isn't clear where some of them come from, such as 8e275844-178f.... Presumably these have been observed in the field from various manufacturers with broken schemes.

Googling found a list at https://capawiki.capasystems.com/display/CI51DOC/Non-Unique+UUID, which has some other entries not included here.

I have used xargs with the extracted valid_hostid and simple script (if valid_hostid $1; then echo $1; fi) and verified that the IDs listed on that page are all covered.

I'm not sure if we can get an exhaustive list (e.g. some of the blacklisted IDs are seen on hardware that we sell) but I guess it would be a future thing and having the blacklist as-is is still beneficial.

This revision is now accepted and ready to land.Apr 27 2015, 8:24 PM
In D1476#4, @emaste wrote:

Probably worth a comment explaining where some of the invalid ones come from. I can see how all-zeros might happen and some of them are obviously manually entered dummy values. It isn't clear where some of them come from, such as 8e275844-178f.... Presumably these have been observed in the field from various manufacturers with broken schemes.

Googling found a list at https://capawiki.capasystems.com/display/CI51DOC/Non-Unique+UUID, which has some other entries not included here.

I have used xargs with the extracted valid_hostid and simple script (if valid_hostid $1; then echo $1; fi) and verified that the IDs listed on that page are all covered.

Indeed; perhaps I missed that many of the entries there match *-ffff-ffff-ffff-ffffffffffff