Skip to content

Commit d73fcd5

Browse files
authored
Remove systemd-resolved and configure DNS consistently (#320)
1 parent 05be55a commit d73fcd5

7 files changed

Lines changed: 12 additions & 16 deletions

File tree

cmd/install.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ func (i *installer) writeResolvConf() error {
166166
const f = "/etc/resolv.conf"
167167
i.log.Info("write configuration", "file", f)
168168
// Must be written here because during docker build this file is synthetic
169-
// FIXME enable systemd-resolved based approach again once we figured out why it does not work on the firewall
170-
// most probably because the resolved must be running in the internet facing vrf.
171-
// ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
172-
// in ignite this file is a symlink to /proc/net/pnp, to pass integration test, remove this first
173169
err := i.fs.Remove(f)
174170
if err != nil {
175171
i.log.Info("config file not present", "file", f)

debian/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ RUN set -ex \
7676
socat \
7777
sudo \
7878
systemd \
79+
systemd-resolved- \
7980
systemd-sysv \
8081
systemd-timesyncd \
8182
tcpdump \

debian/context/kernel-installation.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ if [ "${ID}" = "ubuntu" ] ; then
1414
https://kernel.ubuntu.com/mainline/${UBUNTU_MAINLINE_KERNEL_VERSION}/amd64/
1515

1616
apt-get install --yes \
17-
systemd-resolved \
1817
/tmp/linux-image* \
1918
/tmp/linux-modules* \
2019
intel-microcode
21-
# Ubuntu still requires it
22-
systemctl enable systemd-resolved
2320
else
2421
echo "Debian - Install kernel"
2522

test/inputs/firewall.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ nics:
6161
name: null
6262
neighbors: []
6363
ntp_servers:
64-
- address: 1.pool.ntp.org
64+
- address: 1.pool.ntp.org
65+
dns_servers:
66+
- ip: 8.8.4.4

test/inputs/goss.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,11 @@ file:
6565
exists: true
6666
contents:
6767
- "NTP=1.pool.ntp.org"
68-
"/etc/systemd/resolved.conf.d/dns.conf":
69-
exists: true
70-
contents:
71-
- DNS=8.8.8.8
7268
{{ end }}
7369
"/etc/resolv.conf":
7470
exists: true
7571
contents:
76-
- nameserver 8.8.8.8
72+
- nameserver 8.8.4.4
7773
{{ end }}
7874
{{ if eq .Env.MACHINE_TYPE "firewall" }}
7975
"/etc/hostname":
@@ -93,6 +89,10 @@ file:
9389
exists: true
9490
contents:
9591
- pool 1.pool.ntp.org iburst
92+
"/etc/resolv.conf":
93+
exists: true
94+
contents:
95+
- nameserver 8.8.4.4
9696
{{ end }}
9797
service:
9898
{{ if eq .Env.OS "almalinux" }}

test/inputs/machine.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ nics:
3636
ntp_servers:
3737
- address: 1.pool.ntp.org
3838
dns_servers:
39-
- ip: 8.8.8.8
39+
- ip: 8.8.4.4

test/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
set -ex
44

55
echo "copy input files and goss"
6-
scp -o StrictHostKeyChecking=no -i ./key ./inputs/* "root@${IP}":/
6+
scp -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i ./key ./inputs/* "root@${IP}":/
77

88
echo "do machine test"
99

1010
# somehow chrony@vrf104009 needs a double restart to work
11-
ssh -o StrictHostKeyChecking=no -i ./key "root@${IP}" <<EOF
11+
ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i ./key "root@${IP}" <<EOF
1212
set -e
1313
MACHINE_TYPE=${MACHINE_TYPE} /prepare.sh
1414
# install go fails in a vm because grub-install will always fail.

0 commit comments

Comments
 (0)