summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node_dnsmasq
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-21 22:17:33 -0700
committerGitHub <noreply@github.com>2017-09-21 22:17:33 -0700
commit8c4380f5f6613abcc4c9b7916914ad88bde9c1d1 (patch)
treef5726291819013c84227606a92a2f943bd1284c1 /roles/openshift_node_dnsmasq
parent2adb0ebeb523daa5c3b1b8fd4bf77d679c5bd5d7 (diff)
parentafb74ff054ff5743998e2611cab83960710920de (diff)
downloadopenshift-8c4380f5f6613abcc4c9b7916914ad88bde9c1d1.tar.gz
openshift-8c4380f5f6613abcc4c9b7916914ad88bde9c1d1.tar.bz2
openshift-8c4380f5f6613abcc4c9b7916914ad88bde9c1d1.tar.xz
openshift-8c4380f5f6613abcc4c9b7916914ad88bde9c1d1.zip
Merge pull request #5433 from sdodson/resolvconf
Automatic merge from submit-queue Ensure valid search on resolv.conf On cluster without internal name resolution there will be no `search XXX` on /etc/resolv.conf at all, thus this script will fail to add an entry for `cluster.local`. Forward ports #5398
Diffstat (limited to 'roles/openshift_node_dnsmasq')
-rwxr-xr-xroles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
index 61d2a5b51..df02bcf0e 100755
--- a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
+++ b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
@@ -114,6 +114,8 @@ EOF
echo "nameserver "${def_route_ip}"" >> ${NEW_RESOLV_CONF}
if ! grep -q 'search.*cluster.local' ${NEW_RESOLV_CONF}; then
sed -i '/^search/ s/$/ cluster.local/' ${NEW_RESOLV_CONF}
+ elif ! grep -qw search ${NEW_RESOLV_CONF}; then
+ echo 'search cluster.local' >> ${NEW_RESOLV_CONF}
fi
cp -Z ${NEW_RESOLV_CONF} /etc/resolv.conf
fi