I'm running on 12.04 Ubuntu with Vagrant using Chef Solo.
The PPA repo: https://launchpad.net/~chris-lea/+archive/postgresql-9.3 The apt coookbook: https://github.com/opscode-cookbooks/apt
Here's the concerning part from my recipe.
apt_repository 'postgresql-9.3' do
uri 'http://ppa.launchpad.net/chris-lea/postgresql-9.3/ubuntu'
distribution 'precise'
components ['main']
keyserver 'keyserver.ubuntu.com'
key 'D878D6C2'
deb_src true
end
execute 'apt-key-update' do
command 'sudo apt-key update'
end
execute 'apt-update' do
command 'sudo apt-get update --fix-missing'
end
package 'zsh' do
action :install
end
package 'postgresql-9.3' do
action :install
end
And here's the error:
==> default: [2014-07-02T15:23:52+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2014-07-02T15:23:52+00:00] ERROR: Running exception handlers
==> default: [2014-07-02T15:23:52+00:00] ERROR: Exception handlers complete
==> default: [2014-07-02T15:23:52+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-07-02T15:23:52+00:00] ERROR: package[postgresql-9.3] (dotabay::default line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following extra packages will be installed:
==> default: libpq5 postgresql-client-9.3 postgresql-client-common postgresql-common
==> default: ssl-cert
==> default: Suggested packages:
==> default: oidentd ident-server locales-all postgresql-doc-9.3 openssl-blacklist
==> default: The following NEW packages will be installed:
==> default: libpq5 postgresql-9.3 postgresql-client-9.3 postgresql-client-common
==> default: postgresql-common ssl-cert
==> default: 0 upgraded, 6 newly installed, 0 to remove and 167 not upgraded.
==> default: Need to get 4,804 kB of archives.
==> default: After this operation, 23.1 MB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default: libpq5 postgresql-client-common postgresql-client-9.3 postgresql-common
==> default: postgresql-9.3
==> default: STDERR: E: There are problems and -y was used without --force-yes
==> default: ---- End output of apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 ----
==> default: Ran apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 returned 100
==> default: [2014-07-02T15:23:52+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.omnibus.chef_version = :latest
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = ["chef/cookbooks"]
chef.add_recipe 'apt'
chef.add_recipe 'dotabay'
end
end
include_recipe 'apt::default'
instead of manually updating things? – sethvargochef.add_recipe 'apt'
in my Vagrantfile, doesn't this do that already? Anyways, after adding that to my recipe, it still gives me the same error. – fivetwentysixVagrantfile
. If you have that recipe, you don't need to execute apt-get update stuff – sethvargovagrant ssh
into the instance and runapt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1
what do you get? – sethvargo