- From: Christian Fröstl <
>
- To: "
" <
>
- Subject: [chef] Chef mount not working with directory
- Date: Wed, 7 May 2014 15:09:53 +0000
- Accept-language: de-DE, en-US
- Authentication-results: spf=none (sender IP is )
;
HI there,
I have q question regarding the resource type „mount“.
If I first create a directory resource and afterwards uses the resource
mount to mount a remote file system on the previous created directory it
works only for the first chef-client run.
After the mount of the remote filesystem, the resource directory will fail
during the next chef-client run.
Following code:
directory "#{tomcat_bag['webserver']['mountpoint_fs_install']}" do
'tomcatusr1'
group 'tomcatusr1'
mode 0755
action :create
end
mount tomcat_bag[servertype]['mountpoint_fs_install'] do
device tomcat_bag[servertype]['mountsource_fs_install']
fstype "nfs"
options "rw"
action [:mount, :enable]
End
Log:
First run:
* directory[/apps/install] action create (up to date)
* mount[/apps/install] action mount
- mount fil0001.stag.nubon.com:/install to /apps/install
* mount[/apps/install] action enable (up to date)
Second run:
* directory[/apps/install] action create
===========================================================================
=====
Error executing action `create` on resource 'directory[/apps/install]'
===========================================================================
=====
Errno::EINVAL
-------------
Invalid argument - /apps/install
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/tomcat/recipes/webserver.rb
27: directory "#{tomcat_bag['webserver']['mountpoint_fs_install']}" do
28: owner 'tomcatusr1'
29: group 'tomcatusr1'
30: mode 0755
31: action :create
32: end
33:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/tomcat/recipes/webserver.rb:27:in
`from_file'
directory("/apps/install") do
provider Chef::Provider::Directory
action [:create]
retries 0
retry_delay 2
guard_interpreter :default
path "/apps/install"
owner "tomcatusr1"
group "tomcatusr1"
mode 493
cookbook_name "tomcat"
recipe_name "webserver"
end
Does anybody of you have an idea, how I can fix this problem?
Thanks,
Christian
- [chef] Chef mount not working with directory, Christian Fröstl, 05/07/2014
Archive powered by MHonArc 2.6.16.