xref: /openbmc/docs/designs/unique-hostname.md (revision 2ef2b60d)
1*2ef2b60dSasmithakarun# Setting a unique hostname to the BMC machine on first boot
2*2ef2b60dSasmithakarun
3*2ef2b60dSasmithakarunPrimary assignee:
4*2ef2b60dSasmithakarun  Asmitha KR
5*2ef2b60dSasmithakarun
6*2ef2b60dSasmithakarunOther contributors:
7*2ef2b60dSasmithakarun  None
8*2ef2b60dSasmithakarun
9*2ef2b60dSasmithakarunCreated:
10*2ef2b60dSasmithakarun  2019-05-07
11*2ef2b60dSasmithakarun
12*2ef2b60dSasmithakarun## Problem Description
13*2ef2b60dSasmithakarunIn OpenBMC, the hostname discovery is done by the avahi Dbus service at the
14*2ef2b60dSasmithakarunstartup. In a network where there are multiple OpenBMC machines, avahi keeps
15*2ef2b60dSasmithakarungetting the hostname conflict and the service name conflict. Hence, the
16*2ef2b60dSasmithakarunproblem is to find a solution that resolves these conflicts.
17*2ef2b60dSasmithakarun
18*2ef2b60dSasmithakarun## Background and References
19*2ef2b60dSasmithakarunThe detailed issue regarding the hostname and service name conflicts is
20*2ef2b60dSasmithakarundescribed in the following links.
21*2ef2b60dSasmithakarun
22*2ef2b60dSasmithakarunhttps://github.com/openbmc/openbmc/issues/1741.
23*2ef2b60dSasmithakarunhttps://lists.freedesktop.org/archives/avahi/2018-January/002492.html
24*2ef2b60dSasmithakarunhttps://github.com/lathiat/avahi/issues/117
25*2ef2b60dSasmithakarun
26*2ef2b60dSasmithakarun## Requirements
27*2ef2b60dSasmithakarunNone.
28*2ef2b60dSasmithakarun
29*2ef2b60dSasmithakarun## Proposed Design
30*2ef2b60dSasmithakarunTo solve this, we are proposing a service which assigns a unique hostname to
31*2ef2b60dSasmithakarunthe BMC and runs on the very first boot. one of the ways to generate the unique
32*2ef2b60dSasmithakarunhostname is to append the Serial Number retrieved from Inventory Manager to the
33*2ef2b60dSasmithakarunexisting default hostname.
34*2ef2b60dSasmithakarun
35*2ef2b60dSasmithakarun## Alternatives Considered
36*2ef2b60dSasmithakarunNone.
37*2ef2b60dSasmithakarun
38*2ef2b60dSasmithakarun## Impacts
39*2ef2b60dSasmithakarunNone.
40*2ef2b60dSasmithakarun
41*2ef2b60dSasmithakarun## Testing
42*2ef2b60dSasmithakarunNone.
43