Skip to content

Commit

Permalink
hostname: warn about DHCP assigned hostname breaking reset functional…
Browse files Browse the repository at this point in the history
…ity (#330)

* hostname: fix typo

Signed-off-by: Francesco Giudici <[email protected]>

* hostname: preserving hostname breaks reset in 1.4

add a warning in the hostname customization docs

Signed-off-by: Francesco Giudici <[email protected]>

---------

Signed-off-by: Francesco Giudici <[email protected]>
  • Loading branch information
fgiudici authored May 6, 2024
1 parent c640652 commit 9a5c9d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/hostname.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ the registration phase, which will be later set as the static hostname of the ho
provisioning phase.

<CodeBlock language="yaml" title="registration example with hostname and MachineInventory name set on the hostname got by the DHCP server" showLineNumbers>{Registration}</CodeBlock>
:::
16 changes: 15 additions & 1 deletion versioned_docs/version-1.4/hostname.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ title: ''
</head>

## Customize hostname


### Elemental hostname management overview

When a host boots from the Elemental ISO, the hostname is temporarily set (*transient hostname*) to the one provided from the DHCP server.
Expand Down Expand Up @@ -63,4 +65,16 @@ the registration phase, which will be later set as the static hostname of the ho
provisioning phase.

<CodeBlock language="yaml" title="registration example with hostname and MachineInventory name set on the hostname got by the DHCP server" showLineNumbers>{Registration}</CodeBlock>
:::

:::caution DHCP hostname breaks reset functionality
SLE Micro images distributed through the default Elemental channel enforce _recovery_ as the static hostname when
a machine is rebooted into recovery mode.

If the [reset functionality](reset.md) has been enabled, when a machine is reset, it gets rebooted in
recovery mode, so it gets the _recovery_ static hostname.
It then registers anew to the operator, triggering the creation of a new MachineInventory with name
_recovery_.

The next machine going through the reset process will end up trying to register with the same
_recovery_ name, causing a registration failure due to duplicated name.
:::

0 comments on commit 9a5c9d6

Please sign in to comment.