sous-chefs-boneyard / modules Goto Github PK
View Code? Open in Web Editor NEWDevelopment repository for the modules cookbook
Home Page: https://supermarket.chef.io/cookbooks/modules
Development repository for the modules cookbook
Home Page: https://supermarket.chef.io/cookbooks/modules
In order to support new features and resolve bugs, we need more men.
@nlopes Do you want to become co-maintainer of this CK?
Recipe Compile Error in /var/chef/cache/cookbooks/modules/providers/default.rb
undefined local variable or method `use_inline_resources' for #Class:0x00000002aa3730
/var/chef/cache/cookbooks/modules/providers/default.rb:21:in `class_from_file'
NameError: undefined local variable or method `use_inline_resources' for #<Class:0x00000002aa3730>
/var/chef/cache/cookbooks/modules/providers/default.rb:21:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/mixin/from_file.rb:42:in `class_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/mixin/from_file.rb:42:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/provider.rb:213:in `block in build_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/provider.rb:193:in `initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/provider.rb:193:in `new'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/provider.rb:193:in `build_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:164:in `block in load_lwrp_providers'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:230:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:230:in `block (2 levels) in foreach_cookbook_load_segment'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:229:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:229:in `block in foreach_cookbook_load_segment'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:227:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:227:in `foreach_cookbook_load_segment'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:161:in `load_lwrp_providers'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:155:in `load_lwrps'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/run_context.rb:64:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/client.rb:198:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/client.rb:418:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/client.rb:176:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:283:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:270:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:270:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/application.rb:70:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.14.4/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `<main>'
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.
Please update version to more than 0.2.0, because supermarket.chef.io not see changes like ubuntu 14.04 support
Recipe: modules::config
* apt_package[kmod] action install (up to date)
* directory[/etc/modules-load.d] action create (up to date)
* cookbook_file[/etc/modules-load.d/header] action create (up to date)
* cookbook_file[/etc/init/modules-load.conf] action create (up to date)
* service[kmod] action nothing (skipped due to action :nothing)
* service[modules-load] action enable (up to date)
* service[modules-load] action start
================================================================================
Error executing action `start` on resource 'service[modules-load]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /sbin/start modules-load ----
STDOUT:
STDERR: start: Job failed to start
---- End output of /sbin/start modules-load ----
Ran /sbin/start modules-load returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/modules/recipes/config.rb
56: service "modules-load" do
57: provider Chef::Provider::Service::Upstart
58: action [:enable, :start]
59: notifies :start, "service[kmod]"
60: end
61: else
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/modules/recipes/config.rb:56:in `from_file'
service("modules-load") do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
supports {:restart=>false, :reload=>false, :status=>false}
retries 0
retry_delay 2
default_guard_interpreter :default
service_name "modules-load"
enabled true
pattern "modules-load"
declared_type :service
cookbook_name "modules"
recipe_name "config"
end
If I look at the upstart log, I see:
root@mysystem:~# cat /var/log/upstart/modules-load.log
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
cat: /etc/modules-load.d/modules.conf: input file is output file
and no other errors.
Looking closer reveals that:
root@mysystem:~# ls -laR /etc/modules*
-rw-r--r-- 1 root root 288 Dec 10 19:48 /etc/modules
/etc/modules-load.d:
total 12
drw-r--r-- 2 root root 4096 Dec 10 19:48 .
drwxr-xr-x 85 root root 4096 Dec 10 19:48 ..
-rw-r--r-- 1 root root 288 Dec 10 19:31 header
lrwxrwxrwx 1 root root 10 Nov 10 20:14 modules.conf -> ../modules
root@mysystem:~#
It appears that systemd
installs this:
root@mysystem:~# dpkg -S /etc/modules-load.d/modules.conf
systemd: /etc/modules-load.d/modules.conf
This is version 0.2.0 (latest) from the Chef cookbook site.
Note that while upstart is the init system, systemd also comes installed.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/ci.yml
sous-chefs/.github 2.0.2
.github/workflows/stale.yml
actions/stale v8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.