glusterfs
glusterfs copied to clipboard
Georep: make passive worker sync self-heal traffic
Problem: When the worker corresponding to a brick which was down becomes Active after the brick comes up, there is a race window where the I/O which happened when the brick was down would not sync to slave. This can result in data loss at slave.
Fix: As the lost fop comes as self heal traffic, we will make the passive workers to sync self heal traffic. This way, we ensure the brick which turned passive from active has received its fops.
Steps:
- make passive worker sync MKNOD
- the time for this sync is updated as stime. When made into an active worker we use this stime to resume sync.
- make clusterstime as a new xattr and store it.
- to avoid passive's stime crossing active stime, check the cluster stime and then proceed.
Change-Id: I96a703744cb211df03c69152594c812b1af87635 fixes: #1049 Signed-off-by: Hari Gowtham [email protected] Signed-off-by: srijan-sivakumar [email protected]
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Can one of the admins verify this patch?
/recheck smoke
/run regression
/run regression
/run regression
/run regression
/run regression
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.
/run regression
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index 3c4458c3b..7679c9794 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2938,7 +2938,6 @@ gf_defrag_task(void *opaque)
set_lk_owner_from_ptr(&lkowner, &lkowner);
syncopctx_setfslkowner(&lkowner);
-
q_head = &(defrag->queue[0].list);
/* The following while loop will dequeue one entry from the defrag->queue
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 0eac50117..a36336736 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -3765,10 +3765,10 @@ reconfigure(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("ios-dump-format", dump_format_str, options, str, out);
ios_set_log_format_code(conf, dump_format_str);
if (conf->ios_sample_interval) {
- GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size, options,
- int32, out);
+ GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size,
+ options, int32, out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
GF_OPTION_RECONF("sys-log-level", sys_log_str, options, str, out);
@@ -3951,7 +3951,7 @@ init(xlator_t *this)
GF_OPTION_INIT("ios-sample-buf-size", conf->ios_sample_buf_size, int32,
out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
ret = ios_init_sample_buf(conf);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 5652b7e69..a9f7353f7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1460,12 +1460,10 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "performance/md-cache",
.option = "pass-through",
.op_version = GD_OP_VERSION_4_1_0},
- {
- .key = "performance.write-behind-pass-through",
- .voltype = "performance/write-behind",
- .option = "pass-through",
- .op_version = GD_OP_VERSION_9_0
- },
+ {.key = "performance.write-behind-pass-through",
+ .voltype = "performance/write-behind",
+ .option = "pass-through",
+ .op_version = GD_OP_VERSION_9_0},
{.key = "performance.md-cache-timeout",
.voltype = "performance/md-cache",
.option = "md-cache-timeout",
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index c46ffb19e..243ed511c 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -3191,15 +3191,13 @@ struct volume_options options[] = {
.op_version = {GD_OP_VERSION_6_0},
.flags = OPT_FLAG_SETTABLE,
},
- {
- .key = {"pass-through"},
- .type = GF_OPTION_TYPE_BOOL,
- .default_value = "false",
- .op_version = {GD_OP_VERSION_9_0},
- .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
- .tags = {"write-behind"},
- .description = "Enable/disable write-behind pass-through"
- },
+ {.key = {"pass-through"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "false",
+ .op_version = {GD_OP_VERSION_9_0},
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
+ .tags = {"write-behind"},
+ .description = "Enable/disable write-behind pass-through"},
{.key = {"flush-behind"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
1 test(s) failed ./tests/00-geo-rep/passive_sync.t
0 test(s) generated core
3 test(s) needed retry ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/00-geo-rep/passive_sync.t https://build.gluster.org/job/gh_centos7-regression/1876/
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index 4d068dbe4..b417792a7 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -917,9 +917,9 @@ xml_output:
type, brick_count, dist_count, stripe_count, replica_count,
disperse_count, redundancy_count, arbiter_count);
- cli_out("Transport-type: %s",
- ((transport == 0) ? "tcp"
- : (transport == 1) ? "rdma" : "tcp,rdma"));
+ cli_out("Transport-type: %s", ((transport == 0) ? "tcp"
+ : (transport == 1) ? "rdma"
+ : "tcp,rdma"));
j = 1;
GF_FREE(local->get_vol.volname);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 3c4458c3b..7679c9794 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2938,7 +2938,6 @@ gf_defrag_task(void *opaque)
set_lk_owner_from_ptr(&lkowner, &lkowner);
syncopctx_setfslkowner(&lkowner);
-
q_head = &(defrag->queue[0].list);
/* The following while loop will dequeue one entry from the defrag->queue
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 0eac50117..a36336736 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -3765,10 +3765,10 @@ reconfigure(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("ios-dump-format", dump_format_str, options, str, out);
ios_set_log_format_code(conf, dump_format_str);
if (conf->ios_sample_interval) {
- GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size, options,
- int32, out);
+ GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size,
+ options, int32, out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
GF_OPTION_RECONF("sys-log-level", sys_log_str, options, str, out);
@@ -3951,7 +3951,7 @@ init(xlator_t *this)
GF_OPTION_INIT("ios-sample-buf-size", conf->ios_sample_buf_size, int32,
out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
ret = ios_init_sample_buf(conf);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 5652b7e69..a9f7353f7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1460,12 +1460,10 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "performance/md-cache",
.option = "pass-through",
.op_version = GD_OP_VERSION_4_1_0},
- {
- .key = "performance.write-behind-pass-through",
- .voltype = "performance/write-behind",
- .option = "pass-through",
- .op_version = GD_OP_VERSION_9_0
- },
+ {.key = "performance.write-behind-pass-through",
+ .voltype = "performance/write-behind",
+ .option = "pass-through",
+ .op_version = GD_OP_VERSION_9_0},
{.key = "performance.md-cache-timeout",
.voltype = "performance/md-cache",
.option = "md-cache-timeout",
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index c46ffb19e..243ed511c 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -3191,15 +3191,13 @@ struct volume_options options[] = {
.op_version = {GD_OP_VERSION_6_0},
.flags = OPT_FLAG_SETTABLE,
},
- {
- .key = {"pass-through"},
- .type = GF_OPTION_TYPE_BOOL,
- .default_value = "false",
- .op_version = {GD_OP_VERSION_9_0},
- .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
- .tags = {"write-behind"},
- .description = "Enable/disable write-behind pass-through"
- },
+ {.key = {"pass-through"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "false",
+ .op_version = {GD_OP_VERSION_9_0},
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
+ .tags = {"write-behind"},
+ .description = "Enable/disable write-behind pass-through"},
{.key = {"flush-behind"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index 4d068dbe4..b417792a7 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -917,9 +917,9 @@ xml_output:
type, brick_count, dist_count, stripe_count, replica_count,
disperse_count, redundancy_count, arbiter_count);
- cli_out("Transport-type: %s",
- ((transport == 0) ? "tcp"
- : (transport == 1) ? "rdma" : "tcp,rdma"));
+ cli_out("Transport-type: %s", ((transport == 0) ? "tcp"
+ : (transport == 1) ? "rdma"
+ : "tcp,rdma"));
j = 1;
GF_FREE(local->get_vol.volname);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 3c4458c3b..7679c9794 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2938,7 +2938,6 @@ gf_defrag_task(void *opaque)
set_lk_owner_from_ptr(&lkowner, &lkowner);
syncopctx_setfslkowner(&lkowner);
-
q_head = &(defrag->queue[0].list);
/* The following while loop will dequeue one entry from the defrag->queue
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 0eac50117..a36336736 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -3765,10 +3765,10 @@ reconfigure(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("ios-dump-format", dump_format_str, options, str, out);
ios_set_log_format_code(conf, dump_format_str);
if (conf->ios_sample_interval) {
- GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size, options,
- int32, out);
+ GF_OPTION_RECONF("ios-sample-buf-size", conf->ios_sample_buf_size,
+ options, int32, out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
GF_OPTION_RECONF("sys-log-level", sys_log_str, options, str, out);
@@ -3951,7 +3951,7 @@ init(xlator_t *this)
GF_OPTION_INIT("ios-sample-buf-size", conf->ios_sample_buf_size, int32,
out);
} else {
- ios_sample_buf_size_configure (this->name, conf);
+ ios_sample_buf_size_configure(this->name, conf);
}
ret = ios_init_sample_buf(conf);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 5652b7e69..a9f7353f7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1460,12 +1460,10 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "performance/md-cache",
.option = "pass-through",
.op_version = GD_OP_VERSION_4_1_0},
- {
- .key = "performance.write-behind-pass-through",
- .voltype = "performance/write-behind",
- .option = "pass-through",
- .op_version = GD_OP_VERSION_9_0
- },
+ {.key = "performance.write-behind-pass-through",
+ .voltype = "performance/write-behind",
+ .option = "pass-through",
+ .op_version = GD_OP_VERSION_9_0},
{.key = "performance.md-cache-timeout",
.voltype = "performance/md-cache",
.option = "md-cache-timeout",
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index c46ffb19e..243ed511c 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -3191,15 +3191,13 @@ struct volume_options options[] = {
.op_version = {GD_OP_VERSION_6_0},
.flags = OPT_FLAG_SETTABLE,
},
- {
- .key = {"pass-through"},
- .type = GF_OPTION_TYPE_BOOL,
- .default_value = "false",
- .op_version = {GD_OP_VERSION_9_0},
- .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
- .tags = {"write-behind"},
- .description = "Enable/disable write-behind pass-through"
- },
+ {.key = {"pass-through"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "false",
+ .op_version = {GD_OP_VERSION_9_0},
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT,
+ .tags = {"write-behind"},
+ .description = "Enable/disable write-behind pass-through"},
{.key = {"flush-behind"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
/run regression
1 test(s) failed ./tests/00-geo-rep/passive_sync.t
0 test(s) generated core
6 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/georep-basic-dr-rsync-arbiter.t ./tests/00-geo-rep/passive_sync.t
2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/1991/
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.