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

Service fails to start on some fresh Ubuntu 14 installs due to symlink conflict #20

Open
willneumob opened this issue Dec 10, 2016 · 1 comment

Comments

@willneumob
Copy link

willneumob commented Dec 10, 2016

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.

@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