22 points

Tbh there is nothing more taxing on my mental health than doing maintenance on our production servers.

permalink
report
reply
35 points

this week i sudo shutdown now our main service right at the end of the workday because i tought it was a local terminal.

not a bright move.

permalink
report
reply
39 points

There’s a package called molly-guard which will check to see if you are connected via ssh when you try to shut it down. If you are, it will ask you for the hostname of the system to make sure you’re shutting down the right one.

Very usefull program to just throw onto servers.

permalink
report
parent
reply
14 points

nice. got it installed to test it out

permalink
report
parent
reply
12 points

We got the Trojan in, let’s move move move!

permalink
report
parent
reply
8 points

Happens to everyone

Just having a multitude of terminals open with a mix of test environment and (just for comparison) an open connection to the production servers…

We were at a fair/exhibition once and on the first day people working on an actual customer project asked us, if they could compare with our code.
Obviously they flashed the wrong PLC and we were stuck dead at the first hours of the exhibition.
I still think that this place was cursed, as we also had to do multiple re-soldering of some connections of our robot and the sherry on top was the system flash dying - where I had fucked up, because I just finished everything late at night and didn’t made a complete backup of everything.
But it seems, if luck runs out, you lose on all fronts.

At least I was able to restore everything in 20mins. Which must be some kind of record.
But I was shaking so much from the stress, that I couldn’t efficiently type anymore and was lucky to have a colleague to just calmly enter what I told him to and with that we’re able to get the show case up and running again.

Well, at least the beer afterwards tasted like the liquid of the gods

permalink
report
parent
reply
9 points

Oops.

Since you’re using sudo, I suggest setting different passwords on production, remote, and personal systems. That way, you’ll get a password error before a tired/distracted command executes in the wrong terminal.

permalink
report
parent
reply
17 points
*

i have different passwords but i type them so naturally it didnt even register.

“wrong password.”

“oh, i’m on the server, here’s the right password:”

“no wait”

permalink
report
parent
reply
8 points

I was making after hours config changes on a pair of mostly-but-not-entirely redundant Cisco L3 switches which basically controlled the entire network at that location. While updating the running configs I mixed up which ssh session was which switch and accidentally gave both switches the same IP address, and before I noticed the error I copied the running config to the startup config.

Due to other limitations and the fact that these changes were to fix DNS issues (and therefore I couldn’t rely on DNS to save me) I ended up keeping sshing in by IP until I got the right switch and trying to make the change before my session died due to dropped packets from the mucked up network situation I had created. That easily added a couple of hours of cleanup to the maintainence I was doing

permalink
report
parent
reply
6 points

Best thing I did was change my shell prompt so I can easily tell when it isn’t my machine

permalink
report
parent
reply
7 points
*

you mean the user@machine:$ thing? how do you have yours?

permalink
report
parent
reply
4 points

Change the color too

permalink
report
parent
reply
3 points

Correct!
I put a little Home icon on mine using NerdFonts.
If you are using ZSH or Fish you can do much more

permalink
report
parent
reply
27 points

I have more than once typed shutdown instead of reboot when working on a remote machine… always fun

permalink
report
reply
20 points
*

Make an alias for when you type shutdown it does restart and if you want to shutdown make an alias that goes like

Yesireallywanttoshutdown

permalink
report
parent
reply
7 points

Networking, we had a remote office in Europe (I’m in the US) and wanted to reset a phone. Phone was on port 10 of the Cisco switch, port 1 went to the firewall (not my design, already in place).

Helping my coworker, I tell her to shut port 10.

Shut port 1, enter.

Ok… office is offline and on another continent…

permalink
report
parent
reply
6 points

i have the horrible habit of using shutdown now because of my personal computers. a lot more fun.

permalink
report
parent
reply
2 points
*

Not sure if this will help you, but I always do shutdown and then think about whether I want to do -r or -h. I’m sure it won’t help 🙂

permalink
report
parent
reply
1 point

Ipmi is your friend.

permalink
report
parent
reply
42 points

Just had to restart our main MySQL instance today. Had to do it at 6am since that’s the lowest traffic point, and boy howdy this resonates.

2 solid minutes of the stack throwing 500 errors until the db was back up.

permalink
report
reply
2 points

Is that the same database my user couldn’t connect to today?

permalink
report
parent
reply
20 points

If you have the bandwidth… it is absolutely worth it to invest in a maintenance mode for your system, just check some flat file on disk for a flag before loading up a router or anything and then, if it’s engaged, just send back a static html file with ye olde “under construction” picture.

permalink
report
parent
reply
4 points
*

That’s not really… possible at this point. We have thousands of customers (some very large ones, like A——n and G—-e and Wal___t) with tens or hundreds of millions of users, and even at lowest traffic periods do 60k+ queries per second.

This is the same MySQL instance I wrote about a while ago that hit the 16TiB table size limit (due to ext4 file system limitations) and caused a massive outage; worst I’ve been involved in during my 26 year career.

Every day I am shocked at our scale, considering my company is only like 90 engineers.

permalink
report
parent
reply
14 points

Bonus points if your static site sends a 503 with a retry after header.

permalink
report
parent
reply
9 points

… and you’re updating it remotely

permalink
report
reply
3 points
*

… and you just changed a very important configuration file you intended to double check next

permalink
report
parent
reply
3 points

and it that moment we all squint our eyes and become homer simpson

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.7K

    Monthly active users

  • 811

    Posts

  • 13K

    Comments