Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Cannot bounce Puppetfile.lock!' error when Forge modules contain duplicated dependencies #223

Closed
daks opened this issue Jun 3, 2014 · 13 comments

Comments

@daks
Copy link

daks commented Jun 3, 2014

Hello,

I use librarian-puppet 1.0.2 on Debian Wheezy 7.5. Puppet version is 3.6.1-1puppetlabs1 (from Puppetlabs apt repository).

My working Puppetfile is

forge "http://forge.puppetlabs.com"

mod "opentable/windowsfeature"
mod "garethr/kibana"
mod "akumria/nullmailer", "1.3.2"
mod "elasticsearch/logstash", "0.4.3"
mod "puppetlabs/apt"
mod "daks/wget",
  :git => "https://github.com/daks/puppet-wget.git"
mod "elasticsearch/elasticsearch", "0.3.0"
mod "dwerder/graphite"

librarian-puppet install do the job normally

If I add

mod "pdxcat/collectd"

I got this error

Cannot bounce Puppetfile.lock!

Running with --verbose give this

[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 1.0.2
[Librarian] Project: /etc/puppet/environments/experimental
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.10.4
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian]   [:forge, "http://forge.puppetlabs.com", {}]
[Librarian]   [:git, "https://github.com/daks/puppet-wget.git", {}]
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "http://forge.puppetlabs.com", {}]
[Librarian]   [:git, "https://github.com/daks/puppet-wget.git", {}]
[Librarian] Analyzing spec and lock:
[Librarian]   Removed:
[Librarian]   ExplicitRemoved:
[Librarian]   Added:
[Librarian]     pdxcat/collectd
[Librarian]   NonMatchingAdded:
[Librarian]     pdxcat/collectd
[Librarian]   Changed:
[Librarian]   DeepKeep:
[Librarian]     akumria/nullmailer
[Librarian]     daks/wget
[Librarian]     dwerder/graphite
[Librarian]     elasticsearch/elasticsearch
[Librarian]     elasticsearch/logstash
[Librarian]     garethr/kibana
[Librarian]     opentable/windowsfeature
[Librarian]     puppetlabs/apt
[Librarian]   ShallowStrip:
[Librarian] Resolving pdxcat/collectd (>= 0) <http://forge.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian] Querying Forge API for module pdxcat/collectd: http://forge.puppetlabs.com/api/v1/releases.json?module=pdxcat/collectd
[Librarian]   Module pdxcat/collectd found versions: 2.1.0, 2.0.1, 1.1.0, 1.0.2, 1.0.1, 1.0.0, 0.1.0, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1
[Librarian]     Checking pdxcat/collectd/2.1.0 <http://forge.puppetlabs.com>
[Librarian]       Resolved pdxcat/collectd (>= 0) <http://forge.puppetlabs.com> at pdxcat/collectd/2.1.0 <http://forge.puppetlabs.com>
[Librarian]   Resolved pdxcat/collectd (>= 0) <http://forge.puppetlabs.com>
[Librarian] Bouncing Puppetfile.lock
[Librarian] lockfile_text:
FORGE
  remote: http://forge.puppetlabs.com
  specs:
    akumria/nullmailer (1.3.2)
      puppetlabs/stdlib (>= 2.3.1)
    dwerder/graphite (5.3.2)
      puppetlabs/stdlib (>= 3.2.0)
    elasticsearch/elasticsearch (0.3.0)
      puppetlabs/stdlib (>= 3.2.0)
    elasticsearch/logstash (0.4.3)
      ispavailability/file_concat (>= 0.1.0)
      puppetlabs/stdlib (>= 3.2.0)
    garethr/kibana (0.2.0)
      ploperations/bundler (>= 0.0.0)
      puppetlabs/git (>= 0.0.0)
      puppetlabs/ruby (>= 0.0.0)
      puppetlabs/stdlib (>= 0.0.0)
      puppetlabs/vcsrepo (>= 0.0.0)
    ispavailability/file_concat (0.1.0)
    joshcooper/powershell (0.0.6)
    opentable/windowsfeature (0.1.2)
      joshcooper/powershell (>= 0.0.6)
      puppetlabs/stdlib (>= 3.0.0)
    pdxcat/collectd (2.1.0)
      puppetlabs/stdlib (>= 3.0.0)
      puppetlabs/stdlib (>= 3.0.0)
    ploperations/bundler (1.0.0)
    puppetlabs/apt (1.4.2)
      puppetlabs/stdlib (>= 2.2.1)
    puppetlabs/git (0.0.3)
    puppetlabs/ruby (0.1.0)
    puppetlabs/stdlib (4.2.1)
    puppetlabs/vcsrepo (0.2.0)

GIT
  remote: https://github.com/daks/puppet-wget.git
  ref: master
  sha: 4d77be8de5154261e801512331633b9990b417af
  specs:
    daks/wget (0.0.1)

DEPENDENCIES
  akumria/nullmailer (= 1.3.2)
  daks/wget (>= 0)
  dwerder/graphite (>= 0)
  elasticsearch/elasticsearch (= 0.3.0)
  elasticsearch/logstash (= 0.4.3)
  garethr/kibana (>= 0)
  opentable/windowsfeature (>= 0)
  pdxcat/collectd (>= 0)
  puppetlabs/apt (>= 0)

[Librarian] bounced_lockfile_text:
FORGE
  remote: http://forge.puppetlabs.com
  specs:
    akumria/nullmailer (1.3.2)
      puppetlabs/stdlib (>= 2.3.1)
    dwerder/graphite (5.3.2)
      puppetlabs/stdlib (>= 3.2.0)
    elasticsearch/elasticsearch (0.3.0)
      puppetlabs/stdlib (>= 3.2.0)
    elasticsearch/logstash (0.4.3)
      ispavailability/file_concat (>= 0.1.0)
      puppetlabs/stdlib (>= 3.2.0)
    garethr/kibana (0.2.0)
      ploperations/bundler (>= 0.0.0)
      puppetlabs/git (>= 0.0.0)
      puppetlabs/ruby (>= 0.0.0)
      puppetlabs/stdlib (>= 0.0.0)
      puppetlabs/vcsrepo (>= 0.0.0)
    ispavailability/file_concat (0.1.0)
    joshcooper/powershell (0.0.6)
    opentable/windowsfeature (0.1.2)
      joshcooper/powershell (>= 0.0.6)
      puppetlabs/stdlib (>= 3.0.0)
    pdxcat/collectd (2.1.0)
      puppetlabs/stdlib (>= 3.0.0)
    ploperations/bundler (1.0.0)
    puppetlabs/apt (1.4.2)
      puppetlabs/stdlib (>= 2.2.1)
    puppetlabs/git (0.0.3)
    puppetlabs/ruby (0.1.0)
    puppetlabs/stdlib (4.2.1)
    puppetlabs/vcsrepo (0.2.0)

GIT
  remote: https://github.com/daks/puppet-wget.git
  ref: master
  sha: 4d77be8de5154261e801512331633b9990b417af
  specs:
    daks/wget (0.0.1)

DEPENDENCIES
  akumria/nullmailer (= 1.3.2)
  daks/wget (>= 0)
  dwerder/graphite (>= 0)
  elasticsearch/elasticsearch (= 0.3.0)
  elasticsearch/logstash (= 0.4.3)
  garethr/kibana (>= 0)
  opentable/windowsfeature (>= 0)
  pdxcat/collectd (>= 0)
  puppetlabs/apt (>= 0)

Cannot bounce Puppetfile.lock!
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/persist_resolution_mixin.rb:20:in `persist_resolution'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:27:in `run'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
/var/lib/gems/1.9.1/gems/librarian-puppet-1.0.2/lib/librarian/puppet/cli.rb:69:in `install'
/var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
/var/lib/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/var/lib/gems/1.9.1/gems/librarian-puppet-1.0.2/bin/librarian-puppet:7:in `<top (required)>'
/usr/local/bin/librarian-puppet:23:in `load'
/usr/local/bin/librarian-puppet:23:in `<main>'

I don't understand the error message and how to solve it

@anthcourtney
Copy link

+1

I am also now seeing this error.

