Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit
db4bade78cae576b98a61e1c15e609a650613f2a)
Conflicts:
src/common/options/cephfs-mirror.yaml.in
cephfs-mirror.yaml.in does not exist in pacific -- use src/common/options.cc
to detail the configuration.
.set_min(0)
.set_description("interval to restart failed mirror instances")
.set_long_description("Interval in seconds to restart failed mirror instances. Setting to zero (0) disables restarting failed mirror instances."),
+
+ Option("cephfs_mirror_mount_timeout", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
+ .set_default(10)
+ .set_min(0)
+ .set_description("timeout for mounting primary/seconday ceph file system")
+ .set_long_description("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."),
});
}
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;