rackspace-cookbooks / elkstack

Elasticsearch, logstash, and kibana stack
Other
81 stars 54 forks source link

Cannot resolve deps #180

Closed drwahl closed 8 years ago

drwahl commented 8 years ago

When trying to "berks install" after adding this cookbook to my environment, I am getting the following error/timeout:

D, [2016-09-14T15:40:49.946765 #3917700] DEBUG -- :   Starting resolution...
The dependency constraints could not be solved in the time allotted.
Unable to find a solution for demands: akrug (1.2.11), apparmor (0.9.5), apt (>= 0.0.0), aptly (>= 0.0.0), beaver (>= 0.0.0), bucky (0.1.0), ceph (0.9.13), chef-client (>= 0.0.0), chef-server (>= 0.0.0), cinder (6.0.21), collectd (1.0.2), collectd-plugins (1.0.16), compat_resource (= 12.10.7), cron (>= 0.0.0), cumulus (>= 0.0.0), cumulus-switch (2.0.2), database (1.4.1), database-tests (0.1.3), dhcp (>= 0.0.0), diamond (2.0.5), djbdns (2.0.0), dreamcompute (2.2.181), elkstack (~> 6.0.4), erlang (>= 0.0.0), fail2ban (>= 0.0.0), git (>= 0.0.0), glance (7.0.22), grafana (>= 0.0.0), graphite (>= 0.0.0), heat (4.2.6), horizon (1.1.8), hostnames (>= 0.0.0), ipmi (1.0.2), iptables (= 1.1.0), jenkins (= 2.4.1), keystone (9.0.13), libvirt (>= 0.0.0), lldpd (>= 0.0.0), logrotate (>= 0.0.0), man (>= 0.0.0), memcached (>= 0.0.0), mysql (4.0.28), nagios (5.2.17), nephology (0.1.1), neutron (2.2.32), nodejs (>= 0.0.0), nova (7.4.15), ntp (>= 0.0.0), ohai (>= 0.0.0), openssh (>= 0.0.0), openssl (>= 0.0.0), osops-utils (2.0.10), postfix (>= 0.0.0), push-jobs (2.8.2), python (>= 0.0.0), quagga (>= 0.0.0), resolver (< 2.0.0), rsyslog (>= 0.0.0), runit (>= 0.0.0), snmp (4.0.1), sudo (>= 0.0.0), sysctl (>= 0.0.0), timezone (>= 0.0.0), users (= 2.0.2), vxfld (0.1.9)
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/resolver.rb:85:in `rescue in resolve'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/resolver.rb:75:in `resolve'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/installer.rb:175:in `install_from_universe'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/installer.rb:39:in `run'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/berksfile.rb:421:in `install'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/cli.rb:143:in `install'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/cli.rb:52:in `dispatch'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/lib/berkshelf/cli.rb:27:in `execute!'
        /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/berkshelf-4.3.5/bin/berks:5:in `<top (required)>'
        /usr/bin/berks:45:in `load'
        /usr/bin/berks:45:in `<main>'

Any ideas why dependencies can't be resolved?

martinb3 commented 8 years ago

Hi there -- with a Berkfiles.lock in the repo, if you're running berks install from the repo, it shouldn't even try to be re-resolving dependencies. I wouldn't expect that error if there's a lockfile in place already. If you're trying to use it from a dependent cookbook (it sounds like maybe you are), we've seen a number of bugs related to this. Check out #173 and #170. I think this is a Berkshelf bug that can be resolved by using the ruby solver.

drwahl commented 8 years ago

Correct, this is being pulled in as a dep from another cookbook. #173 suggests adding the "solver", but doesn't mention where to add that. Is there a config file somewhere that comment is referring to?

martinb3 commented 8 years ago

It's part of Berkshelf itself -- you can add solver :ruby, :required and newer Berkshelf will use a different dependency solver. It was added in https://github.com/berkshelf/berkshelf/pull/1482.

drwahl commented 8 years ago

Looks like adding this to the Berksfile (in my cookbook that is calling elkstack as a dependency) fixed my issue. Thanks @martinb3!

martinb3 commented 8 years ago

Great!