Page MenuHomeVyOS Platform

Nameservers from DHCP client cannot be used in specific cases
Closed, ResolvedPublicBUG

Description

With the vyos-hostsd and template for resolv.conf, nameservers received via DHCP will be added to the resolv.conf only if an interface is listed in the set system name-server option.
This is good for normal usage, but exist situations when a CLI configuration is not available or a nameserver should be used regardless of what contains CLI config. The first case that we met is deploying in clouds that use a DNS name for Meta-Data (for example, Google Cloud, Equinix Metal). Since a Meta-Data should be fetched before a config will be available, this causes the impossibility of doing this, because of missed nameservers in the resolv.conf.

We need to guarantee that Cloud-Init and other tools can use nameservers during the early boot stage.

The most logical solution for this seems to be having two modes for dhclient:

  1. The current one - configuring via vyos-hostsd.
  2. The fallback - when vyos-hostsd is not available, use the original way to configure resolv.conf,

Additionally, we need to be sure that vyos-hostsd is not started before services like Cloud-Init, otherwise, this will conflict with the set system name-server option.

Details

Difficulty level
Normal (likely a few hours)
Version
1.4, 1.3
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Mentioned In
1.3.4

Event Timeline

zsdc changed the task status from Open to In progress.Dec 29 2021, 7:32 PM
zsdc triaged this task as High priority.
zsdc created this task.
zsdc changed Why the issue appeared? from Will be filled on close to Design mistake.

PR to fix the problem: https://github.com/vyos/vyos-1x/pull/1128
It is compatible with both 1.3 and 1.4, so can be cherry-picked from sagitta to equuleus.

c-po changed the task status from In progress to Needs testing.Dec 31 2021, 5:37 PM
c-po assigned this task to zsdc.

@zsdc was this ever backported to 1.3?