tykeal / puppet-gerrit

Puppet module to manage Gerrit
6 stars 7 forks source link

Gerrit 2.13.x adds new gerrit.serverId that must be set #19

Open tykeal opened 7 years ago

tykeal commented 7 years ago

Gerrit 2.13.x adds in a new gerrit.serverId key that is undocumented but must be set. If not set it will get an autogenerated UUID stuck into it which will then cause the next puppet run to remove it and restart gerrit which will then autogenerate a UUID....

Discussions with the devs inform that it just needs to be a uniq string as they intend to allow for federation in the future.

The module needs to be able to handle this properly

dnaeon commented 7 years ago

Any progress on this one?

tykeal commented 7 years ago

It's not been a major issue to me, so no. You can get around the constant restart issues by adding the serverId key you want to use (any string is valid, but by default it's a UUID) to the gerrit subsection of the override_options. In hiera it would look something like this:

gerrit::override_options:
  gerrit:
    basePath: '/srv/gerrit'
    canonicalWebUrl: 'https://gerrit.example.com/r'
    serverId: 'a261a8e8-b735-4242-955c-4557fd9572c7'
dnaeon commented 7 years ago

I've already done what you've described :)

I was curious whether there would be something more in terms of support for serverId?

What you've described is totally fine with me as well, so I'll stick with that approach for now.

Thanks, Marin

tykeal commented 7 years ago

My intent is to add in a GENERATE clause similar to the secure auth tokens. I just haven't had a pressing reason to do the work.

I'm more than happy to take a look at a PR if you've got one ;)