]> sourceware.org Git - lvm2.git/commitdiff
dmeventd: avoid bail out preventing repair in raid plugin
authorHeinz Mauelshagen <heinzm@redhat.com>
Fri, 16 Aug 2019 14:25:08 +0000 (16:25 +0200)
committerHeinz Mauelshagen <heinzm@redhat.com>
Fri, 16 Aug 2019 16:07:03 +0000 (18:07 +0200)
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 and let lvconvert carry out its
pre-repair checks and optionally carry out a repair attempt.

Resolves: 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

index aa2b5789d988f9b6599246ca71b6314087e189f4..3431f1ec1fd8865c34f5caa45876f57304723db7 100644 (file)
@@ -76,16 +76,12 @@ 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->failed)
                        goto out; /* already reported */
 
This page took 0.066572 seconds and 5 git commands to generate.