Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Error executing action add on resource 'apt_repository[apt.postgresql.org]' #25

Closed
luizfonseca opened this issue Feb 18, 2013 · 8 comments

Comments

@luizfonseca
Copy link

My setup: Vagrant, Vagrant-Librarian, Precise32 and I'm facing the following error:

================================================================================

Error executing action `add` on resource 'apt_repository[apt.postgresql.org]'

================================================================================


RuntimeError

------------

The repository file to create is nil, cannot continue.


Cookbook Trace:

---------------

/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb:127:in `class_from_file'

Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postgresql/recipes/apt_repository.rb

  7: # use `apt.postgresql.org` for primary package installation support
  8: apt_repository "apt.postgresql.org" do
  9:   uri "http://apt.postgresql.org/pub/repos/apt"
 10:   distribution "#{node["lsb"]["codename"]}-pgdg"
 11:   components ["main"]
 12:   key "http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc"
 13:   action :add
 14: end
 15: 

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postgresql/recipes/apt_repository.rb:8:in `from_file'

apt_repository("apt.postgresql.org") do
  uri "http://apt.postgresql.org/pub/repos/apt"
  retry_delay 2
  components ["main"]
  retries 0
  recipe_name "apt_repository"
  distribution "precise-pgdg"
  action [:add]
  cookbook_name :postgresql
  key "http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc"
end

[2013-02-18T21:03:53+00:00] ERROR: Running exception handlers
[2013-02-18T21:03:53+00:00] ERROR: Exception handlers complete
[2013-02-18T21:03:53+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-18T21:03:53+00:00] FATAL: RuntimeError: apt_repository[apt.postgresql.org] (postgresql::apt_repository line 8) had an error: RuntimeError: The repository file to create is nil, cannot continue.
@phlipper
Copy link
Owner

@runeroniek thanks for the report. What version of Chef are you running?

@luizfonseca
Copy link
Author

Chef 10.14.2. Is there any known issues?

@luizfonseca
Copy link
Author

After version 0.5.0, nothing works. Before that, my provision runs successfully. Seems to be a Chef version problem.

@gmile
Copy link

gmile commented Feb 22, 2013

👍

same error for for me on Chef 10.14.2

@phlipper
Copy link
Owner

@runeroniek, @gmile,

I apologize for the delay in responding. Would it be possible to try upgrading your Chef version to >= 10.16.4? I have success using both 10.16.x and 10.18.x in my local testing.

Also, what version of the apt cookbook are each of you using? I am using a pretty recent version and I may need to update the dependency version requirement on that cookbook.

Thank you both for the reports and help with debugging!

@gmile
Copy link

gmile commented Feb 26, 2013

@phlipper thank you. In fact, after upgrading to 11.x the issue was gone.

@phlipper
Copy link
Owner

@gmile thank you for the update! I'm glad to hear that it is working now.

@phlipper
Copy link
Owner

phlipper commented Mar 3, 2013

Closing this since there is a resolution by upgrading to a more recent version of Chef.

@phlipper phlipper closed this as completed Mar 3, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants