Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8d3e01ff4f94a8d36b165…
Commit: 8d3e01ff4f94a8d36b16520a5e402dbc7539dd2c
Parent: 0585754593d7c010d83274c3a25dd6c3e8c8b4a8
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Sep 20 17:35:35 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Sep 20 17:52:02 2019 +0200
dmeventd: avoid bail out preventing repair in raid plugin but keep message
Followup patch mentioned in previous commit 0585754593d7c010d83274c3a25dd6c3e8c8b4a8.
Problem:
even though dead raid component devices are detected, the
raid plugin is bailing out thus preventing a repair attempt.
Rational:
in case of component device errors, the MD resynchronization
thread runs in parallel with the thrown event being processed
by the raid plugin. The plugin retrieves the raid device status
but that still reflects insync regions as 0 (when it should
already be total regions) because the MD thread didn't update it yet.
Solution:
Remove the insync regions check but keep the informal message
"waiting for resynchronization" and let lvconvert carry out its
pre-repair checks and optionally carry out a repair attempt.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1560739
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1468590
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1654860
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1729303
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1741016
---
daemons/dmeventd/plugins/raid/dmeventd_raid.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
index 52cf43d..fda1320 100644
--- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c
+++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
@@ -76,14 +76,17 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
}
if (dead) {
- if (status->insync_regions < status->total_regions) {
- if (!state->warned) {
- state->warned = 1;
- log_warn("WARNING: waiting for resynchronization to finish "
- "before initiating repair on RAID device %s.", device);
- }
-
- goto out; /* Not yet done syncing with accessible devices */
+ /*
+ * Use the first event to run a repair ignoring any additonal ones.
+ *
+ * We presume lvconvert to do pre-repair
+ * checks to avoid bloat in this plugin.
+ */
+ if (!state->warned && status->insync_regions < status->total_regions) {
+ state->warned = 1;
+ log_warn("WARNING: waiting for resynchronization to finish "
+ "before initiating repair on RAID device %s.", device);
+ /* Fall through to allow lvconvert to run. */
}
if (state->failed)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0585754593d7c010d8327…
Commit: 0585754593d7c010d83274c3a25dd6c3e8c8b4a8
Parent: 6cad4eba9b8d59cfc78dcaab2fa13de1889367c6
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Sep 20 17:48:20 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Sep 20 17:48:48 2019 +0200
Revert "dmeventd: avoid bail out preventing repair in raid plugin"
This reverts commit 9e438b4bc6b9240b63fc79acfef3c77c01a848d8.
The reverted patch also removed the warning which we realized we need
to keep as valuable process information (see related bugzilla below).
In a followup patch, we'll keep the message and avoid bailing out thus
always allowing lvconvert to try repairing if 'allocate' fault policy set.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887
---
daemons/dmeventd/plugins/raid/dmeventd_raid.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
index f435043..52cf43d 100644
--- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c
+++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
@@ -76,12 +76,16 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
}
if (dead) {
- /*
- * Use the first event to run a repair ignoring any additonal ones.
- *
- * We presume lvconvert to do pre-repair
- * checks to avoid bloat in this plugin.
- */
+ if (status->insync_regions < status->total_regions) {
+ if (!state->warned) {
+ state->warned = 1;
+ log_warn("WARNING: waiting for resynchronization to finish "
+ "before initiating repair on RAID device %s.", device);
+ }
+
+ goto out; /* Not yet done syncing with accessible devices */
+ }
+
if (state->failed)
goto out; /* already reported */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6f355c673631b0d795919…
Commit: 6f355c673631b0d7959191c8a56a577b3a0e97c9
Parent: 6fc46af8ecd9532aca41df43fd588fb207ed4e92
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Sep 20 17:35:35 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Sep 20 17:53:20 2019 +0200
dmeventd: avoid bail out preventing repair in raid plugin but keep message
Followup patch mentioned in previous commit fe577f84cbf6bd7be76b457c9d54d0e54e57f93d.
Problem:
even though dead raid component devices are detected, the
raid plugin is bailing out thus preventing a repair attempt.
Rational:
in case of component device errors, the MD resynchronization
thread runs in parallel with the thrown event being processed
by the raid plugin. The plugin retrieves the raid device status
but that still reflects insync regions as 0 (when it should
already be total regions) because the MD thread didn't update it yet.
Solution:
Remove the insync regions check but keep the informal message
"waiting for resynchronization" and let lvconvert carry out its
pre-repair checks and optionally carry out a repair attempt.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1560739
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1468590
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1654860
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1729303
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1741016
---
daemons/dmeventd/plugins/raid/dmeventd_raid.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
index aa2b578..525b721 100644
--- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c
+++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
@@ -76,14 +76,17 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
}
if (dead) {
- if (status->insync_regions < status->total_regions) {
- if (!state->warned) {
- state->warned = 1;
- log_warn("WARNING: waiting for resynchronization to finish "
- "before initiating repair on RAID device %s.", device);
- }
-
- goto out; /* Not yet done syncing with accessible devices */
+ /*
+ * Use the first event to run a repair ignoring any additonal ones.
+ *
+ * We presume lvconvert to do pre-repair
+ * checks to avoid bloat in this plugin.
+ */
+ if (!state->warned && status->insync_regions < status->total_regions) {
+ state->warned = 1;
+ log_warn("WARNING: waiting for resynchronization to finish "
+ "before initiating repair on RAID device %s.", device);
+ /* Fall through to allow lvconvert to run. */
}
if (state->failed)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6fc46af8ecd9532aca41d…
Commit: 6fc46af8ecd9532aca41df43fd588fb207ed4e92
Parent: 8d8b5e4f75694f62a9af9cda707509f0814d8c8a
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Sep 20 17:26:36 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Sep 20 17:52:37 2019 +0200
Revert "dmeventd: avoid bail out preventing repair in raid plugin"
This reverts commit ad560a286a0b5d08086324e6194b060c136e9353.
The reverted patch also removed the warning which we realized we need
to keep as valuable process information (see related bugzilla below).
In a followup patch, we'll keep the message and avoid bailing out thus
always allowing lvconvert to try repairing if 'allocate' fault policy set.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887
---
daemons/dmeventd/plugins/raid/dmeventd_raid.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
index 3431f1e..aa2b578 100644
--- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c
+++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c
@@ -76,12 +76,16 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
}
if (dead) {
- /*
- * Use the first event to run a repair ignoring any additonal ones.
- *
- * We presume lvconvert to do pre-repair
- * checks to avoid bloat in this plugin.
- */
+ if (status->insync_regions < status->total_regions) {
+ if (!state->warned) {
+ state->warned = 1;
+ log_warn("WARNING: waiting for resynchronization to finish "
+ "before initiating repair on RAID device %s.", device);
+ }
+
+ goto out; /* Not yet done syncing with accessible devices */
+ }
+
if (state->failed)
goto out; /* already reported */