Page MenuHomeVyOS Platform

New implementation of the resolv.conf and hosts update mechanism
Closed, ResolvedPublic

Description

The /etc/resolv.conf and /etc/hosts files are updated by multiple scripts including:

  • "system host-name" script
  • "system static-host-mapping" script
  • DHCP client script

The current solution is a DHCP client mode in host_name.py that allows that script to be called either at commit time or from the DHCP client script. The problem is that it's not a solution: despite complicated logic for updating the data without removing anything, it creates either data loss or a data race.

Typical example of a troublesome situation is when an interface is configured to use DHCP and host name is set in the same commit. This leads to T1540 and similar nasty situations.

A better solution would be to have a single process responsible for updating those files that maintains a message queue so that updates can be done asynchronously.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

dmbaturin triaged this task as Unbreak Now! priority.Aug 20 2019, 4:53 PM
dmbaturin created this task.