...
Cannot bounce Puppetfile.lock!
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/action/persist_resolution_mixin.rb:20:in `persist_resolution'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:27:in `run'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:113:in `update'
/var/lib/gems/1.8/gems/thor-0.19.1/lib/thor/command.rb:27:in `__send__'
/var/lib/gems/1.8/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/var/lib/gems/1.8/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/var/lib/gems/1.8/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/var/lib/gems/1.8/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
/var/lib/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/var/lib/gems/1.8/gems/librarian-puppet-1.0.1/bin/librarian-puppet:7
/usr/local/bin/librarian-puppet:19:in `load'
/usr/local/bin/librarian-puppet:19

@anthcourtney
Copy link

I had to do a librarian-puppet install --clean=true to resolve this error.

@daks
Copy link
Author

daks commented Jun 4, 2014

I tried this command (with good Puppetfile and the other) but none solved my problem.

@danieldreier
Copy link

I'm seeing the same problem with a simple Puppetfile reading:

forge "http://forge.puppetlabs.com"
mod "puppetlabs/ntp"

librarian-puppet install --clean=true does not resolve the issue. I tested and reproduced the issue in each release back to 0.9.17.

The issue appears to be specific to some modules. I'm able to run the following (with the ntp module commented out) just fine:

# Configuration for librarian-puppet.
forge "http://forge.puppetlabs.com"
mod "example42/php"
mod "example42/puppi"
mod "example42/timezone"
mod "fsalum/newrelic"
mod "puppetlabs/apt"
mod "puppetlabs/concat"
mod "puppetlabs/firewall"
mod "puppetlabs/mysql"
#mod "puppetlabs/ntp"
mod "puppetlabs/stdlib"
mod "hunner/hiera"
mod "newrelic/newrelic_plugins"
mod "puppetlabs/java"
mod "saz/memcached"
mod "puppetlabs/firewall"
mod "puppetlabs/stdlib"

I also reproduced the case with mod "pdxcat/collectd".

@kevin1024
Copy link

Yeah, I'm seeing this issue when I include the 3.1.0 version of puppetlabs/ntp in my Puppetfile but not when I include the 3.0.3 version. Weird huh.

Here is a minimal Puppetfile that reproduces the problem:

forge "https://forge.puppetlabs.com"

mod "puppetlabs/ntp"

And then run librarian-puppet install with the latest git checkout.

Here's the verbose output:

$ librarian-puppet install --verbose
[Librarian] Ruby Version: 2.1.1
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 2.2.2
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 1.0.3
[Librarian] Project: /home/kevin/work/test
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.9.3
[Librarian] Git Environment Variables:
[Librarian]   GIT_AUTHOR_EMAIL=me@kevinmccarthy.org
[Librarian]   GIT_AUTHOR_NAME=Kevin McCarthy
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forge.puppetlabs.com", {}]
[Librarian] Resolving puppetlabs/ntp (>= 0) <https://forge.puppetlabs.com>[Librarian]   Checking manifests
[Librarian] Querying Forge API for module puppetlabs/ntp: https://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/ntp
[Librarian]   Module puppetlabs/ntp found versions: 3.1.0, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-rc1, 2.0.1, 2.0.0, 2.0.0-rc1, 1.0.1, 1.0.0, 1.0.0-rc1, 0.3.0, 0.2.0, 0.1.0, 0.0.4, 0.0.3
[Librarian]     Checking puppetlabs/ntp/3.1.0 <https://forge.puppetlabs.com>
[Librarian]       Resolving puppetlabs/stdlib (>= 4.0.0) <(no source specified)>
[Librarian]         Checking manifests
[Librarian] Querying Forge API for module puppetlabs/stdlib: https://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/stdlib
[Librarian]   Module puppetlabs/stdlib found versions: 4.2.2, 4.2.1, 4.2.0, 4.1.0, 3.2.2, 3.2.1, 3.2.0, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.6.0, 2.5.1, 2.5.0, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.1, 2.2.0, 2.1.3, 2.0.0, 1.1.0, 1.0.0, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1
[Librarian]           Checking puppetlabs/stdlib/4.2.2 <https://forge.puppetlabs.com>
[Librarian]             Resolved puppetlabs/stdlib (>= 4.0.0) <(no source specified)> at puppetlabs/stdlib/4.2.2 <https://forge.puppetlabs.com>
[Librarian]         Resolved puppetlabs/stdlib (>= 4.0.0) <(no source specified)>
[Librarian]       Resolved puppetlabs/ntp (>= 0) <https://forge.puppetlabs.com> at puppetlabs/ntp/3.1.0 <https://forge.puppetlabs.com>
[Librarian]   Resolved puppetlabs/ntp (>= 0) <https://forge.puppetlabs.com>
[Librarian] Bouncing Puppetfile.lock
[Librarian] lockfile_text:
FORGE
  remote: https://forge.puppetlabs.com
  specs:
    puppetlabs/ntp (3.1.0)
      puppetlabs/stdlib (>= 4.0.0)
      puppetlabs/stdlib (>= 4.0.0)
    puppetlabs/stdlib (4.2.2)

DEPENDENCIES
  puppetlabs/ntp (>= 0)

[Librarian] bounced_lockfile_text:
FORGE
  remote: https://forge.puppetlabs.com
  specs:
    puppetlabs/ntp (3.1.0)
      puppetlabs/stdlib (>= 4.0.0)
    puppetlabs/stdlib (4.2.2)

DEPENDENCIES
  puppetlabs/ntp (>= 0)

Cannot bounce Puppetfile.lock!
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/action/persist_resolution_mixin.rb:20:in `persist_resolution'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:27:in `run'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.0.3/lib/librarian/puppet/cli.rb:69:in `install'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/home/kevin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.0.3/bin/librarian-puppet:7:in `<top (required)>'
/home/kevin/.rbenv/versions/2.1.1/bin/librarian-puppet:23:in `load'
/home/kevin/.rbenv/versions/2.1.1/bin/librarian-puppet:23:in `<main>'

@lloy0076
Copy link

lloy0076 commented Jun 5, 2014

I get this problem as well with the NTP from puppetlabs/ntp; the differing lines are like this:

puppetlabs/ntp (3.1.0)
  puppetlabs/stdlib (>= 4.0.0)
puppetlabs/stdlib (4.2.2)
  puppetlabs/ntp
  puppetlabs/ntp

And:

puppetlabs/ntp (3.1.0)
  puppetlabs/stdlib (>= 4.0.0)
puppetlabs/stdlib (4.2.2)

WHEN I changed my upstream module to require puppetlabs/ntp (<3.1.0) it worked.

@flozano
Copy link

flozano commented Jun 5, 2014

Same problem here. Enforcing version of ntp module to 3.0.3 works - thanks @kevin1024 !

@daks
Copy link
Author

daks commented Jun 6, 2014

i managed to install pdxcat/collectd with

puppet module install pdxcat/collect --modulepath modules/

but it still don't work with librarian-puppet.

I finally solve the problem indicating the version explicitely

mod "pdxcat/collect", "2.0.1"

last version 2.1.0 don't work, i think there is a dependency conflict but the error message is not useful.

@carlossg
Copy link
Collaborator

carlossg commented Jun 6, 2014

The forge is returning duplicated dependencies for ntp 3.1.0 and that makes librarian fail

https://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/ntp&version=3.1.0
https://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/ntp&version=3.0.3

same thing for collectd 2.1.0

https://forge.puppetlabs.com/api/v1/releases.json?module=pdxcat/collectd&version=2.1.0
https://forge.puppetlabs.com/api/v1/releases.json?module=pdxcat/collectd&version=2.0.1

I could work around that, but something that the Forge should fix, maybe @ryanycoleman can shed some light

In the meantime you should lock the versions to one that works

@carlossg carlossg changed the title 'Cannot bounce Puppetfile.lock!' error 'Cannot bounce Puppetfile.lock!' error when Forge modules contain duplicated dependencies Jun 6, 2014
@danieldreier
Copy link

I've filed a bug with puppet labs at https://tickets.puppetlabs.com/browse/FORGE-183 to track the issue on their end.

@carlossg
Copy link
Collaborator

carlossg commented Jun 7, 2014

Fixed in 1.0.3, will ignore and warn about duplicated dependencies from forge

@carlossg carlossg closed this as completed Jun 7, 2014
@ryanycoleman
Copy link

Thanks for the ping @carlossg. FWIW, I did pass this along to the team and they'll followup on FORGE-183 soon. Glad to see you have a workaround in place. I think we understand what happened and can prevent it in the future.

@robinbowes
Copy link

I've just run into the same issue (well, the same error message).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants