Updating hosts file is super easy! Any sed, echo, vim command will work.
You’re perfectly safe, if all changes only come from the automation. And your code is bug-free.
But in the reality, you might have surprises. Especially when people might change it manually.
My Suggestion? Before making any changes, confirm all customizations are expected. If not, abort the changes with proper alerting.
Don’t make manual changes to the hosts file in your servers.
It would be hard to maintain. If you have to, here are 5 common issues I’d like you to know. And also some tips and free tools included in this post.
Check it out! And share it with your friends, if you find it useful.
When you hand over developers new VM(s), or when you have just created a critical env for your team, remember to be prepared for low disk issues.
If you don’t, it will bite you sooner or later. More annoying, it usually come out as a recurring issue. Evaluating the total support effort, we might get a much bigger number than we thought. Are you feeling the same, my friend?
So how we can make low disk issues less likely to happen? And when it does happen, how we can resolve it faster with less impact?
Say you have issued a command in your servers. Typically the command might either backup something or perform a critical hot fix.
Surely you know the start time of the process. But when it will end? How can you find the execution time, when the process has already been started?
People might manually change critical config files in servers occasionally. For example, /etc/hosts, /etc/hostname, etc.
As an experienced operator, you will remember to backup, before making any changes. Right? What would you do? cp /etc/hosts /etc/hosts.bak.
But is that good enough?