Reputation: 1
I have a problem with AWS OpsWorks custom recipes. After moving nodes to chef 11 the attributes are not "seen" in recipes. Example: in file recipes/some-service.rb i got entry
remote_file local_file do
source node['servicename']['https_download']
owner node['servicename']['app_user']
group node['servicename']['app_group']
mode 0664
end
in file attributes/some-service.rb:
default['servicename']['https_download'] = 'https://corect.address.of.file'
default['servicename']['app_user'] = 'someuser'
default['servicename']['app_group'] = 'somegroup'
When I try to deploy app I get an error:
ERROR: Caught exception while compiling OpsWorks custom run list: Chef::Exceptions::InvalidRemoteFileURI - nil is not a valid source
parameter for remote_file. source
must be an absolute URI or an array of URIs. - /opt/aws/opsworks/releases/20131015111601_209/vendor/gems/chef-11.4.4/bin/../lib/chef/resource/remote_file.rb:67:in `validate_source'
It seems like it gets nil instead value from attributes. What may I doing wrong?
Upvotes: 0
Views: 551
Reputation: 523
I'm having the same issue. Opsworks also is not seeing resources from the cookbooks that I'm using. I manually set the attribute in the recipe that it was complaining about the nil[] and that got me past that one just to turn up the resource not found issue...
I'm still digging and will post back if/when I find the answer...
EDIT:
What I believe has happened here is that there was a problem prior to my issue that kept chef-solo from loading the attribute data into the .json file that chef-solo uses to run. Once I fixed the first issue, the data was still non existent in the .json file for those attributes. Once I fixed the issue and it got past that point, the issue went away.
Upvotes: 0