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