- From: "Julian C. Dunn" <
>
- To: "
" <
>
- Subject: [chef] Re: Chef mount not working with directory
- Date: Thu, 8 May 2014 23:50:41 -0400
What operating system and Chef client version? It works ok for me here:
$ mount|grep amholding
/dev/mapper/vg00-lv05 on /amholding type ext4
(rw,nosuid,nodev,relatime,seclabel,data=ordered)
$ sudo chef-apply -s
[sudo] password for jdunn:
directory '/amholding' do
owner 'amandabackup'
group 'tape'
mode 0700
action :create
end
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* directory[/amholding] action create (up to date)
- Julian
On Wed, May 7, 2014 at 11:09 AM, Christian Fröstl
<
>
wrote:
>
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
>
>
>
>
--
[ Julian C. Dunn
<
>
* Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[
gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.