]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: introduce configuration options for cephfs-mirror daemon
authorVenky Shankar <vshankar@redhat.com>
Wed, 12 Aug 2020 10:25:07 +0000 (06:25 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 1 Sep 2020 10:58:10 +0000 (06:58 -0400)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/common/options.cc

index a08e91485ba136dd4d81e84564557001bf2ad7da..5268e52f7625cb93ef3b9941147769f1044bf001 100644 (file)
@@ -8682,6 +8682,20 @@ std::vector<Option> get_mds_client_options() {
     });
 }
 
+std::vector<Option> get_cephfs_mirror_options() {
+  return std::vector<Option>({
+    Option("cephfs_mirror_max_concurrent_directory_syncs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+    .set_default(3)
+    .set_min(1)
+    .set_description("maximum number of concurrent snapshot synchronization threads")
+    .set_long_description("maximum number of directory snapshots that can be synchronized concurrently by cephfs-mirror daemon. Controls the number of synchronization threads."),
+
+    Option("cephfs_mirror_directory_choose_policy", Option::TYPE_STR, Option::LEVEL_ADVANCED)
+    .set_default("random")
+    .set_description("policy for choosing directories to mirror snapshots")
+    .set_long_description("policy used by cephfs-mirror daemon to choose directories for snapshot mirroring"),
+    });
+}
 
 static std::vector<Option> build_options()
 {
@@ -8700,6 +8714,7 @@ static std::vector<Option> build_options()
   ingest(get_immutable_object_cache_options(), "immutable-objet-cache");
   ingest(get_mds_options(), "mds");
   ingest(get_mds_client_options(), "mds_client");
+  ingest(get_cephfs_mirror_options(), "cephfs-mirror");
 
   return result;
 }