-
Notifications
You must be signed in to change notification settings - Fork 107
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
Sets the default version to giant #190
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,26 @@ | |
|
||
cluster = 'ceph' | ||
|
||
if node['ceph']['version'] >= 'giant' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The mds pools are not created by default for versions >= giant (before that they were automatically created, so there was no code in the cookbook to create the pools if not present). After thinking about it, creating the pool "not_if" already exists should be safe with older versions and also future proof. Want me to clean this up? |
||
# doesn't work on non-mon nodes, will need to be moved to lwrp | ||
node['ceph']['mds']['fs'].keys.each do |fs| | ||
metadata_pool = node['ceph']['mds']['fs'][fs]['metadata_pool'] | ||
data_pool = node['ceph']['mds']['fs'][fs]['data_pool'] | ||
|
||
[metadata_pool, data_pool].each do |pool_name| | ||
execute "ensure ceph pool #{pool_name} exists" do | ||
command "ceph osd pool create #{pool_name} 32" | ||
not_if "rados lspools | grep '^#{Regexp.quote(pool_name)}$'" | ||
end | ||
end | ||
|
||
execute "ensure cephfs #{fs} exists" do | ||
command "ceph fs new #{fs} #{metadata_pool} #{data_pool}" | ||
not_if "ceph fs ls | grep '^#{Regexp.quote(fs)}$'" | ||
end | ||
end | ||
end | ||
|
||
directory "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}" do | ||
owner 'root' | ||
group 'root' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mounting fuse-based filesystem does not play well when the system reboots: the fstab entry is mounted again by the system, but the "mount" resource does not see that the volume is mounted and tried mounting again, which fails the chef-run. Interested in more pretty workarounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chef s3fs mount cookbook checks where the directory is a mountpoint, not specifically that it is an s3fs mountpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will replace #170