edelight / chef-mongodb

MongoDB Chef cookbook
https://community.opscode.com/cookbooks/mongodb
Apache License 2.0
362 stars 3 forks source link

mongodb::default installs v2.4.9 (instead of 3.2) on Ubuntu 14.04 #415

Open chartotu19 opened 8 years ago

chartotu19 commented 8 years ago

I am running mongodb::default recipe in one of AWS EC2 instances via opswork. I tried passing the version by setting package_version node.set[:mongodb][:package_version]

Error message:

ERROR: apt_package[mongodb] (mongodb::install line 77) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb=3.2.0 ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       STDERR: E: Version '3.2.0' for 'mongodb' was not found
       ---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb=3.2.0 ----
       Ran apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb=3.2.0 returned 100

I checked apt-cache apt-cache show mongodb and found 2.4.9 seems to be the latest version.

What am I missing?

chartotu19 commented 8 years ago

Found the issue, I did not add include_recipe "mongodb::mongodb_org_repo" before include_recipe "mongodb::default" in my custom recipe.

I still got mongodb v2.6 installed. I checked apt sources file and found this deb "http://downloads-distro.mongodb.org/repo/ubuntu-upstart" dist 10gen. doesnt seem right.

josephholsten commented 7 years ago

This repo is EOL, but the code lives on at https://github.com/sous-chefs/mongodb. Could you give that cookbook a look and let us know if it doesn't fix your issue?