fnichol/chef-rvm_passenger

librarian-chef really hates this cookbook

Opened this issue · 4 comments

I can figure out why, its only this cookbook, but I'm a chef noob, I'll put this here in case its also affecting others.

[kevin@millbrook chef-solo-example] librarian-chef install
/Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/action/persist_resolution_mixin.rb:11:in `persist_resolution': undefined method `correct?' for nil:NilClass (NoMethodError)
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/action/resolve.rb:27:in `run'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:168:in `resolve!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/chef/cli.rb:41:in `install'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor/task.rb:27:in `run'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor.rb:344:in `dispatch'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.17.0/lib/thor/base.rb:434:in `start'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:31:in `returning_status'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block in bin!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:47:in `with_environment'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `bin!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/gems/librarian-0.0.26/bin/librarian-chef:7:in `'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/bin/librarian-chef:19:in `load'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/bin/librarian-chef:19:in `'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `'

I see the same error using librarian (0.0.26)

I already have chef-rvm_passenger v0.8.0 installed
This works fine:

cookbook 'rvm_passenger', :git => 'git://github.com/fnichol/chef-rvm_passenger.git', :ref => 'v0.8.0'

However trying to update to v0.8.2 causes the undefined method `correct?' error:

cookbook 'rvm_passenger', :git => 'git://github.com/fnichol/chef-rvm_passenger.git', :ref => 'v0.8.2'

I tried to simplify the problem and got a different error.

I deleted librarian's cache in the tmp dir and then tried to update just rvm_passenger

$ librarian-chef update --verbose rvm_passenger
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-darwin10.8.0
[Librarian] Rubygems Version: 1.8.25
[Librarian] Librarian Version: 0.0.26
[Librarian] Librarian Adapter: chef
[Librarian] Project: /Users/stephen/dev/concord/lab/config/littlechef
[Librarian] Specfile: Cheffile
[Librarian] Lockfile: Cheffile.lock
[Librarian] Git: /usr/local/bin/git
[Librarian] Git Version: git version 1.8.0.2
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian]   [:site, "http://community.opscode.com/api/v1", {}]
[Librarian]   [:git, "git://github.com/opscode-cookbooks/java.git", {}]
[Librarian]   [:git, "git://github.com/mdxp/nodejs-cookbook.git", {}]
[Librarian]   [:git, "git://github.com/balbeko/chef-npm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.0"}]
[Librarian]   [:git, "git://github.com/phlipper/chef-zip.git", {}]
[Librarian]   [:git, "git://github.com/realityforge/chef-authbind.git", {}]
[Librarian] Post-Cached Sources:
[Librarian]   [:site, "http://community.opscode.com/api/v1", {}]
[Librarian]   [:git, "git://github.com/opscode-cookbooks/java.git", {}]
[Librarian]   [:git, "git://github.com/mdxp/nodejs-cookbook.git", {}]
[Librarian]   [:git, "git://github.com/balbeko/chef-npm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.0"}]
[Librarian]   [:git, "git://github.com/phlipper/chef-zip.git", {}]
[Librarian]   [:git, "git://github.com/realityforge/chef-authbind.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.2"}]
[Librarian] Analyzing spec and lock:
[Librarian]   Removed:
[Librarian]   ExplicitRemoved:
[Librarian]   Added:
[Librarian]   NonMatchingAdded:
[Librarian]   Changed:
[Librarian]     rvm_passenger
[Librarian]   DeepKeep:
[Librarian]     apache2
[Librarian]     apt
[Librarian]     authbind
[Librarian]     couchdb
[Librarian]     emacs
[Librarian]     git
[Librarian]     java
[Librarian]     maven
[Librarian]     nodejs
[Librarian]     npm
[Librarian]     rvm
[Librarian]     sudo
[Librarian]     users
[Librarian]     zip
[Librarian]   ShallowStrip:
[Librarian]     rvm_passenger
/Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:141:in `dependencies_of': undefined method `dependencies' for nil:NilClass (NoMethodError)
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:79:in `deep_strip!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:20:in `deep_strip'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/action/update.rb:20:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:172:in `update!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:114:in `update'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:31:in `returning_status'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:47:in `with_environment'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/bin/librarian-chef:7:in `<top (required)>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `load'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `<main>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `<main>'

FYI: I created a related librarian issue: applicationsonline/librarian#133

FYI:

@yfeldblum identifies the issue as Librarian's resolver not handling properly some additional constraints added to the rvm_passenger. A work-around is provided:

applicationsonline/librarian#133 (comment)

I'll report back after trying it.

Following @yfeldblum suggested worked for using librarian-chef to install rvm_passenger ... but I was surprised to see these downgrades to cookbooks I had been sucessfully using with rvm_passenger v0.8.0.

Cookbook downgrades in my Chefile.lock

apache2    1.6.0 ==> 1.1.16
nginx      1.4.0 ==> 0.101.6
ohai    >= 1.1.4 ==> ~> 1.0.2

Are these limits in the current dependency range needed?