Current Behavior
When the system hostname is changed via YANG (ietf-system:system/hostname), the DHCP client service configuration is not regenerated. The udhcpc process continues advertising the old hostname (option 12) to the DHCP server, so dnsmasq's lease database retains the stale name until the next DHCP renewal triggers a full client restart.
Expected Behavior
A hostname change should cause the DHCP client conf to be regenerated and the client restarted, so the new hostname is advertised in the next DHCP request.
Steps To Reproduce
- Boot device with factory default (hostname
rpi-%m → e.g. rpi-42-a6-03)
- Confirm DHCP lease shows correct hostname on the server
- Change hostname via YANG/CLI
- Observe that
initctl show dhcp-client-eth0 still contains the old hostname
- DHCP server lease retains the old name until client is manually restarted
Additional information
Root cause: dhcp_client_change() in src/confd/src/dhcp-client.c only iterates interfaces present in the sysrepo diff. A pure hostname change produces no DHCP diff, so add() is never called and the Finit service file is not updated.
Fix: subscribe to ietf-system:system/hostname changes and trigger DHCP client conf regeneration for all active DHCP interfaces when it fires.
Current Behavior
When the system hostname is changed via YANG (
ietf-system:system/hostname), the DHCP client service configuration is not regenerated. Theudhcpcprocess continues advertising the old hostname (option 12) to the DHCP server, so dnsmasq's lease database retains the stale name until the next DHCP renewal triggers a full client restart.Expected Behavior
A hostname change should cause the DHCP client conf to be regenerated and the client restarted, so the new hostname is advertised in the next DHCP request.
Steps To Reproduce
rpi-%m→ e.g.rpi-42-a6-03)initctl show dhcp-client-eth0still contains the old hostnameAdditional information
Root cause:
dhcp_client_change()insrc/confd/src/dhcp-client.conly iterates interfaces present in the sysrepo diff. A pure hostname change produces no DHCP diff, soadd()is never called and the Finit service file is not updated.Fix: subscribe to
ietf-system:system/hostnamechanges and trigger DHCP client conf regeneration for all active DHCP interfaces when it fires.