Skip Navigation

After almost half a century, I'm still doing it...

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... đŸ˜„

81 comments
  • Lol I've locked myself out of so many random cloud and remote instances like this that now I always make a sleep chain or a kill timer with tmux/screen.

    Usually like:

    ./risky_dumb_script.sh ; sleep 30 ; ./undo.sh

    Or

    ./risky_dumb.script.sh

    Which starts with a 30 second sleep, and:

    (tmux) sleep 300 ; kill PID

  • A decade and change ago, in a past life, I was tasked with switching SELinux to permissive mode on the majority of systems on our network (multiple hundreds, or we might have gotten above one thousand at that point, I don't recall exactly). This was to be done using Puppet. A large number of the systems, including most of our servers, had already been manually switched to permissive but it wasn't being enforced globally.

    Unfortunately, at that point I was pretty familiar with Puppet but had only worked with SELinux a very few times. I did not correctly understand the syntax of the config file or setenforce and set the mode to ... Something incorrect. SELinux interpreted whatever that was as enforcing mode. I didn't realize what I had done wrong until we started getting alerts from throughout the network. Then I just about had a panic attack when I couldn't login to the systems and suddenly understood the problem.

    Fortunately, it's necessary to reboot a system to switch SELinux from disabled to any other mode, so most customer facing systems were not impacted. Even more fortunately, this was done on a holiday, so very few customers were there to be inconvenienced by the servers becoming inaccessible. Even more fortunately, while I was unable to access the systems that were now in enforcing mode, the Puppet agent was apparently still running ... So I reversed my change in the manifest and, within half an hour, things were back to normal (after some service restarts and such).

    When I finally did correctly make the change, I made sure to quintuple check the syntax and not rush through the testing process.

    edit: While I could have done without the assault on my blood pressure at the time, it was an effective demonstration of our lack of readiness for enforcing mode.

  • Every network engineer must lock themselves out of a node at some point, it is a rite of passage.

  • Remember what Bruce Lee said:

    I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.

81 comments