Closed amosshapira closed 10 years ago
Instead of downgrading, I managed to make this go away by grooming the Modulefiles for all of my modules and bumping the version numbers, and re-arranging my Puppetfile so that the modules being installed from the Forge are listed at the top, and making a few other changes.
I have no idea which of these changes fixed the problem. I don't even know what the problem was, except that I'm guessing it's related to the multiple FORGE listings in your example above (my example also had multiple FORGE sections; once it started working, there was only one FORGE). A more descriptive error message would help figure this out.
Thanks James, I'll try that.
Today, without changing our Puppetfile, we're back at the uselessly cryptic "Cannout bounce puppetfile.lock" message, and once again the output from librarian-puppet update --verbose shows that it's trying to define the forge twice.
I've downgraded to 0.9.3 as well
@jamezpolley @amosshapira can you post a copy of a Puppetfile that you are having trouble with ?
mod 'apache',
:git => 'git://github.com/puppetlabs/puppetlabs-apache.git'
mod 'passenger',
:git => 'git://github.com/puppetlabs/puppetlabs-passenger.git'
mod 'stdlib',
:git => 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
mod 'sssd',
:git => 'git@bitbucket.org:infrastructure/puppet-module-sssd.git'
mod 'resolv',
:git => 'git@bitbucket.org:infrastructure/puppet-module-resolv.git'
mod 'serial',
:git => 'git@bitbucket.org:infrastructure/puppet-module-serial.git'
mod 'ntpd',
:git => 'git@bitbucket.org:infrastructure/puppet-module-ntpd.git'
mod 'nfs',
:git => 'git@bitbucket.org:infrastructure/puppet-module-nfs.git'
mod 'autofs',
:git => 'git@bitbucket.org:infrastructure/puppet-module-autofs.git'
#mod 'opsview',
# :git => 'git@bitbucket.org:infrastructure/puppet-module-opsview.git'
mod 'opsview',
:git => 'git@bitbucket.org:ashapira/puppet-module-opsview.git'
mod 'sudo',
:git => 'git@bitbucket.org:infrastructure/puppet-module-sudo.git'
mod 'resolver',
:git => 'git@bitbucket.org:infrastructure/puppet-module-resolver.git'
mod 'ssh',
:git => 'git@bitbucket.org:infrastructure/puppet-module-ssh.git'
mod 'manage_logs',
:git => 'git@bitbucket.org:infrastructure/puppet-module-manage_logs.git'
Thanks.
I am also seeing this issue with 0.9.4, resolvable by downgrading to 0.9.3. This happens with a very simple Puppetfile and happens whether or not I define a forge:
forge "http://forge.puppetlabs.com"
mod 'epel', :git => 'https://github.com/stahnma/puppet-module-epel.git'
mod 'firewall', :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git'
mod 'jenkins', :git => 'https://github.com/rtyler/puppet-jenkins'
mod 'package_plug_plugins', :git => 'https://github.com/eshamow/eshamow-package_plus_plugins.git'
mod 'selinux', :git => 'https://github.com/jfryman/puppet-selinux.git'
mod 'vcsrepo', :git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git'
According to git bisect
, this is being caused by this commit:
https://github.com/rodjek/librarian-puppet/commit/5f29751c7423359a9397d9e942fd52f3a7585368
It only occurs (for me) with Puppetfile
s that only have modules with git sources.
Here's my bisect script:
#!/usr/bin/env bash
set -o errexit
set -o xtrace
rm pkg/*.gem
rm -f Puppetfile Puppetfile.lock
rm -rf .librarian/ .tmp/
rm -rf modules
rake build
gem uninstall --executables librarian-puppet
gem install pkg/librarian-puppet*.gem
cat > Puppetfile <<EOF
forge "http://forge.puppetlabs.com"
mod "rtyler/jenkins", :git => "https://github.com/rtyler/puppet-jenkins"
EOF
librarian-puppet install
I'm being affected by this bug as well with librarian-puppet version 0.9.4.
This also affects 0.9.5, but not 0.9.2.
Seeing it in 0.9.5. I threw diffy into the mix and it looks like there's an extra FORGE section being outputted into the lockfile_text, causing the diff to fail.
It looks like this may be due to a librarian trying to install a dependent module when you've already specified another version/variation/fork. I don't know how it's doing this when you're only using modules provided via git.
e.g. the puppetlabs/passenger module is dependent on puppetlabs/apache, but you're installing a fork.
Is there an option to disable loading dependencies?
@Aethylred Even when you pull in modules via git, they can specify their own dependencies in their Modulefile.
I was seeing a case where I was pulling saz/sudo from git; but other modules just specified "saz/sudo" in their modulefile. If I use --verbose, I'd predictably end up with the version from forge; without --verbose, I end up with the version from github about 2/3rds of the time, but the forge version the rest of the time.
In the instance I tried, where I've used a module from Puppet Forge with a modified dependency from GitHub, you're describing the reverse. Hence why I raised it as a separate issue.
Your other comment about a race condition in the --verbose issue would fit all three scenarios.
I have fixed this issue in our fork adding a test https://github.com/maestrodev/librarian-puppet/commit/5b7fd954f0b008124238918aca49ebdbfbef3a19
Depends on other patches that I submitted, so I didn't create a pull request yet. You can try using the gem librarian-puppet-maestrodev 0.9.7.1 https://rubygems.org/gems/librarian-puppet-maestrodev
I think it's the same as https://github.com/rodjek/librarian-puppet/issues/35
I hereby nominate @carlossg ;-)
Of course I just noticed @carlossg's fix immediately following my nearly identical pull request: https://github.com/rodjek/librarian-puppet/pull/66.
As he correctly states, this should address both this Issue and https://github.com/rodjek/librarian-puppet/issues/35.
+1 I can confirm that @carlossg's fork fixes this issue for us.
Confirmed that the fix in @carlossg's fork works for me as well. @carlossg you mention there are some other patches you are waiting on before submitting a pull request - I'm wondering if it'd be good to list all of those out here along with a pull req for the work in your fork.
@rodjek any chance we could get all of @carlossg's work reviewed/pulled in and a new gem released? Thanks!
+1 @richleland
There are a number of issues that have waiting PR's that we require for using librarian-puppet reliably. Right now we are building off a fork and a private gem repo. We would much rather be on master.
There are several patches, with their pull requests #55 #59 #60 and other ones that are superseeded by them like #65 #66 We keep our fork at https://github.com/maestrodev/librarian-puppet/tree/maestrodev until the pull requests are merged, and a public gem at https://rubygems.org/gems/librarian-puppet-maestrodev
The gem published at https://rubygems.org/gems/librarian-puppet-maestrodev is version 0.9.7.2, could it be at least updated to 0.9.7.3?
0.9.7.2 has everything, there's no new commits on 0.9.7.3 yet https://github.com/maestrodev/librarian-puppet/tree/maestrodev-v0.9.7.2
I have the same problem with the latest version. https://github.com/maestrodev/librarian-puppet/tree/maestrodev-v0.9.7.2 fixed the problem.
So are his changes getting merged ? Thanks
Any news on this getting merged/fixed?
Does this still happen for you with version 0.9.9? I haven't seen this error since upgrading.
0.9.9 seems to fix it!
I'm not getting any error on 0.9.9
Fixes are in master already
Guys , I've tried everything without a fix , i finally removed a module from a not trustworthy source now everything works fine . Error needs to be descriptive
After installing 0.9.4, it keeps failing with the following stack trace. Downgrading to 0.9.3 fixes the problem:
The diff between the lockfile_text and the bounced_lockfile_text is: