Page MenuHomePhabricator

Kill the labtest $realm
Closed, ResolvedPublic

Description

Commit d95e13021727f5ecfe539ec46a4431747453d564 introduced another realm to our puppet repository, "labtest". I find this a very unfortunate construct — labtest hosts are not, by any definition of $realm, a separate realm. This is a dangerous pattern to follow, as these hosts are production hosts with production-level network and authentication access, for which $realm != production.

More practically speaking, it's a very ugly and non-DRY way of writing code and has resulted, among other things, to duplication of structures and code in a number of places — and in many cases, in divergence already. I was fixing our exim config today, and encountered modules/standard/templates/mail/exim4.minimal.labtest.erb, a pristine copy of production's introduced with 762a25bfbf57a0a3ff441eb2b55b38a596bc3189. etc. that I would have to manually keep in sync. Copying identical files around and keeping them in sync manually is never the right solution.

Before filing this task, it took me less than 5 minutes to find another place of duplication, network::constants, which has even resulted into divergence already that will soon cause some monitoring breakage: 47a0be200d90142564180014558627cc75549684 did not notice or update neon's references for the labtest realm, and you really can't blame them for that.

Let's just please get rid of the labtest realm ASAP.

Event Timeline

faidon created this task.Oct 20 2016, 11:26 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 20 2016, 11:26 AM

No objection here, T146150: Undo labtest realm hacks already existed.

Ah! Sorry for missing that! @chasemp, is that something that the Cloud-Services team can and/or will do?

sure yeah, it's been hellfire and brimstone for a bit here recently. Post-thanksgiving I expect? We are still untangling knots from (stage 1) of the storage migration, madhu is gone for a month and etc.

Sure, I'm just making sure that we're not waiting for each other :)

chasemp assigned this task to Andrew.Nov 29 2016, 3:26 PM

Change 324220 had a related patch set uploaded (by Andrew Bogott):
Remove labtest realm checks from wikitech configs

https://gerrit.wikimedia.org/r/324220

Change 324220 merged by Andrew Bogott:
Remove labtest realm checks from wikitech configs

https://gerrit.wikimedia.org/r/324220

Change 324233 had a related patch set uploaded (by Andrew Bogott):
Abolish labtest realm.

https://gerrit.wikimedia.org/r/324233

Change 324255 had a related patch set uploaded (by Andrew Bogott):
labtest: smtp servers should be the same as in codfw

https://gerrit.wikimedia.org/r/324255

Change 324255 merged by Andrew Bogott:
labtest: smtp servers should be the same as in codfw

https://gerrit.wikimedia.org/r/324255

Change 324233 merged by Andrew Bogott:
Abolish labtest realm.

https://gerrit.wikimedia.org/r/324233

These are great to see ­­­— many thanks to both of you!

Andrew closed this task as Resolved.Nov 29 2016, 10:51 PM

I've removed all the labtest realm checks.

Change 324755 had a related patch set uploaded (by Faidon Liambotis):
puppetmaster: remove hiera for the labtest realm

https://gerrit.wikimedia.org/r/324755

Change 324755 abandoned by Alexandros Kosiaris:
puppetmaster: remove hiera for the labtest realm

Reason:
Indeed, the per host settings are still used and are unrelated to the labtest realm's existence. My comment in the code back then was probably illconceived

https://gerrit.wikimedia.org/r/324755

I still see modules/standard/templates/mail/exim4.minimal.labtest.erb and modules/puppetmaster/files/labtest.hiera.yaml in the puppet repository

Andrew added a comment.Jan 5 2017, 5:36 PM

modules/puppetmaster/files/labtest.hiera.yaml is still used, and appears to still be useful.

Change 333011 had a related patch set uploaded (by Faidon Liambotis):
exim: kill exim4.minimal.labtest.erb unused

https://gerrit.wikimedia.org/r/333011

Change 333011 merged by Faidon Liambotis:
exim: kill exim4.minimal.labtest.erb unused

https://gerrit.wikimedia.org/r/333011