Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
cernvm-fs
Commits
57ddcad5
Commit
57ddcad5
authored
Nov 04, 2021
by
Christopher Huhn
🥚
Browse files
Reload automounter and add cleanup logic
parent
5961c465
Changes
2
Show whitespace changes
Inline
Side-by-side
metadata.rb
View file @
57ddcad5
...
...
@@ -7,7 +7,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url
'https://git.gsi.de:chef/cookbooks/cernvm-fs/'
issues_url
'https://git.gsi.de:chef/cookbooks/cernvm-fs/issues'
version
"1.
0
.0"
version
"1.
1
.0"
depends
"sys"
,
'>= 1.51.0'
depends
"apache2"
,
'< 8.0'
...
...
recipes/client.rb
View file @
57ddcad5
...
...
@@ -37,9 +37,15 @@ when 9,10
# generated by Chef, cernvm-fs cookbook
/cvmfs program:/etc/auto.cvmfs
EOF
notifies
:reload
,
'service[autofs]'
end
service
'autofs'
do
action
:nothing
end
end
# Make sure the CMVFS user can use FUSE
# to mount a repositories
node
.
default
[
'sys'
][
'fuse'
][
'config'
][
'mount_max'
]
=
1000
...
...
@@ -103,13 +109,23 @@ end
#
directory
'/etc/cvmfs/config.d'
# delete repo configs not managed by this cookbook:
Dir
.
glob
(
'/etc/cvmfs/config.d/*.conf'
).
each
do
|
f
|
file
f
do
action
:delete
only_if
{
node
[
'cvmfs'
][
'client'
][
'config_d_cleanup'
]
==
true
}
# keep files with a correspoming attribute:
not_if
do
node
[
'cvmfs'
][
'client'
][
'config_d'
].
key?
(
File
.
basename
(
f
,
'.conf'
))
end
end
end
# Each repository needs its configuration file
node
[
'cvmfs'
][
'client'
][
'config_d'
].
each
do
|
repo
,
config
|
template
"/etc/cvmfs/config.d/
#{
repo
}
.conf"
do
source
'etc_cvmfs_config.d_generic.conf.erb'
mode
"0644"
variables
(
config:
config
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment