Signed-off-by: Venky Shankar <vshankar@redhat.com>
services:
- cephfs-mirror
min: 0
+- name: cephfs_mirror_mount_timeout
+ type: secs
+ level: advanced
+ desc: timeout for mounting primary/seconday ceph file system
+ long_desc: Timeout in seconds for mounting primary or secondary (remote) ceph file system
+ by the cephfs-mirror daemon. Setting this to a higher value could result in the mirror
+ daemon getting stalled when mounting a file system if the cluster is not reachable. This
+ option is used to override the usual client_mount_timeout.
+ default: 10
+ services:
+ - cephfs-mirror
+ min: 0
\ No newline at end of file
return r;
}
+ // mount timeout applies for local and remote mounts.
+ auto mount_timeout = g_ceph_context->_conf.get_val<std::chrono::seconds>
+ ("cephfs_mirror_mount_timeout").count();
+ r = ceph_set_mount_timeout(cmi, mount_timeout);
+ if (r < 0) {
+ derr << ": mount error: " << cpp_strerror(r) << dendl;
+ return r;
+ }
+
r = ceph_init(cmi);
if (r < 0) {
derr << ": mount error: " << cpp_strerror(r) << dendl;