Page MenuHomePhabricator

phabricator puppet at labs broken
Closed, ResolvedPublic

Description

It is not possible to load role::phabricator::main, if you are at another project then Nova Resource:Phabricator.
The message is:
Error:

Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template exim/exim4.conf.phab.erb:
Filepath: /etc/puppet/templates/exim/exim4.conf.phab.erb
Line: 19
Detail: undefined method `join' for nil:NilClass
at /etc/puppet/manifests/role/phabricator.pp:113 on node rcm-3.rcm.eqiad.wmflabs
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Event Timeline

Luke081515 raised the priority of this task from to Needs Triage.
Luke081515 updated the task description. (Show Details)
Luke081515 added a project: Phabricator.
Luke081515 added a subscriber: Luke081515.

Doesn't make much sense... scope.lookupvar('network::constants::all_networks') fails?

This comment was removed by Negative24.

Hmm, it works for me on phab-t116442.performance.eqiad.wmflabs. @Luke081515, how did you configure the puppet group on the rcm project?

I used role::phabricator::main, and then tried to get it with sudo puppet agent -tv.
The whole console output is this:

luke081515@rcm-2:~$ sudo puppet agent -tv
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/physicalcorecount.rb
Info: Loading facts in /var/lib/puppet/lib/facter/labsproject.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ganeti.rb
Info: Loading facts in /var/lib/puppet/lib/facter/lldp.rb
Info: Loading facts in /var/lib/puppet/lib/facter/initsystem.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_config_dir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template exim/exim4.conf.phab.erb:
Filepath: /etc/puppet/templates/exim/exim4.conf.phab.erb
Line: 19
Detail: undefined method `join' for nil:NilClass
at /etc/puppet/manifests/role/phabricator.pp:113 on node rcm-2.rcm.eqiad.wmflabs
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
luke081515@rcm-2:~$
Negative24 claimed this task.

role::phabricator::main isn't the right Puppet class to use in Labs. I'm pretty sure the error had to do with the site variables. I walked @Luke081515 through the rest of the process on IRC.

role::phabricator::main isn't the right Puppet class to use in Labs. I'm pretty sure the error had to do with the site variables. I walked @Luke081515 through the rest of the process on IRC.

Is there any documentation on the process or can you document it?

Its not documented. But its not hard. Essentially its just:

  1. Apply role::phabricator::labs and run puppet
  2. cd /srv/phab/phabricator and run sudo bin/storage upgrade
  3. Rerun puppet

And make sure your proxy points to <hostname>.wmflabs.org.

I'll probably add this info to the README sometime.

Why can't we use the same class in prod and labs? That's the idea of testing changes,

Prod uses some variables from the private puppet repo for setting passwords and such. But the prod class also sets up mail servers and relays that would be complex to manage in labs.

The labs class for the most part does replicate a lot of prod because it uses the same fixed_settings.yaml to configure Phabricator but there are just some things not worth trying to replicate in labs.

Ok, thanks for the explanation. I see.. I truly wish we could fix all this and really use the same role class in labs and prod.

(and then apply changes in labs first for testing like back in the days when we had the "test' branch :p)

The password part we can fix with the labs/private repo. Happy to help. Not so sure about the mail server part though.