Skip to content
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

Run error on Debian 8.1: service[modules-load] not found #19

Open
saintaardvark opened this issue Oct 16, 2015 · 1 comment
Open

Run error on Debian 8.1: service[modules-load] not found #19

saintaardvark opened this issue Oct 16, 2015 · 1 comment

Comments

@saintaardvark
Copy link

I'm getting this error when using version 0.2.0 of the modules cookbook (included from network_interfaces_v2) on Debian 8.1:

       [2015-10-16T22:20:27+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2015-10-16T22:20:27+00:00] ERROR: debian_network_interface[eth0:1] (internal-network-interfaces::default line 8) had an error: Chef::Exceptions::ResourceNotFound: resource template[/etc/modules-load.d/chef-attibutes.conf] is configured to notify resource service[modules-load] with action start, but service[modules-load] cannot be found in the resource collection. template[/etc/modules-load.d/chef-attibutes.conf] is defined in /tmp/kitchen/cache/cookbooks/modules/recipes/install_attributes.rb:23:in `from_file'

Being a Chef newbie, I'm not sure I've got this right...but I seem to be able to get around this by monkey-patching recipes/install_attributes.rb like so:

when "ubuntu"
  include_recipe 'modules::config'
  template "/etc/modules-load.d/chef-attibutes.conf" do
    source "modules.conf.erb"
    mode "0644"
    owner "root"
    group "root"
    variables(
      :modules => node['modules']['modules']
    )
    notifies :start, "service[modules-load]"
    only_if { node['modules']['modules'] }
  end
end

I realize a) that's ugly and b) Debian is not officially supported. To fix a) I tried adding a block like this one for Debian, but was unable to get it working...for some reason it seemed like the block simply wasn't being seen or evaluated. And in my defense: it's ugly but it works (as in, I can add simple aliases that don't require any kernel modules).

As for b), I'd be interested in seeing Debian support for this, and would be happy to test things out.

Thanks kindly for your help, and please let me know if you need any further information.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants