Skip to content
Snippets Groups Projects
Commit 87c84ebd authored by Julien Leduc's avatar Julien Leduc
Browse files

Some pod do not exist yet therefore /etc/hosts file is incomplete if built at container start.

parent 03b37b6f
Branches
Tags
No related merge requests found
......@@ -28,12 +28,6 @@ echo -n "Fixing reverse DNS for $(hostname) for xrootd: "
sed -i -c "s/^\($(hostname -i)\)\s\+.*$/\1 $(hostname -s).$(grep search /etc/resolv.conf | cut -d\ -f2) $(hostname -s)/" /etc/hosts
echo "DONE"
echo -n "Adding services in /etc/hosts to lower the load on kubernetes DNS: "
for servicename in ctaeos ctafrontend kdc; do
ping -c1 -W1 ${servicename} | grep ^PING | awk '{print $3 " " $2}' | sed -e "s/[()]//g;s/$/ ${servicename}/"
done | grep -v $(hostname -f) >> /etc/hosts
echo "DONE"
# Not needed anymore, keep it in case it comes back
#echo -n "Yum should resolve names using IPv4 DNS: "
#echo "ip_resolve=IPv4" >> /etc/yum.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment