So I’m working on a server from home.
I do a cat /sys/class/net/eth0/operstate
and it says unknown
despite the interface being obviously up, since I’m SSH’ing into the box.
I try to explicitely set the interface up to force the status to say up
with ip link set eth0 up
. No joy, still unknown
.
Hmm… maybe I should bring it down and back up.
So I do ip link set eth0 down
and… I drive 15 miles to work to do the corresponding ip link set eth0 up
50 years using Unix and I’m still doing this… 😥
Or use some kind of molly guard. Or have an OOB management channel.
You’d think you’d learn from your mistakes after one or two of them, not fifty years’ worth…
Don’t be shitty.
In my defense, I just installed the machine. I was configuring it from home after hours.
I’ve configured PAM to not let me login remotely after hours, because I just know that someday I’ll want to fix “just this tiny thing” and I’ll break production because I’m too tired. I clearly need protection from myself, and this is one slice in Dr.Reasons’s Swiss cheese model.
Don’t let the people drag you down, this happens to all of us.
Harsh (to yourself), but fair
Yes, that what you’d think. And then you’ll sit with a blank terminal once again when you did some trivial mistake yet again.
A friend of mine developed a habit (working on a decent sized ISP 20+ years ago) to set up a scheduled reboot for everything in 30 minutes no matter what you’re going to do. The hardware back then (I think it was mostly cisco) had a ‘running conrfig’ and ‘stored config’ which were two separate instances. Log in, set up scheduled reboot, do whatever you’re planning to do and if you mess up and lock yourself out the system will restore to previous config in a while and then you can avoid the previous mistake. Rinse and repeat.
And, personally, I think that’s the one of the best ways to differentiate actual professionals from ‘move fast and break things’ group. Once you’ve locked yourself out of the system literally half way across the globe too many times you’ll eventually learn to think about the next step and failovers. I’m not that much of a network guy, but I have shot myself in the foot enough that whenever there’s dd, mkfs or something similar on the root shell I automatically pause for a second to confirm the command before hitting enter.
And while you gain experience you also know how to avoid the pitfalls, the more important part (at least for myself) is to think ahead. The constant mindset of thinking about processes, connectivity, what you can actually do if you fuck up and so on becomes a part of your workflow. Accidents will happen, no matter how much experience you have. The really good admins just know that something will go wrong at some point in the process and build stuff to guarantee that when you fuck things up you still have availability to fix it instead of calling someone 6 timezones away in the middle of the night to clean up your mess.
Without repeating my other comment. This approach saved my life many times