summaryrefslogtreecommitdiff
path: root/daemons/dmeventd
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2019-09-20 17:35:35 +0200
committerHeinz Mauelshagen <heinzm@redhat.com>2019-09-20 17:53:20 +0200
commit6f355c673631b0d7959191c8a56a577b3a0e97c9 (patch)
treee2b1318ce517a3c876f3d66f3880e713c17f7852 /daemons/dmeventd
parent6fc46af8ecd9532aca41df43fd588fb207ed4e92 (diff)
downloadlvm2-6f355c673631b0d7959191c8a56a577b3a0e97c9.tar.gz
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
Diffstat (limited to 'daemons/dmeventd')
-rw-r--r--daemons/dmeventd/plugins/raid/dmeventd_raid.c19
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 aa2b5789d..525b72150 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)