Project

General

Profile

Bug #3359

hostid generation should be more "predictable"

Added by Garrett D'Amore about 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
kernel
Start date:
2012-11-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Hard
Tags:
Gerrit CR:

Description

hostids are re-generated on the fly whenever an x86 system boots but lacks an /etc/hostid file. (For sparc they are taken from the idprom.)

We can and should try to use SMBIOS ids on systems that have them, and use that to generate predictable hostids. This will help systems that don't have persistent storage (e.g. RAM based root disks).

Modern systems have "unique" SMBIOS ids. Some older systems don't, so there needs to be a way to override this. Also, there should be a "black list" of known "bad" SMBIOS uuids.

Sadly the SMBIOS is 128-bits, while the hostid is only 32-bits. Still, we believe that using a hash of the SMBIOS can generate 32-bits that appear generally to be random (so no worse than the existing algorithm), while being stable across reboots even when /etc/hostid is not persistent.

This is important for ZFS, which uses hostids to check for imports from wrong systems, etc. Eliminating this problem may reduce the number of dangerous and incorrect uses of zpool import -f.

#1

Updated by Garrett D'Amore almost 8 years ago

  • Category set to kernel
  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Fixed in:

commit 9e3e4df2a0f62bab8e8eb305949e7d35c55e9864
Author: Garrett D'Amore <>
Date: Sat Nov 17 00:50:53 2012 -0800

3359 hostid generation should be more "predictable" 
Reviewed by: Andy Giles &lt;&gt;
Reviewed by: Hans Rosenfeld &lt;&gt;
Reviewed by: Richard Elling &lt;&gt;
Approved by: Richard Lowe &lt;&gt;

Also available in: Atom PDF