Fix systemd-resolved race conditions
1. systemd-resolved should be removed/disabled before the symlink is 2. `domain` is redundant with the FQDN and replaced by `search` 3. correct resolv.conf EOL formatting issue Change-Id: If7f8037c0623d9b1eb43171f09e492985a66b351
This commit is contained in:
parent
c7366c8ecf
commit
704e818eda
|
@ -1,14 +1,16 @@
|
|||
# Disable overwriting our resolv.conf
|
||||
#
|
||||
if [ -h /etc/resolv.conf ]; then
|
||||
log "=== Removing resolv.conf symlink ==="
|
||||
rm -f /etc/resolv.conf
|
||||
fi
|
||||
|
||||
systemctl disable systemd-resolved.service
|
||||
systemctl stop systemd-resolved.service
|
||||
systemctl mask systemd-resolved.service
|
||||
|
||||
if [ -h /etc/resolv.conf ]; then
|
||||
log "=== Removing resolv.conf symlink ==="
|
||||
rm -f /etc/resolv.conf
|
||||
touch /etc/resolv.conf
|
||||
fi
|
||||
|
||||
CURATED_DIRS=(
|
||||
/etc/kubernetes
|
||||
/var/lib/etcd
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
options timeout:1 attempts:1
|
||||
domain {{ config.get_first('Genesis:domain', 'KubernetesNode:domain', default='local') }}
|
||||
search {{ config.get_first('Genesis:domain', 'KubernetesNode:domain', default='local') }}
|
||||
|
||||
nameserver {{ config['KubernetesNetwork:dns.service_ip'] }}
|
||||
{% for server in config['KubernetesNetwork:dns.upstream_servers'] | default([]) %}
|
||||
nameserver {{ server }}
|
||||
{%- endfor %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue