I came across an issue where I updated /etc/resolv.conf but name resolution wasn’t working in Cent7. nslookup & host both returned results, but ping did not. After some digging, I found this post which mentioned name service cache daemon. After restarting it, DNS worked properly! So if you update DNS, be sure to also restart NCSD:
sudo systemctl restart ncsd