diff options
author | zsdc <taras@vyos.io> | 2021-12-30 00:41:31 +0200 |
---|---|---|
committer | Kim Hagen <kim@sentrium.io> | 2021-12-30 10:02:26 -0600 |
commit | 1a9c1479044040c64ca6be91835d8cea7004ddff (patch) | |
tree | 9fe7b6f45269808f81d42aa3ed9a26be2cb4e0b7 /src/systemd/vyos-hostsd.service | |
parent | b7b5eecd30c740e49d9a6943a1f0e8099be732eb (diff) | |
download | vyos-1x-1a9c1479044040c64ca6be91835d8cea7004ddff.tar.gz vyos-1x-1a9c1479044040c64ca6be91835d8cea7004ddff.zip |
dhclient: T4121: Fixed resolv.conf generation at early boot stage
In case if a CLI configuration is not available, dhclient cannot add
nameservers to a `resolv.conf` file, because `vyos-hostsd` requires that
an interface be listed in the `set system name-server` option.
This commit introduces two changes:
* `vyos-hostsd` service will not be started before Cloud-Init fetch all
remote data. This is required because all meta-data should be available
for Cloud-Init before any of VyOS-related services start since it is
used for configuration generation.
* the `vyos-hostsd-client` in the `dhclient-script` will be used only if
the `vyos-hostsd` is running. In other words - if VyOS services already
started, dhclient changes `resolv.conf` using `vyos-hostsd`; in other
cases - does this directly.
These changes should protect us from problems with DHCP during system
boot if DHCP is required by third-party utils.
Diffstat (limited to 'src/systemd/vyos-hostsd.service')
-rw-r--r-- | src/systemd/vyos-hostsd.service | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service index b77335778..4da55f518 100644 --- a/src/systemd/vyos-hostsd.service +++ b/src/systemd/vyos-hostsd.service @@ -7,7 +7,7 @@ DefaultDependencies=no # Seemingly sensible way to say "as early as the system is ready" # All vyos-hostsd needs is read/write mounted root -After=systemd-remount-fs.service +After=systemd-remount-fs.service cloud-init.service [Service] WorkingDirectory=/run/vyos-hostsd |