Comment On Production Promote

"John, it's about time I showed you how to do a production install," Dave said. [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Re: Production Promote

2010-08-12 09:02 • by The Nerve (unregistered)
I accidentally deleted the rest of

No worries. I can restore the comment from backup!

TRWTF is a brand new hire "training" the replacement.

Re: Production Promote

2010-08-12 09:07 • by Arancaytar
When deleting something takes even a tiny bit longer than you expect, that means you are deleting more than you expected. CTRL-C!

Something like this happened to me just last night, but fortunately all I deleted was the local copy of a CVS repository, losing some work but not tons and tons of data.

Re: Production Promote

2010-08-12 09:07 • by John (unregistered)
It always take an event like this for people to realize they *need* to test their backups every now and then... You're bound to have something like this happen if you don't.

Re: Production Promote

2010-08-12 09:08 • by ObiWayneKenobi
I would wager, sadly, that this is how the majority of "mission critical" systems operate. As always, the root cause is not the developer but incompetent management who have no idea of the right ways to do things.

Re: Production Promote

2010-08-12 09:08 • by Someone You Know
So we've moved on from unicorns to LOLTrek. I'm not sure if that's an improvement or not.

Re: Production Promote

2010-08-12 09:09 • by ldnunes (unregistered)
No, TRWTF is the lame Star Trek joke in the gif.

Re: Production Promote

2010-08-12 09:11 • by Guest (unregistered)
And nobody thought, in the history of that company, of writing a simple script which, once working, would allways delete the right tree (maybe even do some sanity-checks before doing so) and automatically start the rebuild too ?

Re: Production Promote

2010-08-12 09:11 • by Someone You Know
Remy Porter:
The backup maintenance task, also Dave's responsibility, had fallen out of the scheduler...


Rookie mistake. Never shake the scheduler on the production server.

Re: Production Promote

2010-08-12 09:11 • by Drew (unregistered)
How hard would it be to drop the stupid procedures as part of the script? Srsly. If any of your daily tasks takes more than one step, you are inviting whoopsies.

Re: Production Promote

2010-08-12 09:11 • by Fenix (unregistered)
One word: Ouch!

It's stories like these that make you sit up in disbelief at the practices of some individuals and make you want to go over your disaster recovery plan.

Captcha: Plaga - as in Dave was a plaga to his former company.

Re: Production Promote

2010-08-12 09:16 • by ObiWayneKenobi
The thing I've noticed is that most of the time, there's no time or budget to HAVE a disaster recovery plan, so there's either a half-assed one put in place, or nothing at all.

Again, management is the problem.

Re: Production Promote

2010-08-12 09:16 • by Jaime
Where I work, our deployment processes are begging for this to happen. The previous manager demanded that all deployment steps be executed by the user, scripting or automating the steps was considered obfuscation and not allowed. So, we regularly had deployments that involved copying hundreds of artifacts to productions systems and manipulating them by hand. Only very recently have I been able to convince management that an escrowed script is way more reliable and testable than a piece of paper.

BTW, the previous manager's justification for no scripts was that the developer could change a script after testing, but the deployment plan with individual steps could be printed out and therefore made unchangable. Apparently the manager had not heard of file-system security.

Re: Production Promote

2010-08-12 09:16 • by Sam (unregistered)
Haha, from the source code:

<!-- Dave whipped around in the chair so quickly that he sliced his arm off on the edge of a server rack. He screamed as blood pumped from the stump; John screamed. Suddenly, Dave stopped screaming, the fake blood stopped pumping, he grabbed John by the collar, and said, "And *that's why you have a robust install process for production!*" -->

Also

<!-- And that's why you don't teach people lessons! Sorry for the pop-culture extravaganza. Okay, not really. --><!-- Easy Reader Version: See Dave. See Dave perform without a net. See Dave break his neck. See Phil get a promotion. -->

TRWTF is who is Phil?!

Re: Production Promote

2010-08-12 09:17 • by Incourced
Hmm. An Oncoming Semi? Isn't that a contradiction in terms?

Re: Production Promote

2010-08-12 09:18 • by SARUMANATEE (unregistered)
317457 in reply to 317443
Arancaytar:
When deleting something takes even a tiny bit longer than you expect, that means you are deleting more than you expected. CTRL-C!


Nononono. Wait for it to finish then CTRL-Z. Cooler heads prevail.

Re: Production Promote

2010-08-12 09:20 • by ObiWayneKenobi
317458 in reply to 317455
Sam:

TRWTF is who is Phil?!


Did you even read the story? Phil was Dave's replacement. He also wasn't a new hire, evidently, but another developer on the team who got promoted to the role Dave was in (that part was to "The Nerve" who asked why the new guy would train a replacement).

Re: Production Promote

2010-08-12 09:20 • by Matt Westwood (unregistered)
317459 in reply to 317448
Guest:
And nobody thought, in the history of that company, of writing a simple script which, once working, would allways delete the right tree (maybe even do some sanity-checks before doing so) and automatically start the rebuild too ?

+1

Re: Production Promote

2010-08-12 09:21 • by JamesQMurphy
So... I guess John wasn't watching too closely either.

Re: Production Promote

2010-08-12 09:22 • by HAL (unregistered)
"...just what do you think you're doing, Dave?"

Re: Production Promote

2010-08-12 09:23 • by The Nerve (unregistered)
As bad as this sounds, nothing beats the thrill of performing without a net.

Re: Production Promote

2010-08-12 09:24 • by Grunt (unregistered)
TRWTF is doing stuff like that interactively and auto-committing the transaction (or using a system without transactions in the first place).

CAPTCHA: "persto" - Presto! Rolled that back for you.

Re: Production Promote

2010-08-12 09:24 • by ObiWayneKenobi
317464 in reply to 317461
HAL:
"...just what do you think you're doing, Dave?"


I'm sorry, Dave. I can't let you do that.

Re: Production Promote

2010-08-12 09:24 • by anon (unregistered)
317465 in reply to 317455
Sam:
Haha, from the source code:

<!-- Dave whipped around in the chair so quickly that he sliced his arm off on the edge of a server rack. He screamed as blood pumped from the stump; John screamed. Suddenly, Dave stopped screaming, the fake blood stopped pumping, he grabbed John by the collar, and said, "And *that's why you have a robust install process for production!*" -->

Also

<!-- And that's why you don't teach people lessons! Sorry for the pop-culture extravaganza. Okay, not really. --><!-- Easy Reader Version: See Dave. See Dave perform without a net. See Dave break his neck. See Phil get a promotion. -->

TRWTF is who is Phil?!


It's a new author, I think. I like him.

Re: Production Promote

2010-08-12 09:25 • by Matt Westwood (unregistered)
317466 in reply to 317461
HAL:
"...just what do you think you're doing, Dave?"

+100

Re: Production Promote

2010-08-12 09:25 • by zelmak
317467 in reply to 317460
JamesQMurphy:
So... I guess John wasn't watching too closely either.


I know, right? I mean, there were two of them ... they should have been practicing XP!!

Oh, wait ... they were ... eXperimenting with Production.

Re: Production Promote

2010-08-12 09:26 • by Remy Porter
317468 in reply to 317463
Grunt:
TRWTF is doing stuff like that interactively and auto-committing the transaction (or using a system without transactions in the first place).


Standard SQL- DDL statements never happen in a transaction. "DROP TABLE" can't be rolled back.

Re: Production Promote

2010-08-12 09:27 • by Tekiegreg (unregistered)
317469 in reply to 317450
^^^ This, I'd extend the script to first make a backup before deployment as well.

Re: Production Promote

2010-08-12 09:28 • by Severity One
317470 in reply to 317444
John:
It always take an event like this for people to realize they *need* to test their backups every now and then... You're bound to have something like this happen if you don't.

Backup testing was probably one of Dave's responsibilities, too.

Still, I think management is to blame. They usually are.

Re: Production Promote

2010-08-12 09:29 • by Cidolfas (unregistered)
I kept waiting for a John Dies At The End joke.

Re: Production Promote

2010-08-12 09:32 • by frits
Whoa! I absentmindedly selected some text and the next thing you know Kirk and Data are doing the old front and back with a unicorn.

Re: Production Promote

2010-08-12 09:32 • by DBA (unregistered)
Be afraid. Be very afraid.

Re: Production Promote

2010-08-12 09:36 • by pitchingchris
317474 in reply to 317469
kinda ironic that I saw an advertisement today for Red Gate's SQL Source Control tool that can be integrated into Enterprise manager. I'm sure stuff like this happens all the time.

Re: Production Promote

2010-08-12 09:38 • by pitchingchris
317475 in reply to 317473
click on gigabytes

Re: Production Promote

2010-08-12 09:38 • by Darknite (unregistered)
We have all made screw ups, it seems there was not proper Diaster Recovery in place, and I actually feel sorry for Dave.

Of course standard practive is usually make a backup before doing a push to live.

Re: Production Promote

2010-08-12 09:39 • by Grunt (unregistered)
317477 in reply to 317468
Remy Porter:
Standard SQL- DDL statements never happen in a transaction. "DROP TABLE" can't be rolled back on all databases.

FTFY

It really depends on your system; Postgres has Transactional DDL for example. But that just reinforces my point: If your system doesn't allow you to rollback DDL, you simply shouldn't issue (inherently untested) DDL commands interactively. Well, not on production anyway.

Re: Production Promote

2010-08-12 09:42 • by Don (unregistered)
317478 in reply to 317445
ObiWayneKenobi:
I would wager, sadly, that this is how the majority of "mission critical" systems operate. As always, the root cause is not the developer but incompetent management who have no idea of the right ways to do things.

Well.. actually.. I find it's usually the management that ARE TOLD the right way to do things; but steadfastly deny that it's important, since "it never caused a problem before". Once upon a time I had a manager that loved reading 'Executive IT magazines' - you know, those ones written by people with MBA's and no IT knowledge whatsoever.
Thick as a couple of planks when it came to IT, but it was the 90's and nobody cared so long as the manager could make Gantt charts. I had walked into his office the previous morning to discuss the budget for a disaster recovery cold site, since we were running 'mission critical' systems for our international business.
'No time today, come back tomorrow'

So, with some quotes in hand and a few idea's on how we would keep data synchronized; I walked into the breach.

'Sorry Donny, we'll have to pass on the DR Cold Site. Was reading an article last night about how it's a real white elephant, and we don't have the money right now for things that are not critical path'
[Which critical path usually meant the CEO's new private jet]

A few months later .. yeah it happened. Our systems died horribly. Seems _I_ was supposed to advise on ways around this, and hey, why didn't we have a Cold Storage that could have been fired up in this case..

I think he still works there; and still reads 'Executive IT Management' magazines.

Re: Production Promote

2010-08-12 09:47 • by Deezil (unregistered)
The first lines of any code for a replacement stored procedure should be to see if an old one exists, and drop it if it does.

CAPTCHA: odio(-delayheehooo)

Re: Production Promote

2010-08-12 09:47 • by Jeff (unregistered)
317480 in reply to 317463
"TRWTF is doing stuff like that interactively and auto-committing the transaction (or using a system without transactions in the first place). "

I'm assuming the database is Oracle, given the use of Enterprise manager.

DDL in Oracle auto-commits. No rollback.

Re: Production Promote

2010-08-12 09:47 • by just some guy (unregistered)
Why not take a backup immediately before deleting anything on production? Just a thought.

Re: Production Promote

2010-08-12 09:48 • by AttentionDeprivedDweeb (unregistered)
Me: I can haz first post?
Alex: No! LOL *deletes post*

Re: Production Promote

2010-08-12 09:51 • by Yazeran
317483 in reply to 317468
Remy Porter:
Grunt:
TRWTF is doing stuff like that interactively and auto-committing the transaction (or using a system without transactions in the first place).


Standard SQL- DDL statements never happen in a transaction. "DROP TABLE" can't be rolled back.


Gah!

Thank god for using postgres!:

=>CREATE TABLE test (id serial, name VARCHAR(32));
CREATE TABLE
=>INSERT INTO test (name) VALUES ('testval');
INSERT 0 1
=>SELECT * FROM test;
id | name
----+---------
1 | testval
(1 row)

=>BEGIN;
BEGIN
=>DROP TABLE test;
DROP TABLE
=> SELECT * FROM test;
ERROR: relation "test" does not exist
=> ROLLBACK;
ROLLBACK
=> SELECT * FROM test;
id | name
----+---------
1 | testval
(1 row)

Re: Production Promote

2010-08-12 09:52 • by chron3
hahaha... The lack of backups is a huge WTF... And it's not like that doesn't happen all over the place I suspect...

Worked at a place once where we had 'nightly backups, that get rolled into weekly backups, then to monthly'...

Until the first time we actually needed one, only to find that, yes, each night a backup file was created, and at the end of a week, the weekly was created, etc, etc, except that they were all empty. A beautiful folder tree of empty files.

Seems that once all the scheduling logic had been worked out and was behaving, the responsible party had neglected to uncomment the part of the script where all the real backup work was done.

Re: Production Promote

2010-08-12 09:55 • by another dude (unregistered)
317485 in reply to 317446
Someone You Know:
So we've moved on from unicorns to LOLTrek. I'm not sure if that's an improvement or not.
Oh, there's still unicorns. Just click the word "data" near the image.

Re: Production Promote

2010-08-12 09:55 • by NickR (unregistered)
317486 in reply to 317468
Remy Porter:
Grunt:
TRWTF is doing stuff like that interactively and auto-committing the transaction (or using a system without transactions in the first place).


Standard SQL- DDL statements never happen in a transaction. "DROP TABLE" can't be rolled back.


Yep. What he SHOULD have done was put a DDL trigger on the production server to prevent people from dropping important stuf... oh wait... this was SQL 2000 right? Scratch that idea then.

Re: Production Promote

2010-08-12 10:03 • by Skilldrick (unregistered)
Daisy Daisy,
Give me your answer do!
I'm half crazy,
All for the love of you!
It won't be a stylish marriage,
I can't afford a carriage,
But you'll look sweet on the seat
Of a bicycle built for two !

Re: Production Promote

2010-08-12 10:05 • by Hugo (unregistered)
Nice easter egg in the picture... (wait for a minute or so)

Re: Production Promote

2010-08-12 10:09 • by Someone who can't be bothered to login from work (unregistered)
317489 in reply to 317477
Grunt:
Remy Porter:
Standard SQL- DDL statements never happen in a transaction. "DROP TABLE" can't be rolled back on all databases.

FTFY

It really depends on your system; Postgres has Transactional DDL for example. But that just reinforces my point: If your system doesn't allow you to rollback DDL, you simply shouldn't issue (inherently untested) DDL commands interactively. Well, not on production anyway.


Oracle has had the "FLASHBACK TABLE foo TO BEFORE DROP" command since 10g.

Still doesn't help if you did a TRUNCATE TABLE of course.

Re: Production Promote

2010-08-12 10:09 • by satancom (unregistered)
Thats a classic, its like leaving the 'where' statement out of an update querey.

Re: Production Promote

2010-08-12 10:13 • by Rob Colburn (unregistered)
Ah, I feel bad for this guy. Most of these stories involve arrogance or unwillingness to learn / stupidity. And, while the latter is there for sure - we've all made mistakes - I've accidentally deleted a file or two.

But, it is pretty bad not to be backing up data worth hundreds of thousands of dollars.

Re: Production Promote

2010-08-12 10:14 • by anon (unregistered)
317492 in reply to 317488
You mean the one everyone else has noticed ad nauseum?
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Add Comment