ros-infrastructure / buildfarm_deployment

Apache License 2.0
30 stars 39 forks source link

Can't deploy master due to Puppet duplicate declaration error #141

Closed pjreed closed 7 years ago

pjreed commented 7 years ago

I'm trying to set up my own build farm from scratch. I've followed the instructions in this repository and cloned the buildfarm_deployment_config repository, modified the config files, and instantiated VMs for a master, slave, and repo. I've gotten the slave and repo up and running, although I had to pin the version of puppetlabs-ntp in both the master and repo Puppetfile as was done for the slave in #140.

However, when I try to run ./reconfigure.bash master on the master, it fails with this error:

# ./reconfigure.bash master
Copying in configuration
Asserting latest version of https://private_url/buildfarm_deployment.git as master
HEAD is now at cdeb221 Update Puppetfile
Running librarian-puppet
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.6.3
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 2.2.3
[Librarian] Project: /root/buildfarm_deployment/master
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.9.1
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian]   [:git, "git://github.com/newrelic/puppet-nrsysmond.git", {}]
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian]   [:git, "git://github.com/newrelic/puppet-nrsysmond.git", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Installing darin-zypprepo/1.0.2 <https://forgeapi.puppetlabs.com>
[Librarian] Installing example42-puppi/2.2.1 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-stdlib/4.13.1 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-concat/1.2.3 <https://forgeapi.puppetlabs.com>
[Librarian] Installing example42-iptables/2.1.15 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-apt/2.3.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing stahnma-epel/1.2.2 <https://forgeapi.puppetlabs.com>
[Librarian] Installing garethr-docker/5.0.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing newrelic-nrsysmond/0.0.1 <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --> e5bae01d6240d4605f2a4171c41510afdd0efd22
[Librarian] Deleting modules/nrsysmond
[Librarian] Copying .tmp/librarian/cache/source/git/a18046c9d09f6ca1 to modules/nrsysmond
[Librarian] Installing puppet-archive/1.1.2 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-apache/1.1.1 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-java/1.6.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing puppetlabs-ntp/4.2.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing rtyler-jenkins/1.7.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing saz-timezone/3.3.0 <https://forgeapi.puppetlabs.com>
[Librarian] Installing tracywebtech-pip/1.3.2 <https://forgeapi.puppetlabs.com>
Running puppet
puppet failed, please check /var/log/puppet.log, the last 10 lines are:
2016-11-08 15:19:11 -0600 Puppet (err): Unable to set ownership of log file
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:11 -0600 Puppet (info): Loading facts
2016-11-08 15:19:13 -0600 Puppet (err): Duplicate declaration: Jenkins::Plugin[credentials] is already declared; cannot redeclare at /root/buildfarm_deployment/master/manifests/site.pp:125 on node private.hostname
2016-11-08 15:19:13 -0600 Puppet (err): Duplicate declaration: Jenkins::Plugin[credentials] is already declared; cannot redeclare at /root/buildfarm_deployment/master/manifests/site.pp:125 on node private.hostname

I've taken a look at site.pp and its contents seem reasonable to me, but I don't know much about puppet. Any idea what could be causing that error?

pjreed commented 7 years ago

I managed to get it past that by pinning the version of 'rtyler/jenkins' to '1.6.1' in all three Puppetfiles. Is there any reason not to pin everything to a known working version?

dirk-thomas commented 7 years ago

That was the idea of #115 but it has not been done yet.

tfoote commented 7 years ago

A PR to do that would be appreciated.