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

Missing folder under debian 8 jessie #86

albundy83 opened this Issue May 27, 2015 · 5 comments


None yet
5 participants

albundy83 commented May 27, 2015


first I know that debian is not part of the supported OS, but it works and it works great.
Just a small issue with a fresh install under Debian 8.
The folder /usr/lib/systemd/system does not necessary exist on a fresh install of Debian and there is an error in the receipe : /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb

Just creating the folder manually fix the problem :
mkdir /usr/lib/systemd/system

Here the full error output :

Recipe: enterprise::runit_systemd
  * template[/usr/lib/systemd/system/private_chef-runsvdir-start.service] action create
    * Parent directory /usr/lib/systemd/system does not exist.
    Error executing action `create` on resource 'template[/usr/lib/systemd/system/private_chef-runsvdir-start.service]'

    Parent directory /usr/lib/systemd/system does not exist.

    Resource Declaration:
    # In /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb

     10: template "/usr/lib/systemd/system/#{unit_name}" do
     11:   owner "root"
     12:   group "root"
     13:   mode "0644"
     14:   variables({
     15:               :install_path => node[project_name]['install_path'],
     16:               :project_name => project_name
     17:   })
     18:   source "runsvdir-start.service.erb"
     19: end

    Compiled Resource:
    # Declared in /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb:10:in `from_file'

    template("/usr/lib/systemd/system/private_chef-runsvdir-start.service") do
      action "create"
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      path "/usr/lib/systemd/system/private_chef-runsvdir-start.service"
      backup 5
      atomic_update true
      source "runsvdir-start.service.erb"
      variables {:install_path=>"/opt/opscode", :project_name=>"private_chef"}
      declared_type :template
      cookbook_name "enterprise"
      recipe_name "runit_systemd"
      owner "root"
      group "root"
      mode "0644"

Running handlers:
[2015-05-27T09:13:53+02:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-27T09:13:53+02:00] ERROR: Exception handlers complete
[2015-05-27T09:13:53+02:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 12 resources updated in 10.986042348 seconds
[2015-05-27T09:13:54+02:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/usr/lib/systemd/system/private_chef-runsvdir-start.service] (enterprise::runit_systemd line 10) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /usr/lib/systemd/system does not exist.
Thanks :)

This comment has been minimized.


jtimberman commented Jun 11, 2015

First, this is actually a bug in the enterprise cookbook:

    # Declared in /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb:10:in `from_file'

It probably needs to be updated to account for the differences between the systemd path locations on various distributions.

Second, we don't want to start adding platform specific workarounds and conditionals to this cookbook to account for discrepancies like this. I recommend that you use a custom cookbook and recipe that contains a resource like this:

directory '/usr/lib/systemd/system' do
  recursive true

This is probably similar to what the enterprise cookbook would need to have, though with a platform-specific path location.

@jtimberman jtimberman closed this Jun 11, 2015


This comment has been minimized.

heul commented Oct 28, 2015

Another quick workaround is to symlink the folder:
ln -s /etc/systemd/system /usr/lib/systemd/system


This comment has been minimized.

StephenKing commented Nov 15, 2015

Thanks for these hints, this helped me installing Chef Server on Debian Jessie. May I ping you @heul and @albundy83 for a follow-up problem?


This comment has been minimized.

albundy83 commented Nov 17, 2015

I have sent you a mail, to give me more details and see if I can help.
But for sure it should work ;)


This comment has been minimized.

georgexsh commented Jun 5, 2016

@heul based on advice from @jtimberman, compare to symlink, create this directory is more appropriate IMHO:
sudo mkdir -p /usr/lib/systemd/system

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