talos icon indicating copy to clipboard operation
talos copied to clipboard

DHCP client: add an option to disable hostname request

Open smira opened this issue 3 years ago • 2 comments

OpenStack platform provides network configuration with the hostname and enables DHCP for eth0.

Talos prefers operator-based (e.g. DHCP) resources over platform resources, so DHCP hostname overrides OpenStack (platform) hostname.

To fix this issue, we should offer an option for DHCP to skip sending hostname request (and not setting hostname via DHCP at all).

OpenStack platform should set this option when a link is configured for DHCP, but OpenStack platform provides its own hostname.

smira avatar Sep 30 '22 10:09 smira

(it's not required to expose this in the machine config)

smira avatar Sep 30 '22 10:09 smira

sample network config:

"network_json": {
   "links": [
    {
     "ethernet_mac_address": "fa:16:3e:7e:0f:51",
     "id": "tapc5a8eea1-eb",
     "mtu": 1450,
     "type": "ovs",
     "vif_id": "c5a8eea1-eb06-4c0e-9de3-4a1f39d5a26c"
    }
   ],
   "networks": [
    {
     "id": "network0",
     "link": "tapc5a8eea1-eb",
     "network_id": "d8b16a08-5995-49bb-8904-5ae2cde882c1",
     "type": "ipv4_dhcp"
    }
   ],
   "services": [
    {
     "address": "10.171.10.1",
     "type": "nameserver"
    },
    {
     "address": "10.171.10.2",
     "type": "nameserver"
    }
   ]
  }

smira avatar Sep 30 '22 10:09 smira