Page MenuHomePhabricator

move cassandra submodule into puppet repo
Closed, ResolvedPublic

Description

It's currently pretty difficult to test changes to the cassandra puppet module. It's been suggested that making the cassandra module a part of the puppet repository (instead of a separate submodule), might reduce the calisthenics required to make use of the compiler build job on Jenkins (https://integration.wikimedia.org/ci/job/operations-puppet-catalog-compiler/build?delay=0sec).

Event Timeline

Eevans raised the priority of this task from to Needs Triage.
Eevans updated the task description. (Show Details)
Eevans subscribed.

Change 196335 had a related patch set uploaded (by Eevans):
move cassandra submodule into puppet repo

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

Eevans set Security to None.
GWicke triaged this task as Medium priority.Mar 15 2015, 4:57 PM

I don't think I'm alone in abhorring all the git submodules in our puppet repo. In practice they're a real pain for day-to-day operations with puppet (grepping for potential breakage, deploying changes via double commit/review, compiler interaction, etc). The situation would be more acceptable if these submodules were so universal, standard, and stable that they may as well be upstream code containing nothing specific to our environment at all and rarely ever needing further changes, but in the general case they aren't.

Relatedly, puppet needs a better ecosystem for managing, sharing, and deploying any modules that did fit that description (and then if cassandra fit that definition, we should be upstreaming our cassandra module and pulling it back in through standard mechanisms, whatever those are).

I agree, frequently-updated puppet submodules are quite clunky to work with

Yeah, I was initially supportive but these are becoming a major PITA. I'd like us to kill the submodules.

For Vagrant (and I guess GitHub), we can perhaps just have a script that replays changes into a separate repository.

I've attempted this too though via a merge commit as described in https://phabricator.wikimedia.org/T96016 to preserve history, but indeed we'll need to manually remove the submodule checkout.
In practice this translates to running rm -rf modules/cassandra/{manifests,templates,.git} for each operations/puppet checkout out there before git pull, namely:

  • the puppet compiler(s)
  • puppet masters in production
  • each user that has a local puppet.git checkout
  • each self-hosted puppetmaster labs instance

@faidon pong :( sorry I dropped the ball on this.

I've tested again the procedure outlined in T96016 and it works locally, I've added the steps to do user-side for git pull to work again at https://wikitech.wikimedia.org/wiki/Puppet#troubleshooting_2 Once the migration happens I'll grant myself temporary Push permissions to puppet to skip reviewing a large commit. Existing code reviews will need to be rebased of course and modules/cassandra removed as needed.

I'd like to make a repository running with the merged submodule for people to test, perhaps create a tmp/puppet-submodule gerrit repository and hide it afterwards? Ideally it needs to be have the same as the existing puppet.git (not a blocker)

target lists for migration announcement (target: next Wed): wikitech-l@ engineering@ ops@ labs-l, any other?

I don't think we need to make such a big deal out of it. We've previously merged a module (nginx, I believe) and it was all very quiet. I also personally don't see much value of keeping individual commits rather than just squashing it all in into one — but I don't mind it either.

submodule merged via the procedure in T96016 and puppetmaster updated via su -c 'cd /var/lib/git/operations/puppet && rm -r modules/cassandra && git pull' gitpuppet
note that to skip reviews the push and forge committer identity gerrit permissions need to be granted first

submodule merged, resolving

Change 196335 abandoned by Faidon Liambotis:
move cassandra submodule into puppet repo

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