This issue is about configuring a machine hostname using the elemental-agent.
Currently a simple useExisting flag was implemented. If on it will use the current hostname value, otherwise it will generate a random UUID.
There are a few issues with this implementation.
The SMBIOS data can not be specified as input. This functionality must be supported since it's present in the current elemental-register implementation and is also important to generate predictable hostnames.
The current implementation of useExisting breaks the elemental-agent --reset workflow. It will not be possible to restore the original hostname while resetting.
It would be better to expand this setting.
For example by copying the current machineName formatting implementation.
Instead of using the existing hostname, it would be wiser to explicitly allow for a DHCP server driven hostname. For example allowing a ${DHCP/Domain} value.
Using the current hostname should be removed completely, as it will no longer be an accurate value after reset and we do not want to persist this information so that the elemental-agent can continue to be (mostly) stateless.
Edit: Since this involves network setups and dependency with DHCP, do not forget to take rancher-sandbox/cluster-api-provider-elemental#28 in consideration.
This issue is about configuring a machine hostname using the
elemental-agent
.Currently a simple
useExisting
flag was implemented. If on it will use the current hostname value, otherwise it will generate a random UUID.There are a few issues with this implementation.
The SMBIOS data can not be specified as input. This functionality must be supported since it's present in the current
elemental-register
implementation and is also important to generate predictable hostnames.The current implementation of
useExisting
breaks theelemental-agent --reset
workflow. It will not be possible to restore the original hostname while resetting.It would be better to expand this setting. For example by copying the current
machineName
formatting implementation.Instead of using the existing hostname, it would be wiser to explicitly allow for a DHCP server driven hostname. For example allowing a
${DHCP/Domain}
value.Using the current hostname should be removed completely, as it will no longer be an accurate value after reset and we do not want to persist this information so that the
elemental-agent
can continue to be (mostly) stateless.Edit: Since this involves network setups and dependency with DHCP, do not forget to take rancher-sandbox/cluster-api-provider-elemental#28 in consideration.