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

Librarian exhibits degenerate conflict resolution behavior #175

Open
willglynn opened this issue Nov 4, 2014 · 1 comment · May be fixed by #177
Open

Librarian exhibits degenerate conflict resolution behavior #175

willglynn opened this issue Nov 4, 2014 · 1 comment · May be fixed by #177

Comments

@willglynn
Copy link

Consider the following Cheffile, adapted from a real one found in the wild:

site 'https://supermarket.getchef.com/api/v1'

cookbook 'apache2'
cookbook 'apt'
cookbook 'build-essential'
cookbook 'chef_gem'
cookbook 'chef_handler'
cookbook 'chef-client'
cookbook 'cron'
cookbook 'database'
cookbook 'logrotate'
cookbook 'java'
cookbook 'jenkins'
cookbook 'iptables-ng'
cookbook 'memcached'
cookbook 'mysql', '2.0.2'

librarian-chef install takes forever – over 20 hours of CPU time on the original Cheffile so far – without success. Adding --verbose shows why: some version of something depends on mysql >= 5.0.0 which conflicts with the mysql 2.0.2 specified in the Cheffile. librarian-chef starts backtracking appropriately, but it doesn't notice the conflict until well after the cookbook with the mysql >= 5.0.0 dependency, so the resulting search space is huge. Here's a gist of the first million lines of search output.

(Spoiler: turns out it's recent versions of database adding the conflicting dependency. 2.0.0 works fine, so it should only have to backtrack a few releases, but instead it backtracks through the entire version history of several other cookbooks first, going forwards through all the other dependencies again each time.)

There are several ways to address this. I'm preparing a pull request with my fix.

@mkropat
Copy link

mkropat commented Jul 20, 2015

Dang, I ran into this too with the wordpress cookbook. I attempted to try the fix in #177 but I couldn't get librarian-chef install to run at all for some reason after that, sorry. My workaround for now is to switch to Berkshelf.

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

Successfully merging a pull request may close this issue.

2 participants