Skip to content

Instantly share code, notes, and snippets.

@knightsamar
Created December 16, 2016 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knightsamar/3137173169a058c1a331afb6c50e65b4 to your computer and use it in GitHub Desktop.
Save knightsamar/3137173169a058c1a331afb6c50e65b4 to your computer and use it in GitHub Desktop.
NoMethodError on trying to converge with yum-epel 2.0.0 included
Finished creating <default-centos-73> (0m48.69s).
-----> Converging <default-centos-73>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.3...
Removing non-cookbook files before transfer
Preparing data_bags
Preparing solo.rb
-----> Chef Omnibus installation detected (12.10.24)
Transferring files to <default-centos-73>
Starting Chef Client, version 12.10.24
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /tmp/kitchen/cookbooks/ucarp/recipes/default.rb
================================================================================
NoMethodError
-------------
No resource or method named `yum_repository' for `ChefCompat::Recipe "default"'
Cookbook Trace:
---------------
/tmp/kitchen/cookbooks/yum-epel/recipes/default.rb:23:in `block in from_file'
/tmp/kitchen/cookbooks/yum-epel/recipes/default.rb:20:in `each'
/tmp/kitchen/cookbooks/yum-epel/recipes/default.rb:20:in `from_file'
/tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
/tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
/tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
/tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
/tmp/kitchen/cookbooks/ucarp/recipes/default.rb:20:in `from_file'
/tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
Relevant File Content:
----------------------
/tmp/kitchen/cookbooks/yum-epel/recipes/default.rb:
16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: # See the License for the specific language governing permissions and
18: # limitations under the License.
19:
20: node['yum-epel']['repositories'].each do |repo|
21: next unless node['yum'][repo]['managed']
22:
23>> yum_repository repo do
24: baseurl node['yum'][repo]['baseurl'] unless node['yum'][repo]['baseurl'].nil?
25: cost node['yum'][repo]['cost'] unless node['yum'][repo]['cost'].nil?
26: description node['yum'][repo]['description'] unless node['yum'][repo]['description'].nil?
27: enabled node['yum'][repo]['enabled'] unless node['yum'][repo]['enabled'].nil?
28: enablegroups node['yum'][repo]['enablegroups'] unless node['yum'][repo]['enablegroups'].nil?
29: exclude node['yum'][repo]['exclude'] unless node['yum'][repo]['exclude'].nil?
30: failovermethod node['yum'][repo]['failovermethod'] unless node['yum'][repo]['failovermethod'].nil?
31: fastestmirror_enabled node['yum'][repo]['fastestmirror_enabled'] unless node['yum'][repo]['fastestmirror_enabled'].nil?
32: gpgcheck node['yum'][repo]['gpgcheck'] unless node['yum'][repo]['gpgcheck'].nil?
Platform:
---------
x86_64-linux
Running handlers:
[2016-12-16T23:07:45+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-12-16T23:07:45+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 05 seconds
[2016-12-16T23:07:45+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-12-16T23:07:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-16T23:07:45+00:00] ERROR: No resource or method named `yum_repository' for `ChefCompat::Recipe "default"'
[2016-12-16T23:07:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-centos-73>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment