It happens that the local router/DHCPd doesn't provide a domain-name value.
$ hostname -f
hostname: Name or service not known
The /etc/dhcp/dhclient.conf configuration uses gethostname(), which wants to return a FQDN, which fails (because there isn't any).
This is why we don't always have a client-hostname in tincmaster's DHCP leases.
We don't have control over the local DHCPd, so our only solution is to hardcode send host-name in /etc/dhcp/dhclient.conf, templating it using {{ idc_uniq_device_name |replace("_", "-") }} . This has to be handled by the rename_device role and friends.
It happens that the local router/DHCPd doesn't provide a
domain-name
value.The
/etc/dhcp/dhclient.conf
configuration usesgethostname()
, which wants to return a FQDN, which fails (because there isn't any).This is why we don't always have a
client-hostname
in tincmaster's DHCP leases.We don't have control over the local DHCPd, so our only solution is to hardcode
send host-name
in/etc/dhcp/dhclient.conf
, templating it using{{ idc_uniq_device_name |replace("_", "-") }}
. This has to be handled by therename_device
role and friends.