]> sourceware.org Git - lvm2.git/commitdiff
Revert "dmeventd: avoid bail out preventing repair in raid plugin"
authorHeinz Mauelshagen <heinzm@redhat.com>
Fri, 20 Sep 2019 15:26:36 +0000 (17:26 +0200)
committerHeinz Mauelshagen <heinzm@redhat.com>
Fri, 20 Sep 2019 15:52:37 +0000 (17:52 +0200)
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

index 3431f1ec1fd8865c34f5caa45876f57304723db7..aa2b5789d988f9b6599246ca71b6314087e189f4 100644 (file)
@@ -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 */
 
This page took 0.04032 seconds and 5 git commands to generate.