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

Error on Chef Solo Script #10

Open
ghost opened this issue Mar 23, 2013 · 1 comment
Open

Error on Chef Solo Script #10

ghost opened this issue Mar 23, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 23, 2013

when i run this command : chef-solo -j node.json -c solo.rb -l debug

im getting this error on the process

  • template[/etc/selinux/config] action create[2013-03-23T03:35:57+03:00] INFO: Processing template[/etc/selinux/config] actio n create (selinux::default line 16)

    * Parent directory /etc/selinux does not exist.

    Error executing action create on resource 'template[/etc/selinux/config]'

Chef::Exceptions::EnclosingDirectoryDoesNotExist

Parent directory /etc/selinux does not exist.

Resource Declaration:

In /var/chef_solo/cookbooks/selinux/recipes/default.rb

16: template "/etc/selinux/config" do
17: source "config.erb"
18: owner "root"
19: group "root"
20: notifies :run, resources(:execute => "disable_selinux"), :immediately
21: end

Compiled Resource:

Declared in /var/chef_solo/cookbooks/selinux/recipes/default.rb:16:in `from_file'

template("/etc/selinux/config") do
provider Chef::Provider::Template
source "config.erb"
owner "root"
cookbook_name :selinux
backup 5
action "create"
group "root"
retry_delay 2
path "/etc/selinux/config"
retries 0
recipe_name "default"
end

[2013-03-23T03:35:57+03:00] INFO: Running queued delayed notifications before re-raising exception
[2013-03-23T03:35:57+03:00] DEBUG: Re-raising exception: Chef::Exceptions::EnclosingDirectoryDoesNotExist - template[/etc/selin ux/config](selinux::default line 16) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/sel inux does not exist.
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:241:in run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:322:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:321:in each' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:321:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/provider.rb:128:in process_resource_requirements' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/provider.rb:104:inrun_action'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource.rb:603:in run_action' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:50:inrun_action'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:ineach'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection.rb:94:inexecute_each_resource'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in call' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall_it erator_block'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in step' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:initerate '
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in each_wit h_index' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection.rb:92:inexecute_each_resource'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:81:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:404:inconverge'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:469:in do_run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:200:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application.rb:190:in run_chef_client' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:239:inrun_application'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:231:in loop' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:231:inrun_application'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application.rb:73:in run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/chef-solo:25 /usr/local/rvm/gems/ruby-1.8.7-p371/bin/chef-solo:19:inload'
/usr/local/rvm/gems/ruby-1.8.7-p371/bin/chef-solo:19
/usr/local/rvm/gems/ruby-1.8.7-p371/bin/ruby_noexec_wrapper:14
[2013-03-23T03:35:57+03:00] ERROR: Running exception handlers
[2013-03-23T03:35:57+03:00] ERROR: Exception handlers complete
Chef Client failed. 5 resources updated
[2013-03-23T03:35:57+03:00] FATAL: Stacktrace dumped to /var/chef_solo/chef-stacktrace.out
[2013-03-23T03:35:57+03:00] DEBUG: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/etc/selinux/config](selinux::de fault line 16) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/selinux does not exist.
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:241:in run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:322:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:321:in each' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/mixin/why_run.rb:321:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/provider.rb:128:in process_resource_requirements' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/provider.rb:104:inrun_action'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource.rb:603:in run_action' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:50:inrun_action'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:ineach'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:82:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection.rb:94:inexecute_each_resource'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in call' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:incall_iter ator_block'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in step' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:initerate'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_ index' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/resource_collection.rb:92:inexecute_each_resource'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/runner.rb:81:in converge' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:404:inconverge'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:469:in do_run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/client.rb:200:inrun'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application.rb:190:in run_chef_client' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:239:inrun_application'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:231:in loop' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application/solo.rb:231:inrun_application'
/usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/../lib/chef/application.rb:73:in run' /usr/local/rvm/gems/ruby-1.8.7-p371/gems/chef-11.4.0/bin/chef-solo:25 /usr/local/rvm/gems/ruby-1.8.7-p371/bin/chef-solo:19:inload'
/usr/local/rvm/gems/ruby-1.8.7-p371/bin/chef-solo:19
/usr/local/rvm/gems/ruby-1.8.7-p371/bin/ruby_noexec_wrapper:14
[2013-03-23T03:35:57+03:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/etc/selinux/config](selinux::de fault line 16) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/selinux does not exist.

@jasonsmr
Copy link

jasonsmr commented May 7, 2013

Did you try installing selinux? yum install selinux solved this one for me, as it was not installed by default.
make sure that selinux is disabled however. use the below command to check.

sestatus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant