Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Cookbook not compatible with Chef Client version 13 or 14 #67

Open
ml185202 opened this issue May 3, 2018 · 0 comments
Open

Cookbook not compatible with Chef Client version 13 or 14 #67

ml185202 opened this issue May 3, 2018 · 0 comments

Comments

@ml185202
Copy link

ml185202 commented May 3, 2018

Now that Chef Client 12 is EOL, the cookbook needs to be updated to use the newer versions, 13 & 14.

This is the error we are seeing

NoMethodError

undefined method `platform_version' for #Chef::Node::Attribute:0x0000000004d48588

Cookbook Trace:

/var/chef/cache/cookbooks/mongodb3/recipes/package_repo.rb:26:in from_file' /var/chef/cache/cookbooks/mongodb3/recipes/default.rb:20:in from_file'
/var/chef/cache/cookbooks/dc_dr_mongodb/recipes/install.rb:17:in from_file' /var/chef/cache/cookbooks/dc_dr_mongodb/recipes/default.rb:5:in from_file'

Relevant File Content:

/var/chef/cache/cookbooks/mongodb3/recipes/package_repo.rb:

19:
20: pkg_major_version = node['mongodb3']['version'].to_f # eg. 3.0, 3.2
21:
22: # Setup default package version attribute to install
23: pkg_version = node['mongodb3']['version']
24: case node['platform_family']
25: when 'rhel', 'fedora'
26>> pkg_version = "#{node['mongodb3']['version']}-1.el#{node.platform_version.to_i}" # ~FC019
27: if node['platform'] == 'amazon'
28: pkg_version = "#{node['mongodb3']['version']}-1.amzn1" # ~FC019
29: end
30: end
31:
32: # Setup default package repo url attribute for each platform family or platform
33: case node['platform']
34: when 'redhat', 'oracle','centos', 'fedora' # FC024
35: pkg_repo = "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/#{pkg_major_version}/#{node['kernel']['machine'] =
/x86_64/ ? 'x86_64' : 'i686'}"

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

1 participant