Page MenuHomeVyOS Platform

hostfile-update missing line feed
Closed, ResolvedPublicBUG

Description

If we have configured DHCP server with hostfile-update option, first record client won't work, because added line have next view

# From DHCP and "system static host-mapping"100.64.255.101	 ubuntu	 #on-dhcp-event 0:c:29:e3:86:1d

Reproducing

set service dhcp-server hostfile-update
set service dhcp-server shared-network-name dhcpexample authoritative
set service dhcp-server shared-network-name dhcpexample subnet 100.64.255.0/24 default-router '100.64.255.2'
set service dhcp-server shared-network-name dhcpexample subnet 100.64.255.0/24 dns-server '1.1.1.1'
set service dhcp-server shared-network-name dhcpexample subnet 100.64.255.0/24 lease '86400'
set service dhcp-server shared-network-name dhcpexample subnet 100.64.255.0/24 range 0 start '100.64.255.100'
set service dhcp-server shared-network-name dhcpexample subnet 100.64.255.0/24 range 0 stop '100.64.255.199'

Details

Difficulty level
Normal (likely a few hours)
Version
1.2-rolling-201909220118
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Unknown Object (User) created this task.Sep 23 2019, 2:03 PM
Unknown Object (User) added a comment.Sep 23 2019, 2:48 PM

Also exist additional issue, if we add system static host-mapping all dhcp records will be erased.

vyos@vyos-rtr01# sudo cat /etc/hosts
...
# From DHCP and "system static host-mapping"
100.64.255.102	 ubuntu	 #on-dhcp-event 0:c:29:e3:86:1d

add static-mapping record

vyos@vyos-rtr01# set system static-host-mapping host-name Test01 inet 100.64.255.120
vyos@vyos-rtr01# commit
vyos@vyos-rtr01# sudo cat /etc/hosts
...
# From DHCP and "system static host-mapping"
100.64.255.120	Test01
Unknown Object (User) changed Difficulty level from Easy (less than an hour) to Normal (likely a few hours).Sep 23 2019, 2:49 PM
Unknown Object (User) claimed this task.Sep 24 2019, 4:09 PM
Unknown Object (User) added a comment.Sep 24 2019, 5:03 PM

PR https://github.com/vyos/vyos-1x/pull/137, using vyos-hostsd-client instead of typical adding record to /etc/hosts

syncer changed the task status from Open to Backport candidate.Nov 16 2019, 11:40 PM
syncer reassigned this task from Unknown Object (User) to jestabro.
syncer triaged this task as Normal priority.
syncer moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
syncer moved this task from Needs Triage to Backlog on the VyOS 1.2 Crux (VyOS 1.2.4) board.