- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: RE: Re: Re: Puzzled about convergence, please advise?
- Date: Thu, 13 Nov 2014 14:05:24 -0800
On Thursday, November 13, 2014 at 1:58 PM, Fouts, Chris wrote:
>
Ok, here’s an actual trace. In this case, I have a recipe that installs
>
Cassandra.
>
>
>
Service_name=”flexnet-cassandra”
>
>
rpm_package “Install Cassandra” do
>
action :install
>
package_name flexnet-cassandra.rpm
>
end
>
>
#Set Cassandra Clustered Config File
>
template "/opt/cassandra/conf/cassandra.yaml" do
>
source "cassandra.erb"
>
owner "root"
>
group "root"
>
mode 0755
>
variables(
>
:cassandra_hosts => node[:cassandra_hosts],
>
:environment => environment,
>
)
>
action :create
>
notifies :restart, "service[#{service_name}]", :delayed
>
end
>
>
>
Recipe: cassandra::default
>
* template[/opt/cassandra/conf/cassandra.yaml] action create
>
* Parent directory /opt/cassandra/conf does not exist.
>
================================================================================
>
Error executing action `create` on resource
>
'template[/opt/cassandra/conf/cassandra.yaml]'
>
================================================================================
>
>
>
Chef::Exceptions::EnclosingDirectoryDoesNotExist
>
------------------------------------------------
>
Parent directory /opt/cassandra/conf does not exist.
>
>
>
Resource Declaration:
>
---------------------
>
# In /var/chef/cache/cookbooks/cassandra/recipes/default.rb
>
>
18: template "/opt/cassandra/conf/cassandra.yaml" do
>
19: source "cassandra.erb"
>
20: owner "root"
>
21: group "root"
>
22: mode 0755
>
23: variables(
>
24: :cassandra_hosts => node[:cassandra_hosts],
>
25: :environment => environment,
>
26: )
>
27: action :create
>
28: notifies :restart, "service[#{service_name}]", :delayed
>
29: end
>
30:
>
>
>
>
Compiled Resource:
>
------------------
>
# Declared in /var/chef/cache/cookbooks/cassandra/recipes/default.rb:18:in
>
`from_file'
>
>
template("/opt/cassandra/conf/cassandra.yaml") do
>
provider Chef::Provider::Template
>
action [:create]
>
retries 0
>
retry_delay 2
>
guard_interpreter :default
>
path "/opt/cassandra/conf/cassandra.yaml"
>
backup 5
>
atomic_update true
>
source "cassandra.erb"
>
variables {:cassandra_hosts=>["scaleha-flip1", "scaleha-flip2",
>
"scaleha-flex1", "scaleha-flex2"], :environment=>"Flexapp Cluster"}
>
cookbook_name "cassandra"
>
recipe_name "default"
>
owner "root"
>
group "root"
>
mode 493
>
end
>
>
>
Running handlers:
>
[2014-11-13T16:42:07-05:00] ERROR: Running exception handlers
>
Running handlers complete
>
>
[2014-11-13T16:42:07-05:00] ERROR: Exception handlers complete
>
[2014-11-13T16:42:07-05:00] FATAL: Stacktrace dumped to
>
/var/chef/cache/chef-stacktrace.out
>
Chef Client failed. 14 resources updated in 31.654667 seconds
>
[2014-11-13T16:42:07-05:00] ERROR:
>
template[/opt/cassandra/conf/cassandra.yaml] (cassandra::default line 18)
>
had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent
>
directory /opt/cassandra/conf does not exist.
>
[2014-11-13T16:42:07-05:00] FATAL: Chef::Exceptions::ChildConvergeError:
>
Chef run process exited unsuccessfully (exit code 1)
Another possibility is that the package doesn’t get installed for some
reason. Could it already be installed but the conf/ dir has been removed?
More generally, what’s on disk after Chef fails? It should have run the
package resource before the template, so you should be able to observe the
effects of running action :install on the package.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.