New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: No resource or method named `File' for `Chef::Recipe "sysctl"' #80

Closed
lhriley-tm opened this Issue Jun 24, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@lhriley-tm

lhriley-tm commented Jun 24, 2015

The following error appears on machines running chef-client 12.4.0. Reverting to 12.3.0 resolves the issue.

================================================================================
         Recipe Compile Error in /tmp/kitchen/cache/cookbooks/tm_base/recipes/default.rb
         ================================================================================

         NoMethodError
         -------------
         No resource or method named `File' for `Chef::Recipe "sysctl"'

         Cookbook Trace:
         ---------------
           /tmp/kitchen/cache/cookbooks/os-hardening/recipes/sysctl.rb:46:in `from_file'
           /tmp/kitchen/cache/cookbooks/tm_base/recipes/hardening.rb:26:in `from_file'
           /tmp/kitchen/cache/cookbooks/tm_base/recipes/default.rb:25:in `from_file'

         Relevant File Content:
       ----------------------
         /tmp/kitchen/cache/cookbooks/os-hardening/recipes/sysctl.rb:

          39:  rescue
          40:    log 'WARNING: Could not properly determine the cpu vendor. Fallback to intel cpu.' do

          42:    end
          43:  end
          44:  
          45:  # protect sysctl.conf
          46>> File '/etc/sysctl.conf' do
          47:    mode 0440
          48:    owner 'root'
          49:    group 'root'
          50:  end

          52:  # NSA 2.2.4.1 Set Daemon umask
          53:  # do config for rhel-family
          54:  case node['platform_family']
          55:  when 'rhel', 'fedora'


         Running handlers:

         Running handlers complete
       [2015-06-24T23:43:49+00:00] ERROR: Exception handlers complete
         Chef Client failed. 3 resources updated in 14.720096092 seconds
       [2015-06-24T23:43:49+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2015-06-24T23:43:49+00:00] ERROR: No resource or method named `File' for `Chef::Recipe "sysctl"'
       [2015-06-24T23:43:50+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@Rockstar04

This comment has been minimized.

Show comment
Hide comment
@Rockstar04

Rockstar04 Jun 25, 2015

Member

Is the issue the capitalization? I didnt see anything in the changelog that mentioned that directly.

Member

Rockstar04 commented Jun 25, 2015

Is the issue the capitalization? I didnt see anything in the changelog that mentioned that directly.

@Rockstar04

This comment has been minimized.

Show comment
Hide comment
@Rockstar04

Rockstar04 Jun 25, 2015

Member

@lhriley-tm Just wanted to let you know that the tiny patch I have submitted in #81 will correct this issue, as soon as another member form the team hits the merge button and we bump the version number you should be good to go.

Member

Rockstar04 commented Jun 25, 2015

@lhriley-tm Just wanted to let you know that the tiny patch I have submitted in #81 will correct this issue, as soon as another member form the team hits the merge button and we bump the version number you should be good to go.

@Rockstar04

This comment has been minimized.

Show comment
Hide comment
@Rockstar04

Rockstar04 Jun 25, 2015

Member

@lhriley-tm

The patch has been applied to master and we will be doing some more testing to make sure there are no other suprises from the latest chef-client release.

Until we get a new version release, you can point directly to master to get going again. I'm going to close the issue, but feel free to comment if you have any concerns.

Member

Rockstar04 commented Jun 25, 2015

@lhriley-tm

The patch has been applied to master and we will be doing some more testing to make sure there are no other suprises from the latest chef-client release.

Until we get a new version release, you can point directly to master to get going again. I'm going to close the issue, but feel free to comment if you have any concerns.

@Rockstar04 Rockstar04 closed this Jun 25, 2015

@lhriley-tm

This comment has been minimized.

Show comment
Hide comment
@lhriley-tm

lhriley-tm Jun 25, 2015

Excellent. Thanks!

lhriley-tm commented Jun 25, 2015

Excellent. Thanks!

rollbrettler pushed a commit to rollbrettler/chef-os-hardening that referenced this issue Sep 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment