-
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
ceph_cephfs resource tries to mount again (mons order changed) #175
Comments
Feel free to send a PR that sorts the mons, as a workaround. The cookbook should learn how to delete the old line from fstab and add a new line with the new mons in case the actual mons change, but I'm not sure how to do that. |
The line in fstab could be tagged with an option or a comment, but I can't think of a way to do that with the mount resource. The mount point itself could be considered such a tag. There are a couple of "clever" ways to work around the problem in a wrapper cookbook, such as
|
The :mount action could be disabled if it manually checks that there is something mounted at that mountpoint. That will prevent problems of busy mounts when switching mons around. What do you think? |
I do indeed have a basic workaround in my wrapper for this recurring problem. mountpath = Pathname.new(node['ceph']['cephfs_mount'])
ceph_cephfs node['ceph']['cephfs_mount'] do
use_fuse node['ceph']['cephfs_use_fuse']
if mountpath.mountpoint?
action :enable
else
action [:enable, :mount]
end
end |
I currently have the following mounted fs in my fstab:
chef-client tries to mount the "new" fs and mount exits unsuccessfuly:
It seems that the order of mons is not kept between runs. (1,3,4,2 vs 1,4,3,2)
The text was updated successfully, but these errors were encountered: